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.
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();