BPMN: current execution id, process instance id

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2011 08:44 AM
Is it possible to get the id of the current execution and/or of the current process instance within BPMN?
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2011 03:18 PM
I do not have a real clue what you mean. If you are in a process instance, you have already access to it… Or do you mean as an expression in e.g. a java task somewhere?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2011 04:36 AM
Yes as an expression. I want to call a service using a service task and one of the parameter shall be the process instance id and/or execution id.
For example:
For example:
…
<scriptTask id="scripttask1" name="Prepare Params" scriptFormat="groovy">
<script><![CDATA[
piid = [processInstanceId];
eid = [executionId];
]]></script>
</scriptTask>
…
<serviceTask id="servicetask" name="" activiti:expression="#{myService.doSomething(piid, eid)}"></serviceTask>
…
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2011 05:31 AM
In expressions (http://activiti.org/userguide/index.html#apiExpressions), you can use:
In script-tasks, unfortunately, the execution (DelegateExecution) is not yet exposed (only the variables). Can you create a JIRA improvement for this?
<serviceTask id="servicetask" name="" activiti:expression="#{myService.doSomething(execution.id, execution.processInstanceId)}"></serviceTask>
In script-tasks, unfortunately, the execution (DelegateExecution) is not yet exposed (only the variables). Can you create a JIRA improvement for this?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2011 12:51 PM
