Step 1 - Defining the subtrigger

Defining a SubTrigger event type trigger is similar to defining other trigger event types. Subtriggers have Input Variables and Output Variables that can be used to pass parameters to and from the trigger that "calls" the subtrigger.

To define the example subtrigger, follow these steps:

  1. From Workbench left pane, select the Projects icon.
    The Projects window appears.
  2. Select or create the MyProject project if needed.
    The project tab appears.
  3. Select the New button at the bottom of the project tab.
  4. In the Name box, type a name for the trigger. We will use the name subtrigger.
  5. From the Event tab, select the Trigger Event Type down-arrow, and then select SubTrigger.

  6. Next, we want to specify the Input Variables and Output Variables of the subtrigger.
    Select the Input Variables button to display the Variables window.

  7. Select the Add button and add a subtrigger_in_name variable with Type of STRING and Length of 16.

  8. Select the Add button to close the New Variable window, then the OK button to close the Variables window.
  9. Select the Output Variables button to display the Variables window similar to above.
  10. Select the Add button and add a subtrigger_out_status variable with Type of STRING and Length of 16.

  11. Select the Add button to close the New Variable window, then the OK button to close the Variables window.
  12. We will now add two simple actions.
    The first action will log a message to the Exceptions Log.
    The second action will set Success! as an Output Variable.
  13. From the Actions section, select Add.
    The New Action window appears.

  14. Select Log Message and select Add to add the first action.
    Use default values except for the Message field. Enter Hello $(Name) in the Message field.

  15. Map EventVariables.subtrigger_in_name as the input Name value.

  16. From the Actions section, select Add to add the second action.

  17. Select Set and click Add.

  18. Enter Success! in the Constant field and select EventVariables.subtrigger_out_status for the Variable field.

  19. Select Validate to validate the trigger and action parameters. If there are no error reported, select Save.
    If there are errors reported, correct the errors, then select Validate again and then select Save.
Go to: Step 2 - Defining the calling trigger