problem with my first process execution
baadr Mar 24, 2011 7:05 AMHi !
I'm a new user of JBOSS jbpm Worfkflow and I want to understand how it works so I tried to execute a simple programme that instantiate a process defined in test.jpdl.xml:
I'm using eclipse Helios as IDE.
=== Environment ==============================
<?xml version="1.0" encoding="UTF-8"?>
<process name="test" xmlns="http://jbpm.org/4.3/jpdl">
<start name="start1" g="16,18,48,48">
<transition name="to etape1" to="etape1" g="-25,-21"/>
</start>
<state name="etape1" g="96,16,92,52">
<transition name="to java" to="java" g="-15,-20"/>
</state>
<java name="java" g="220,16,92,52" class="Methode" method="invokeMe()">
<transition name="to end1" to="end1" g="-19,-19"/>
</java>
<end name="end1" g="344,18,48,48"/>
</process>
=== API ===================================
import org.jbpm.api.Configuration;
import org.jbpm.api.ExecutionService;
import org.jbpm.api.HistoryService;
import org.jbpm.api.ManagementService;
import org.jbpm.api.ProcessEngine;
import org.jbpm.api.ProcessInstance;
import org.jbpm.api.RepositoryService;
import org.jbpm.api.TaskService;
public class Exec {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
ProcessEngine processEngine = new Configuration().buildProcessEngine();
RepositoryService repositoryService = processEngine.getRepositoryService();
ExecutionService executionService = processEngine.getExecutionService();
TaskService taskService = processEngine.getTaskService();
HistoryService historyService = processEngine.getHistoryService();
ManagementService managementService = processEngine.getManagementService();
ProcessInstance processInstance = executionService.startProcessInstanceByKey("test");
String deploymentId = repositoryService.createDeployment()
.addResourceFromClasspath("test.jpdl.xml")
.deploy();
}
}
=== Stacktrace ==============================
Exception in thread "main" org.jbpm.api.JbpmException:
error: couldn't parse xml document : org.jbpm.api.JbpmException: resource jbpm.cfg.xml does not exist
error: parsing exception: null : java.lang.NullPointerException
at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:175)
at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:141)
at org.jbpm.pvm.internal.xml.Parse.checkErrors(Parse.java:190)
at org.jbpm.pvm.internal.cfg.ConfigurationImpl.parse(ConfigurationImpl.java:139)
at org.jbpm.pvm.internal.cfg.ConfigurationImpl.setResource(ConfigurationImpl.java:118)
at org.jbpm.pvm.internal.cfg.ConfigurationImpl.buildProcessEngine(ConfigurationImpl.java:76)
at org.jbpm.api.Configuration.buildProcessEngine(Configuration.java:105)
at Exec.main(Exec.java:18)
Caused by: org.jbpm.api.JbpmException
at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:171)
... 7 more
Caused by: java.lang.NullPointerException
at org.jbpm.pvm.internal.util.XmlUtil.attribute(XmlUtil.java:289)
at org.jbpm.pvm.internal.cfg.ConfigurationParser.parseDocument(ConfigurationParser.java:64)
at org.jbpm.pvm.internal.xml.Parser.execute(Parser.java:396)
at org.jbpm.pvm.internal.xml.Parse.execute(Parse.java:158)
... 5 more
=== Debug logs ==============================
paste debug logs here
=== Problem description =========================
I think : jbpm.cfg.xml does not exist.
can you help me please
NB:if there is some interesting links or tutorials that can help me to understand jbpm and how to use it will be usefull