Search in sources :

Example 1 with AssignmentAction

use of org.jbpm.process.instance.impl.AssignmentAction in project jbpm by kiegroup.

the class WorkItemNodeInstance method handleAssignment.

private void handleAssignment(Assignment assignment) {
    AssignmentAction action = (AssignmentAction) assignment.getMetaData("Action");
    try {
        ProcessContext context = new ProcessContext(getProcessInstance().getKnowledgeRuntime());
        context.setNodeInstance(this);
        action.execute(getWorkItem(), context);
    } catch (Exception e) {
        throw new RuntimeException("unable to execute Assignment", e);
    }
}
Also used : WorkflowRuntimeException(org.jbpm.workflow.instance.WorkflowRuntimeException) AssignmentAction(org.jbpm.process.instance.impl.AssignmentAction) ProcessContext(org.drools.core.spi.ProcessContext) WorkflowRuntimeException(org.jbpm.workflow.instance.WorkflowRuntimeException) WorkItemHandlerNotFoundException(org.drools.core.WorkItemHandlerNotFoundException)

Aggregations

WorkItemHandlerNotFoundException (org.drools.core.WorkItemHandlerNotFoundException)1 ProcessContext (org.drools.core.spi.ProcessContext)1 AssignmentAction (org.jbpm.process.instance.impl.AssignmentAction)1 WorkflowRuntimeException (org.jbpm.workflow.instance.WorkflowRuntimeException)1