[
http://jira.jboss.com/jira/browse/JBPM-895?page=all ]
Tom Nguyen resolved JBPM-895.
-----------------------------
Fix Version/s: jBPM 3.1.5
Resolution: Done
The problem is this file: DbSubProcessResolver has a bug
This line
JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
jbpmContext always = null by this way
It is working If change to
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
Or create a customized sub process resolver and put it in configuration
<jbpm-configuration>
<bean name="jbpm.sub.process.resolver"
class="com.sample.DbSubProcessResolver" />
</jbpm-configuration>
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
Fix For: jBPM 3.1.5
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