cancel
Showing results for 
Search instead for 
Did you mean: 

ActivitiEngine object coming as null (prompt response is appreciated)

penusila611621
Champ in-the-making
Champ in-the-making
I am very new to activiti, i have build a simple process in process designer(eclipse plugin) and trying to run the process from java class.

ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();

have attached the java class and the red colord statement as provided above is returning null.

also attched the activiti-cfg file i am trying with this example. Have tried with h2 database properties in xml file and also with out h2 database properties.

In details
………..
1. have downloaded the activiti 5.14 distribution
2. Downloaded eclipse 5.14.1 and setup the activiti project
3. created a simple business process
4. created junit test java class and this had generated the java code as attached
5. commented few lines in the java class to know excatly what's happening step by step
6. but the first step (ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
) where processEngine is null so I am getting NullPointer exception

Please advise is there anything I am missing here
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
Since you are using the ActivitiRule, you need to get all services from that.

>prompt response is appreciated

Everyone here appreciates that, no need to mention it 😉