Introduction

Implementation - SmartObject method

The following steps show how to set up the Plan per slot (no destinations) planning option in order to return a list from a SmartObject:

  1. Create a SmartObject containing the list you want to use. The use of a SmartObject GetList method allows the Plan per slot (no destinations) planning option  to create an activity destination instance for each record in the list (in other words each event in the activity will execute the number of times there are records).
  2. Open the activity’s Destination Rule, click Back and select Advanced Mode.
  3.  

  4. Click Next and select Plan per slot (no destinations).
  5. Click Next.
  6. Select the last option (Select a list field to determine how many slots should be created)
  7. Drag the ID of your GetList method into the field.

In runtime, it will create an activity destination instance for each record in the list (in other words each event in the activity will execute the number of times there are records)

Each SmartObject record’s ID will be stored in the Workflow Context field ActivityDestinationInstance_InstanceData which can be used in a Load or Update method.

When using the Plan per slot (no destinations) planning option, make sure to add a Succeeding Rule stating [ActivityDestinationInstance_Status] All = “Completed”

Implementation - XML

When only using one property from the group, the same method applies as per the above SmartObject method implementation.

The following steps show how to set up the Plan per slot (no destinations) planning option in order to return a list from an XML repeating group node to have access to all properties in the group:

  1. Follow the steps as per above up to step 6.
  2. Drag the repeating group node into the Plan per slot (no destinations) planning option (not any of the properties, the main repeating group node). This will cause the InstanceData to contain something like “<repeating><property1>val1</property1><property2>val2</property2> etc… </repeating>” at runtime.
  3. Create an Activity level XML Field (not shared), that contains a group node (not repeating) with the same name, structure and properties as the main XML Field you are working from.
  4. Add a Data Event to the activity, select the Transfer Data option and click Assign. Drag an Expression from the Function browser into the source.
  5. Create a string Data Field with an initial value of <XmlDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">. A string Data Field is used as typing this value into the expression will cause a validation error.
  6. Drag this Data Field into the Expression, then add a “&” (without quotes), drop the ActivityInstanceDestination_InstanceData field, and add another “&” (without quotes) and then type “</XmlDocument>” (with quotes)
  7. Finish the expression
  8. Drag the entire Activity level XML Field as created above, into the destination field on the Assign Mapping.
  9. Now you have each repeated node inside a non repeating structure where you can use each property from the activity level XML Field individually.

The above implementation is only for illustration purposes and will differ for other scenarios.