AnsweredAssumed Answered

unable to execute a simple process from the demo

Question asked by dhavaln on Dec 22, 2010
Latest reply on May 30, 2012 by giga_zhang
As per the documentation I have configured the H2 and copied the financialreport process in my NetBeans project. When I am trying to execute the following code the database tables are getting affected correctly but an exception showing "no process deployed with key financialReport is coming.


        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
        RepositoryService repositoryService = processEngine.getRepositoryService();

        Deployment deployment = repositoryService.createDeployment().addClasspathResource("financialreportprocess.xml").deploy();

        processEngine.getRuntimeService().startProcessInstanceByKey("financialReport");
This is the error I am receiving upon execution.

Exception in thread "main" org.activiti.engine.ActivitiException: no processes deployed with key 'financialReport'
        at org.activiti.engine.impl.db.DbRepositorySession.findDeployedLatestProcessDefinitionByKey(DbRepositorySession.java:206)
        at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:52)
        at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:29)
        at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:22)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:37)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
        at org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceByKey(RuntimeServiceImpl.java:40)
I am new to Activiti, please help me here in case I am missing anything.

Outcomes