Friday, September 30, 2011

obpm: update attribute value of process instance from another process

Before, I was using “message wait event” + “notification” to change an attribute value of one process from another process. It is not a good way to do that. I got the error “The maximum number of instances has been exceeded” from obpm.

The proper way to do it is through “global activity”. Create a global activity in the process which attribute will be changed.


The code is quite simple

if (externalIdArg != null ) {
    ticket.ticketId = externalIdArg;
    logMessage("external Id is updated" + externalIdArg, severity : Severity.INFO);


From external, if you are using PAPI and you have the instance.

args["externalIdArg"] =;  
instance.runTask(activity : "setExternalId", args : args);

Or you can use PAPI Web Service to call it from external.

No comments:

Post a Comment