cancel
Showing results for 
Search instead for 
Did you mean: 

OSGI BUNDLE ProcessEngine Configuration.

mahesh1
Champ in-the-making
Champ in-the-making
Hi,

I am using Activiti Engine(5.16.4) as OSGI bundle in Apache Sling.
This repository is pointed to mysql.
I wrote one more OSGI bundle, here i am using Activiti Engine services like Runtime Service, Task Service, etc.

My question is how to get process engine (Pointed to MySql) while runtime.

if i use  processEngine = ProcessEngines.getDefaultProcessEngine() ;
runtimeService = processEngine.getRuntimeService();, getting NullPointer exception.

please guide me how to resolve the issue.
4 REPLIES 4

trademak
Star Contributor
Star Contributor
I'm not familiar with Apache Sling. Is there any log meesage when getting the process engine with the ProcessEngines.getDefaultProcessEngine method?

Best regards,

mahesh1
Champ in-the-making
Champ in-the-making
It is throwing Null pointer exception.
Caused by: java.lang.NullPointerException: null
at com.praxeva.activiti.impl.DocuvityWorkflowServiceImpl.deployPredefinedDefinitions(DocuvityWorkflowServiceImpl.java:108)

in that line code is : repositoryService.createDeployment()
    .name("Docuvity Review")
    .addClasspathResource("DocuvityReview.bpmn20.xml")
    .deploy();

mahesh1
Champ in-the-making
Champ in-the-making
i kept the logger before and after the line:

logger.info("Inside init before getting processEngine: " );
processEngine = ProcessEngines.getDefaultProcessEngine();
logger.info("Inside init after getting processEngine: " +processEngine);

log is below :
02.12.2014 17:44:54.625 *INFO* [FelixStartLevel] com.praxeva.activiti.impl.DocuvityWorkflowServiceImpl Inside init before getting processEngine:
02.12.2014 17:44:54.625 *INFO* [FelixStartLevel] com.praxeva.activiti.impl.DocuvityWorkflowServiceImpl Inside init after getting processEngine: null

trademak
Star Contributor
Star Contributor
Is there any logging at startup related to creating a process engine?

Best regards,