throw new SuspendedEntityInteractionException("task " + id + " is suspended");
}
}
public UserTask getBpmnModelElementInstance() {
BpmnModelInstance bpmnModelInstance = getBpmnModelInstance();
if(bpmnModelInstance != null) {
ModelElementInstance modelElementInstance = bpmnModelInstance.getModelElementById(taskDefinitionKey);
try {
return (UserTask) modelElementInstance;
} catch(ClassCastException e) {
ModelElementType elementType = modelElementInstance.getElementType();
throw new ProcessEngineException("Cannot cast "+modelElementInstance+" to UserTask. "