WebSphere Lombardi Edition 7.2 > Modeling processes > Advanced modeling tasks > Modeling events


Modeling timer events

You can use timer events to specify a time interval after or before which some activity is performed, or another path in your process is taken. You can attach a timer event directly to an activity in your BPD or connect a timer event to other process steps using sequence lines. The following table describes the options:

Timer event type Description Use to model...
Attached timer event Attached directly to an activity in a BPD Escalation paths
Intermediate timer event Connected to other process steps using sequence lines Delay timers


Use attached timer events

When a running process instance reaches an activity with an attached timer event, a timer is started. The time interval for the timer is calculated according to the configuration that you specify in the implementation properties for the timer event. When the specified time interval has elapsed, the process follows the sequence line that flows from the attached timer event to a subsequent activity.

The following example shows how to model an escalation path using an attached timer event. In this example, if the activity takes longer to complete than the defined period of time, the timer event is triggered and the process follows the path from the attached timer to the escalation activity.

For the following example, you can use the HR Open New Position BPD included in the Quick Start Tutorial process application. (If you do not see the Quick Start Tutorial process application in your list of applications in the Process Center Console, ask your Lombardi administrator to give you access.) To do so, clone the Quick Start Tutorial process application so that your edits do not affect other users of Lombardi Authoring Environment. When a BPD includes review and approval activities, you may want to include escalation paths like the one in the following example to help ensure timely completion of the overall process.

  1. Open the BPD in the Designer and click the Diagram tab.
  2. Drag a Timer Event component from the palette to the Approve/reject position activity.

    The event is anchored to the activity. To verify this, select the activity. If the activity's outline includes the event, the event is properly attached.

  3. Select the Timer Event component in the BPD diagram and then click the Implementation option in the properties.
  4. In the Attached Event Details section, disable the Close Attached Activity check box.

    This check box closes the attached activity when the timer event is triggered, which is not the required behavior in this example. In this example, the end user should complete the activity when he receives the escalation notice.

  5. From the Trigger On drop-down list, select After Due Date.

    This selection causes the event to trigger when the due date for the activity has elapsed. The due date is calculated according to the work schedule for the BPD and the priority settings for the activity.

    If you choose to trigger before or after a custom date, you can enter the JavaScript to determine the custom date in the Custom Date text box. Your script must return a Date object, specifying when the timer is to be executed.

  6. In the Before/After Difference text box, type 1 and then select Days from the associated drop-down list.

    This causes the example event to trigger one day after the activity's due date.

    To use a variable to specify this value, click the variable icon next to the text box and select the variable that you want.

  7. Leave the value in the Tolerance Level text box at 0.

    The tolerance level enables you to delay the timer event for a specified amount of time. For example, you could specify a tolerance level of one hour if you wanted the escalation to occur one day and one hour after the activity's due date.

    To use a variable to specify this value, click the variable icon next to the text box and select the variable that you want.

  8. Drag an activity component from the palette into the System lane.
  9. While the activity is still selected, in the Step tab in the properties, enter the name: Escalation Notification.
  10. Drag an End Event component from the palette into the System lane and position it directly after the activity created in the preceding steps.
  11. From the palette, click to select the Sequence Flow tool and then add a sequence line from the attached timer event to the new Escalation Notification activity, and from that activity to the End Event component as shown in the following image:

  12. You can complete the escalation path by building an underlying service to implement the Escalation Notification activity. You can use the Send Alert component for the underlying service.
  13. You can attach more than one timer event to an activity. Using this example, you can attach another timer event to the activity that triggers two days after the due date has passed, thereby providing multiple notifications should the end user fail to perform the task after the first notification is received.


Use intermediate timer events

If a timer event is not attached to an activity, it causes a delay. The process waits for the timer to trigger before proceeding to the next activity. For example, if your BPD includes an activity that emails offers to customers and you want your internal sales team to follow up two days after the offers are mailed, you can place a timer between the two activities as shown in the following image.

The following image shows a sample delay timer event. In the sample, the delay ensures that a specific amount of time passes between the completion of one activity and the start of another.

You can set the properties for the intermediate timer event in the same way as outlined for attached timer events in the preceding section. The only difference is that there are no Attached Event Details options.

Parent topic: Modeling events

+

Search Tips   |   Advanced Search