IBM BPM, V8.0.1, All platforms > Create processes in IBM Process Designer > Modeling processes > Modeling events > Use ad hoc events

Building a sample ad hoc action

This example shows how to model an ad hoc action that enables users to view the contents of a requisition at any time during normal processing of the requisition.

For the following example, you can use the Standard HR Open New Position BPD included in the Hiring Sample process application. (If you do not see the Hiring Sample process application in your list of applications in the Process Center Console, ask your IBM BPM administrator to give you access.) To do so, clone a snapshot of the Hiring Sample process application so that your changes do not affect other users of IBM Process Designer.


Procedure

  1. Open the BPD in Process Designer and click the Diagram tab.

  2. Drag a swimlane from the palette to the diagram.
  3. Right-click the new lane and select Move Lane Down until the new lane is the last lane in the BPD (below the System lane).

  4. Click the new lane in the diagram (named Untitled 1 by default) and in the Name field in the properties, type Ad hoc event .

  5. Drag a start event from the palette onto the BPD diagram so that it is positioned in the new Ad hoc event lane.

  6. In the text box that displays over the start event , type Show Requisition Data for the event name.

  7. Click the Implementation tab in the Properties view and select Ad Hoc from the available start event types. If you wanted to restrict the users who can perform the action, you could also associate a specific participant group with the swimlane and then in the Event Visibility section specify that the event visibility is restricted by swimlane.

  8. Drag an activity from the palette into the Ad hoc event lane.

  9. In the text box that displays over the user task,, type Show Data for the user task name.

  10. Drag an end event from the palette onto the BPD diagram so that it is positioned after the Show Data activity in the Ad hoc event lane and optionally name the end event.

  11. Using the Sequence Flow tool, connect the Show Requisition Data start event, the Show Data activity, and the end event on the BPD diagram.
  12. Right-click the Show Data activity and select Activity Wizard from the list of options.

  13. In the Activity Wizard - Setup Activity window, make the following selections:

    Recommended selections in the Activity Wizard - Setup Activity window
    Option Selection
    Activity Type User Task
    Service Selection Select the Create a New Service or Process option.

    In the Name field, type Show Data for the new service. (For this example, name the new Human service the same as the corresponding activity in the BPD.)

  14. In the Activity Wizard - Setup Activity window, click Next.

  15. In the Activity Wizard - Parameters window, choose the process variables from the regular process to use as input and output for the new service for the ad hoc process.

    For the private variable named requisition, leave the Input field set to true and change the Output field to false. These settings reflect the fact that our sample ad hoc event simply displays the requisition data and does not pass back modified data. For other variables, click to change the setting from true to false under the Input and Output field. Click Finish.

    The new service is created and attached to the activity. The new service includes a single Coach.

  16. Double-click the Show Data activity in the Ad hoc event lane in the BPD.

    The new service opens and you can see the service diagram.

  17. Click the Coaches tab and then click the listed Coach to see its controls.

    Because we used the Activity Wizard, the Coach includes a form element for each of the parameters in the requisition variable.

  18. Save your work and then follow the instructions in Testing a sample ad hoc action.

Use ad hoc events


Related concepts:
Hiring Sample for Process Designer