How to get the process instance id using expression?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 03:33 PM
I'm playing with Activiti Enterprise trial, and I'm developing a workflow where I have to create a identification for the workflow.
As what I need is to have a unique id, I thought about getting the instance id and use it.
Is there an easy way to get that value and set it as a form field?
At the end of the process, I have a Publish to Alfresco task, and I would like to use that value as the destination folder inside Alfresco.
If that is not an option, can you please suggest another idea?
Thank you.
As what I need is to have a unique id, I thought about getting the instance id and use it.
Is there an easy way to get that value and set it as a form field?
At the end of the process, I have a Publish to Alfresco task, and I would like to use that value as the destination folder inside Alfresco.
If that is not an option, can you please suggest another idea?
Thank you.
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 07:57 PM
process instance id can be used to uniquely identify an instance. If you want to display this id in your form, you can do the following:
Define a variable at the process level in your BPMN xml.
In your task forms, use a display value or display text field to show this variable.
After the process instance is started, you can use a script task/execution listener to set this variable value to process instance id.
Eg: If your variable name is "processId", you can set it as execution.setVariable("processId",execution.getProcessInstanceId())
Cheers,
Define a variable at the process level in your BPMN xml.
In your task forms, use a display value or display text field to show this variable.
After the process instance is started, you can use a script task/execution listener to set this variable value to process instance id.
Eg: If your variable name is "processId", you can set it as execution.setVariable("processId",execution.getProcessInstanceId())
Cheers,
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 08:10 PM
Interesting.
I'm going to try it.
Thank you so much.
I'm going to try it.
Thank you so much.
