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


Use ad-hoc events

To enable end users to start an ad-hoc process during the execution of another process, you can do so by using a Start Ad-Hoc Event component in your BPD. For example, you may want to enable end users to cancel an order, determine the status of an order, or perform some other ad-hoc function during the normal processing of an order. Because an ad-hoc process is executed in the context of the regular process instance, it has access to all the data of the regular process instance and can also manipulate the flow of the regular process instance, depending on the logic that you include.

To understand how end users access available ad-hoc processes, see the relevant section in Lombardi Process Portal User Guide or online help.


Build a sample ad-hoc process

The following example shows how to model an ad-hoc event that enables end users to view the content of a request for a new employee position at any time during normal processing of the requisition.

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 a snapshot of the Quick Start Tutorial process application so that your changes do not affect other users of Lombardi Authoring Environment.

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

  2. Drag a Lane component 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 on the new lane in the diagram (named Untitled 1 by default) and in the Name field in the properties, type Ad-hoc process.

  5. Notice in the Common section of the properties that the default lane assignment is All Users. To assign to one of the tutorial participant groups, click the Select button.

    For example, if only HR Managers should be able to view information about pending requisitions, select HR Managers from the list of available participant groups.

  6. Drag a Start Ad-Hoc Event component from the palette onto the BPD diagram so that it is positioned in the new Ad-hoc process lane.

  7. In the Step tab in the properties, type Show Requisition Data for the event name.

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

  9. In the Step tab in the properties, type Show Data for the activity name.

  10. Drag an End Event component from the palette onto the BPD diagram so that it is positioned after the Show Data activity in the Ad-hoc process lane.

  11. Use the Sequence Flow tool, connect the Start Ad-Hoc Event, Show Data activity, and 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 dialog, make the following selections:

    Service Type Human Service (Service with human interaction)
    Service Selection Create a New Service

    In the New Service 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 dialog, click the Next button.

  15. In the Activity Wizard - Parameters dialog, 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 process 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 the Finish button.

    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 process lane in the BPD.

    The new service opens in the Designer and you can see the 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 Run a sample ad-hoc process.


Run a sample ad-hoc process

Before you begin to test the sample ad-hoc process, open Lombardi Process Portal in a Web browser. See Lombardi Process Portal User Guide. And, ensure that you log in to Lombardi Process Portal as a member of the participant groups who receive and can complete the tasks generated by the activities in the sample BPD.

  1. In the Designer in Lombardi Authoring Environment, open the BPD to which you added an ad-hoc event

  2. Click the Run icon in the upper right corner of the BPD diagram.

  3. Lombardi Authoring Environment switches to the Inspector where you should see a new Submit requisition task.

  4. Go to Lombardi Process Portal and click the Run icon for the new Submit requisition task in your inbox.

  5. Fill out the Job Requisition information, click the Next button, and then click the Submit button on the Confirm Job Position form.

  6. When the next task for the process instance (Approve/reject requisition) displays in your inbox in Lombardi Process Portal, click the instance name or task subject to open the details page.

    If the task does not display, reload the browser page.

  7. Click the Actions menu in the toolbar, and select the name of the ad-hoc process. (The name of the process is the name that you assign the ad-hoc event that kicks off the process in the BPD diagram in Lombardi Authoring Environment. For this sample, the name is Show Requisition Data. )

    This causes Lombardi to generate a Show Data task in the Tasks area of the details page.

  8. Click the Run icon for the Show Data task. Lombardi displays the data that you entered in step 5.

  9. Click the OK button.

    Now you can continue with normal processing by completing the next task in the process instance, Approve/reject requisition. You can invoke the ad-hoc process again, after completion of the Approve/reject requisition task, to see whether the requisition has been approved.

The ad-hoc event that you added to the BPD diagram enables you to view the requisition information at any time during execution of the regular process.

Parent topic: Modeling events

+

Search Tips   |   Advanced Search