cancel
Showing results for 
Search instead for 
Did you mean: 

Process variables for timer-started process

hyapit
Champ in-the-making
Champ in-the-making
Hello,

I need to pass in process variables map into a process that is kick-started by a start-timer event. The process seems to be started as soon I deploy my DeploymentEntity ( as noted in the document ), that I don't get a chance to pass in my params via RuntimeService.startProcessInstanceByKey(key, params).

Any advice on how to achieve this?

Thanks!

hussein
3 REPLIES 3

hyapit
Champ in-the-making
Champ in-the-making
I tried doing RuntimeService.startProcessInstanceByKey() as soon as the process definition is deployed, but that didn't seem to do anything.

hyapit
Champ in-the-making
Champ in-the-making
The reason I wasn't able to start the process as described above was because I had

.activateProcessDefinitionsOn( some_later_time ) when I define my Deployment object.

You can't start suspended process defition. Doh! I still would like to see more hooks to pass in process variables though.

jbarrez
Star Contributor
Star Contributor
You typically don't want to provide variables when using a timer start event. If you need some data in your process, you can simply attach an execution listener that adds those variables.