Tasklist startProcess "start event" form from Java

Hello All,
This is my first “Topic” because after searching this info extensively I am unable to figure it out.

My issue is with the start process event and its associated form.
I know there is a JSF way to start a process instance with the “listener=”#{camundaTaskForm.startProcessInstanceByKeyForm()}“” thing but I want to use the Java API, something like this:

ProcessInstance pi =processEngine.getRuntimeService().startProcessInstanceByKey(“My_bpm”);

The problem that I am facing is that the process starts but it does not redirect my app to the associated “Form Key” page of the Start Event and the workflow continues to the next BPM item.

I tried with “embedded:app:myForm.xhtml” and “app:myForm.xhtml”.
I really do not know how to make the BPM process wait in the “start event” item while it redirects to the configured form.

The only way it redirects to that configured form is when I press “Start Process” from the Tasklist interface. I want to do that programmatically from my Java application.

Any suggestions are welcome.
Sorry for my poor English/explanation, hopefully you guys understand it.
Thanks in advance,
Adolfo

You’ll probably want to try the form service to start an instance with a start form.

1 Like

Thank you Justin for your quick response. The truth is that I already resolved the issue. The problem was related to the process synchronization, but the form service that you mentioned is a good candidate for me to try the next time around.
Cheers,
Adolfo

1 Like