Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Stardust/Knowledge Base/Java API/Event Binding

< Stardust‎ | Knowledge Base‎ | Java API
Revision as of 00:44, 25 September 2013 by Robert.emsbach.fisglobal.com (Talk | contribs) (Stardust/Knowledge Base/API/JavaAPICookbook/EventHandling moved to Stardust/Knowledge Base/Java API/Event Binding: wrong page name leads to incomplete bread crumbs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Event Handling

Runtime unbinding of activity events and setting data path of process instance)

(Versions: 5.3.x)

In certain scenarios you want to unbind an event (e.g timer) associated with an activity instance during the runtime execution of your process instance, and also set the value of a data path defined for the process. The following code snippet shows how this can be achieved:

for (int i = 0; i < lActivityInstances.size(); i++) {
   Activity ai = (Activity) lActivityInstances.get(i);
   workflowService.unbindActivityEventHandler(lActivityInstances .get(i).getOID(), "timer");
   HashMap outmap = new HashMap();
   workflowService.activateAndComplete(lActivityInstances.get(i).getOID(), null, outmap);
   workflowService.setOutDataPath(lProcessInstances.get(0).getOID(),"date", outmap);
}

Copyright © Eclipse Foundation, Inc. All Rights Reserved.