How to add the process variable in process instance ? Example ?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2014 08:11 AM
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2014 04:56 AM
There are various ways of adding variables. Eg, when starting a process:
On a running process-instance:
Look at the runtimeServcie API for more methods related to variables. Read all javadocs of the API-classes to get a good overview of what is possible…
Map<String, Object> vars = new HashMap<String, Object>();
vars.put("variableToSet", 123);
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("processKey", vars);
On a running process-instance:
runtimeService.setVariable(processInstance.getId(),"varToSet", 456);
Look at the runtimeServcie API for more methods related to variables. Read all javadocs of the API-classes to get a good overview of what is possible…
