JBoss Community

Capturing the initiator user

reply from Charles Aznavour in jBPM - View the full discussion

Hi Klaus,

 

we had the same requirement. We use jbpm 4.4 and create a histroy variable on process start:

 

 

String userId = ...

ProcessInstance processInstance = ....

executionService.createVariable(processInstance.getId(), "initiatior", userId, true);

 

 

The "true" makes this variable a history variable. Especially useful as you could query the database for it (we do it outside of jbpm), even for ended processes. As we also need the initiator in a swimlane during process intatiation, so we additionally pass this value as a regular process parameter in the startProcessInstance method.

 

Cheers,

Charles

Reply to this message by going to Community

Start a new discussion in jBPM at Community