Building Dynamic Arrays

In SBM Composer, you can build an array with a fixed number of array elements at design time. This is known as a fixed array.

However, sometimes you must determine the number of array elements at runtime (that is, when an orchestration workflow runs). For example, you want to send telephone numbers to an SMS (Short Message Service) Web service. You use a Service step in an orchestration workflow to get the telephone numbers of those users who were selected on a form.

Because you do not know the number of selected users and telephone numbers in advance, you build a dynamic array. For an orchestration workflow to dynamically add elements to an array, you use a Calculate step to target each element in the array in sequential order, beginning with 1.

This section includes use cases that illustrate ways to make Web service calls that accept a dynamically-sized list of elements. They are for demonstration purposes only, and do not represent realistic scenarios.

Important: If you do not use dynamic arrays, you must make multiple Web service calls with one element in each array, or create an array in advance that has a fixed length (for example, a 20-element array). These methods have a negative impact on performance.
Array elements must be ordered chronologically. Do not split arrays or interject an array element into the middle of an array. For example, you cannot interject an array element between two existing array elements, and you cannot create a seventh array element if there is no sixth array element.

Related Topics

Use Case: Creating an Array to Use in a Subsequent Service Step

Use Case: Populating Custom Fields