cancel
Showing results for 
Search instead for 
Did you mean: 

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

demouser
Champ in-the-making
Champ in-the-making
How to add the process variable in process instance ? Example ?
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
There are various ways of adding variables. Eg, when starting a process:


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…
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.