[JBoss JIRA] Commented: (JBPM-895) null pointer when create new sub process definition
by Ronald van Kuijk (JIRA)
[ http://jira.jboss.com/jira/browse/JBPM-895?page=comments#action_12392307 ]
Ronald van Kuijk commented on JBPM-895:
---------------------------------------
Or use late binding via the binding='late' attribute. It has one additional feature in that you will always get the latest version of the subprocess for each process you start
> null pointer when create new sub process definition
> ---------------------------------------------------
>
> Key: JBPM-895
> URL: http://jira.jboss.com/jira/browse/JBPM-895
> Project: JBoss jBPM
> Issue Type: Bug
> Components: BPEL
> Affects Versions: jBPM 3.1.3
> Reporter: Tom Nguyen
> Assigned To: Tom Baeyens
> Attachments: DbSubProcessResolver.java
>
>
> I have a problem with my process composition
> Exception happen when deploying process with sub process:
> public void deployProcessDefinition() {
> ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("main/processdefinition.xml");
> ProcessInstance instance = new ProcessInstance(processDefinition);
> JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
> try {
> jbpmContext.deployProcessDefinition(processDefinition);
> } finally {
> jbpmContext.close();
> }
> }
> java.lang.NullPointerException: can't create a process instance when processDefinition is null
> at org.jbpm.graph.exe.ProcessInstance.<init>(ProcessInstance.java:87)
> at org.jbpm.graph.exe.Token.createSubProcessInstance(Token.java:571)
> at org.jbpm.graph.node.ProcessState.execute(ProcessState.java:109)
> at org.jbpm.graph.def.Node.enter(Node.java:316)
> <?xml version="1.0" encoding="UTF-8"?>
> <process-definition
> xmlns="urn:jbpm.org:jpdl-3.1" name="main">
> <start-state name="start">
> </start-state>
> <end-state name="end"></end-state>
> <process-state name="sub">
> <sub-process name="sub"/>
> </process-state>
> </process-definition>
> This is my sub process:
> <?xml version="1.0" encoding="UTF-8"?>
> <process-definition
> xmlns="urn:jbpm.org:jpdl-3.1" name="sub">
> <start-state name="start">
> </start-state>
> <end-state name="end"></end-state>
> </process-definition>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira