AnsweredAssumed Answered

hello world

Question asked by sarra1 on Jun 17, 2013
Latest reply on Jan 22, 2015 by ronit_taranekar
Hi, I'm a beginner in activiti , i try to run a simple process hello world:


import org.activiti.DbProcessEngineBuilder;
import org.activiti.ProcessEngine;
import org.activiti.ProcessService;



public class RunProcess {

   public static void main(String [ ] args){
      //First, boot up the process engine:
      ProcessEngine processEngine = new DbProcessEngineBuilder().configureFromPropertiesResource("activiti.properties").buildProcessEngine();
      ProcessService processService = processEngine.getProcessService();

      //To run the process, it first need to be ‘deployed’ to the engine.
      //Deploying means that the process is parsed and stored in the Activiti database:
      processService.createDeployment().addClasspathResource("hello-world.bpmn20.xml").deploy();

      //execute the process
      processService.startProcessInstanceByKey("helloWorld");
      }
      }


Hi,
———–
I am getting following error while executing the program.
——————–
juin 17, 2013 12:19:48 PM org.activiti.impl.ProcessEngineImpl <init>
INFO: ProcessEngine default created
Exception in thread "main" org.activiti.ActivitiException: couldn't read input stream hello-world.bpmn20.xml
   at org.activiti.impl.util.IoUtil.readInputStream(IoUtil.java:36)
   at org.activiti.impl.repository.DeploymentBuilderImpl.addInputStream(DeploymentBuilderImpl.java:43)
   at org.activiti.impl.repository.DeploymentBuilderImpl.addClasspathResource(DeploymentBuilderImpl.java:52)
   at RunProcess.main(RunProcess.java:16)
Caused by: java.lang.NullPointerException
   at org.activiti.impl.util.IoUtil.readInputStream(IoUtil.java:30)
   … 3 more
———-

thanks

Outcomes