Index a directory resource against a global subprocess to be used during run time

Before you begin

Note: If the workflow contains multiple global subprocesses, the index operation will return only the first instance that it finds.

Procedure

  1. In the navigator, click Workflow > Workflows.
  2. In the resource list, select the workflow that you want to work with. If no workflow exists, create a new workflow.
  3. In the Displays panel, click Workflow Management > Workflow Editor.
  4. Click the Workflow Editor tab.
  5. From the workflow configuration panel, click Edit next to Local Variables, and then click Add.
  6. From the Type drop-down menu, select a variable type.
    Tip:
    • If you want to write to the local variable, from the Type field, select Object.
    • If you want to read the value of the local variable, from the Type field, select a data type, and then in the Initial Value field, set a value.
  7. Insert the Global Subprocess you want to work with.
    Note: You must have preconfigured global subprocesses available in your activities toolbox.
  8. From the workflow, double-click a process step.
  9. Drag an Index activity to the appropriate drop point.
  10. On the activity configuration panel, select Bind from the drop-down arrow next to the Collection field.
    The Select Variable dialog box appears.
  11. From the Select Variable dialog box, under Workflow properties, select Subprocesses, and then click OK.
  12. In the Index Type field, click the drop-down arrow and select DirectoryResource.
  13. In the Index field, click the ellipsis button to select the Global Subprocess that you added in Step 5.
  14. To read the results of the Index activity:
    1. Drag a Write activity to a drop point after the Index activity.
    2. Click the ellipsis button to select the variable that you want to read from the Index activity result, and then click OK.
    3. In the Value field, from the drop-down arrow, select Bind.
    4. From the Select Variable dialog box, select the local variable you added in Step 3 that you want to write to.
  15. To write to the results of the Index activity:
    1. Drag a Write activity to a drop point after the Index activity.
      Note: If you are using the same Write activity that you added in Step 12, then click Add Write.
    2. Click the ellipsis button to select the local variable that you want to read from, and then click OK.
    3. In the Value field, from the drop-down arrow, select Bind.
    4. From the Select Variable dialog box, select a variable from the result of the Index activity.
  16. Click Save.