Monday, August 29, 2011

Dynamic Subprocess in OBPM

Dynamic subprocess is to determine subprocess at runntime. The process below


could be changed to


Pros: Simplifies the design

Cons: Lose visibility of what is being done.

To use dynamic subprocess, a Process Interface has to be created.


The result is


Add a subflow image  in the High Level Process. Select “Dyanmic Process invocation”, in the Related Process select the Process Interface.


Click Argument mapping, the input should like this


The targetProcessName mapping is the key to get the dynamic  invocation to work correctly. The values stored in the delivery.service variable will either be “Freight” or “Package” based on the package weight. The “service” is a virtual field on Delivery (BPM Object).


Here is the code for ReadAccess

String serviceToReturn;

if (this.weight < 151) {
serviceToReturn = "Package";
else {
serviceToReturn = "Freight";

return serviceToReturn;

The two processes to dynamically invoke are actually named “FreightSubprocess” and “PackageSubprocess”. They are the Id of the process.

The exp file is in Avio-OBPM Training\Dynamic Subprocess\

In this example, it also introduces a way to declare presentation file at runtime.

Open Freight Subprocess, select the Main Task of “Enter Freight Information”



Click edit button, and you can see the code

This is PBL

input delivery using selectedPresentation = "Freight_Delivery"

This is Java

input(delivery, selectedPresentation : "Freight_Delivery");

No comments:

Post a Comment