Hi,
I have a process application created with Maven archetype “camunda-archetype-ejb-war-7.8.0”.
I want to start a process definition upon deployment.
In the pom file I have the depedency
> <dependency> > <!-- client for Java EE application server integration, included in WAR as an alternative to write your own ProcessApplication class --> > <groupId>org.camunda.bpm.javaee</groupId> > <artifactId>camunda-ejb-client</artifactId> > </dependency> > <dependency>
But how can I write the code to start a process definition?
If I write something like below (to have my custom process application instead of the depedency), what do I miss?:
@ProcessApplication
public class MyEjbProcessApplication extends EjbProcessApplication {
@PostDeploy
public void onDeploymentFinished(ProcessEngine processEngine) {processEngine.getRuntimeService().startProcessInstanceByKey(“My_Process”);
}
}
Thanks!