WebSphere Lombardi Edition 7.2 > Modeling processes > Advanced modeling tasks


Use external activities

External activities enable you to create Business Process Definitions (BPDs) that include activities that are handled by systems outside of Lombardi. For example, you can model an activity that is executed by an Eclipse RCP or Microsoft .NET application.

To create external activities in Lombardi Authoring Environment, you must enable Lombardi Developer Capability and Lombardi Advanced Features. Enable these capabilities by selecting File > Preferences > Capabilities from the main menu.

To use an external activity to implement a step in a business process definition (BPD), you must complete the following tasks in the order shown:

Task See...
1. Build a custom application using the Lombardi Web API to execute an activity (step) in a BPD Build a custom application to implement an activity
2. Create an external activity in the Designer view in Lombardi Authoring Environment Create an external activity
3. Select the external activity as the implementation for an activity (step) in a BPD Select an external activity to implement


Build a custom application to implement an activity

To build a custom application to implement an activity (step) within a process, you must use the Lombardi Web API to enable your custom application to interact with Lombardi. For example, the Lombardi Web API provides operations that enable you to pass variables from a Lombardi BPD to a custom application and then back to the BPD for continued processing. For more information, see Lombardi Developer's Guide.


Create an external activity

When you create an external activity in the Designer view in Lombardi Authoring Environment, you need to know the properties to use to identify and execute the custom application. If you did not build the custom application, you need to coordinate with the developers to ensure that you provide the appropriate properties in Lombardi Authoring Environment.

  1. In the Designer view, click the plus sign next to Implementation and select External Activity from the list of components.

  2. Supply a descriptive name for the new external activity.

  3. Click Finish.

  4. In the Common section of the External Activity dialog, optionally provide a description for the activity in the Documentation text box.

  5. In the Custom Properties section, specify the properties to identify and execute the external activity.

    For example, for an external Eclipse RCP application, you might add custom properties to pass the Java Class name of the form to use for the activity or an application-specific identifier to look up the implementation by another means. Alternatively, you might use the external activity name or system ID to find the implementation.

    You can add custom properties to pass static metadata about the activity to the external application. For dynamic data, which would be different for each process instance or environment, use the Parameter Details section of the dialog as outlined in the following step.

  6. In the Parameter section of the dialog, add the parameters for the activity by clicking Add Input or Add Output.

    For example, if the external activity provides an interface in which a manager can either approve or reject an expense report, it might include input parameters for the expense report data and output parameters for the decision that the manager makes and the justification for his decision.

    Be sure to account for all process data that the external activity requires to complete successfully and also for any data required from the external activity by subsequent activities.

  7. Click Save in the main toolbar.


Select an external activity to implement

The following steps describe how to select a custom application as the implementation for an activity in a BPD:

  1. Open a business process definition (BPD) in the Designer.

  2. In the BPD diagram, click the activity that you want to implement using a custom application.

  3. Click the Implementation tab in the properties.

  4. Under Implementation, select the External Activity option from the drop-down menu.

  5. Click the Select button to choose an external activity from the library.

    If the external activity has not been created, click the New button and follow the steps in Create an external activity to create a new external activity.

  6. In the Task Header section, specify the following properties:

    Subject Type a descriptive subject for the task that is generated in Lombardi Process Portal when you run the BPD. You can also use the Lombardi embedded JavaScript syntax (for example, <#=tw.local.mySubject#>) to express the subject.
    Narrative Type an optional description. You can also use the Lombardi embedded JavaScript syntax to express the narrative.

    For the following properties (in the Priority Settings section) you can click the JS button for an option if you prefer to use a JavaScript expression with predefined variables to establish the priority settings.

  7. For the Priority field, click the drop-down list to select one of the default priority codes: Very Urgent, Urgent, Normal, Low, or Very Low.

  8. For the Due In field, you can enter a value in the text box and then choose Minutes, Hours, or Days from the drop-down list. (When you choose Days, you can use the text box after the drop-down list to include hours and minutes in your specification.)

    You also have the option of using the variable selector next to the text box to choose an existing variable from the library. At run-time, the variable should reflect the value that you want for the time period. Be sure to select the option that you want from the drop-down list: Minutes, Hours, or Days.

  9. For the Time Period field, click the drop-down list to select one of the options. For example, select 24x7 if you want 24 hours a day, seven days a week to be the time period in which the resulting tasks from the current activity can be due.

    You can leave the Schedule, Timezone, and Holiday Schedule fields set to (use default). If you do, the work schedule specified for the BPD is used. See Set the work schedule for a BPD for more information.

  10. For the Time Zone field, click the drop-down list to select the time zone that you want to apply to the tasks that result from the current activity. For example, you can select US/Pacific for end users who work in California.

  11. For the Holiday Schedule field, you can leave the setting at (use default) or you can click the JS button if you prefer to use a JavaScript expression. Each Holiday Schedule is made up of a list of Dates.

    If you choose JavaScript, you can enter either a String (or String-generated JavaScript) or JavaScript that returns a TWHolidaySchedule variable. If you use a String, then Lombardi looks up the holiday schedule by name according to those rules. If you use a TWHolidaySchedule variable, then Lombardi assumes that the holiday schedule is filled in appropriately. (Go to the System Data toolkit and open the TWHolidaySchedule variable to view its parameters.)

  12. Click the Data Mapping tab in the properties.

    Because you added the input and output parameters for the external activity when you created it, the Data Mapping tab for the activity in the BPD should include those parameters.

    Under Input Mapping, click the auto-map icon in the upper-right corner, and then click the auto-map icon in the upper-right corner of the Output Mapping section.

  13. Save the implementation.

Parent topic: Advanced modeling tasks

+

Search Tips   |   Advanced Search