Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JBPM - WorkItemNode cannot be cast to org.jbpm.workflow.core.node.HumanTaskNode

Tags:

java

jbpm

I'm reading the URL for Rest Service Tasks from custom WorkItem in JBPM - Business Central and in one case I have HumanTask before the reader, the WorkItem task, so it throws the exception bellow and i'm stuck. How can i fix this?

Unexpected error during processing org.jbpm.workflow.core.node.WorkItemNode cannot be cast to org.jbpm.workflow.core.node.HumanTaskNode: java.lang.ClassCastException: org.jbpm.workflow.core.node.WorkItemNode cannot be cast to org.jbpm.workflow.core.node.HumanTaskNode

image

Is it having work item after a human task right move? If not how can I take the URL I'm getting in work item? How can I fix this? Should I change the flow in order to fix it?

like image 893
xmlParser Avatar asked Feb 11 '26 16:02

xmlParser


1 Answers

I have come across into the same problem quite a few times. It happens if you rebuild an artifact (e.g. for a hotfix, add an input or output variable in a task etc) in a version of some workflow and you have active instances with the same version in your runtime environment. Most probable cause is a mismatch in the byteArray which is saved in the ProcessInstanceInfo table in the database. Whenever I have experienced this error the particular instance becomes corrupt irrecoverably.

like image 106
kpoasn Avatar answered Feb 15 '26 12:02

kpoasn