Specifying a value from a collection for an automatic action

Sometimes you will want to populate a field in an automatic action using a value taken from an item in a collection. For example, if you have a recruitment process (Activity) that involves adding candidate records to the process, you could add an automatic task immediately after the Add Candidate action to invite the candidate to an interview. You could use Value Types to populate fields in this task with values taken from the corresponding Candidate record in the collection.

By default, the Value Type takes the required values from the most recently added item in the collection, so if the automatic action immediately follows the action that adds the item to the collection, you just need to specify the required attribute in the collection item. If, however, you want to specify which item in the collection you want to take the attribute value from, you can add a filter to the Value Type that selects a specific item. For example, if you have a boolean check box on the Candidate object to identify the preferred candidate, you could add a filter to a later automatic action to select the required candidate to make a recruitment offer to.

To specify a value that is taken from a collection:
  1. Open the required process in the Process Designer component.
  2. From the Toolbox, drag Automatic Action Instance onto the workspace.
    The Select Action dialog appears.
  3. Select the required action, then click OK.
    The relevant window appears for you to specify the required information.
  4. Right-click the required value, then click Value Type.
    The Control Value Selection dialog appears.
  5. Select the Specify runtime value for control option button.
  6. Navigate to and select the required value, for this example, Activity/Candidates[]/Candidate.

The [] square brackets indicate that you are selecting an item from a collection. If you click OK now, the Value Type will be selected from the most recently added item in the collection. If you want to select a different item in the collection, you need to specify a filter that will uniquely identify the required item in the collection, as described in the following steps.

  1. Select the collection node in the tree.
    The Specify a filter for the collection list boxes become available.
  2. In the Specify a filter for the collection list boxes, complete the <Select Attribute>, <Condition> and <Set Attribute Value> lists as required, then click OK.
  3. Save the changes you have made.

Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other