Bug 826515

Summary: WorkItem cannot be added to adhoc process - Unknown node id: 0
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Radovan Synek <rsynek>
Component: jBPM 5Assignee: Kris Verlaenen <kverlaen>
Status: MODIFIED --- QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.0.GA   
Target Milestone: ---   
Target Release: future   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Radovan Synek 2012-05-30 11:49:46 UTC
Description of problem:
After adding new work item to adhoc process instance, exception occurs when trying to fire event: eventSupport.fireBeforeNodeTriggered(workItemNodeInstance, session);

Similar exception is thrown from:
session.getWorkItemManager().completeWorkItem(wi.getId(), new java.util.HashMap<String, Object>());

This issue is thanks to Kris already fixed in project - master branch (there is also the test case):
https://github.com/droolsjbpm/jbpm/commit/5897d9f79cb40654e85543fc9b55f7f0572ea520

stacktrace:
Unknown node id: 0
org.jbpm.workflow.core.impl.NodeContainerImpl.getNode(NodeContainerImpl.java:62)
at org.jbpm.workflow.core.impl.WorkflowProcessImpl.getNode(WorkflowProcessImpl.java:50)
at org.jbpm.workflow.core.impl.WorkflowProcessImpl.internalGetNode(WorkflowProcessImpl.java:54)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.getNode(NodeInstanceImpl.java:100)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.getNodeName(WorkItemNodeInstance.java:306)
at org.jboss.qa.brms.jbpm.tools.DebugProcessEventListener.formatNodeMessage(DebugProcessEventListener.java:75)
at org.jboss.qa.brms.jbpm.tools.DebugProcessEventListener.beforeNodeTriggered(DebugProcessEventListener.java:55)
at org.drools.event.ProcessEventSupport.fireBeforeNodeTriggered(ProcessEventSupport.java:88)