WebSphere Lombardi Edition 7.2 > Modeling processes > Advanced modeling tasks > Manage and mapping variables


Set variables in pre and post assignments

You can set pre and post assignments for variables when you want to assign a value to a variable immediately before or after an activity or event executes in a running process. You can also set pre and post assignments for components in a service, such as a Coach or a Server Script component.

For example, if you want to send an email message to end users as soon as an activity is active and can be completed, you can attach a timer event to the activity and use a post assignment to place the task ID into a variable so that it can be passed to the follow-on activity that sends the email message. The task ID is needed so that the email message sent to end users includes information about the task to complete.

  1. In the Designer in Lombardi Authoring Environment, open a BPD that includes an activity or event that requires a pre or post assignment.
  2. Click the activity or event in the BPD diagram and then select the Pre & Post option in the properties.
  3. To add an assignment, click the plus sign for either Pre Assignments or Post Assignments.

    For this example, click the plus sign for Post Assignments to assign the task ID to a variable

  4. In the text box on the left, click the variable icon to choose the variable that you have declared in the current BPD to contain the task ID.
  5. In the text box on the right, type tw.system.findTaskByID(taskID). (The type-ahead feature in the Designer enables you to see all available Lombardi JavaScript objects.)

    With the post assignment, the ID for the task is set and available as input for the follow-on activity and the service that you build to implement it.

    When you set a pre or post assignment for an activity, the activity in the BPD diagram includes a diamond-shaped indicator in the upper left (pre assignment) or upper right (post assignment) corner.

Parent topic: Manage and mapping variables

+

Search Tips   |   Advanced Search