Creating an array with some empty elements
To create an array with one or more empty elements in it, you first create an empty array (as shown in the preceding section), and then you append the number of empty elements that you need. If you need more than one, then you could use a loop.
You can append the empty element using the Append operation in the Data Association editor, as we saw in the previous example. To get an empty element to append, you just need to define a data object based on the business object of the type you need, but don't put any data in it.
Let's update our Array1
process to add some empty elements to our array:
Add a Subprocess activity to your process after
CreateEmptyArray
. Open the Loop Characteristics tab in Properties and choose Loop. Set the Loop Condition to loopCounter <= 5. ThisloopCounter
we referred to is a predefined variable that will automatically be incremented each time the loop is executed:Let's create the new empty data object that we will use to...