Package org.jbpm.workflow.instance

Examples of org.jbpm.workflow.instance.WorkflowProcessInstance


  }

  public static void addDynamicSubProcess(
      DynamicNodeInstance dynamicContext, KnowledgeRuntime ksession,
      String processId, Map<String, Object> parameters) {
    WorkflowProcessInstance processInstance = dynamicContext.getProcessInstance();
    SubProcessNodeInstance subProcessNodeInstance = new SubProcessNodeInstance();
      subProcessNodeInstance.setNodeInstanceContainer(dynamicContext);
    subProcessNodeInstance.setProcessInstance(processInstance);
    Process process = ksession.getKnowledgeBase().getProcess(processId);
        if (process == null) {
          System.err.println("Could not find process " + processId);
          System.err.println("Aborting process");
          processInstance.setState(ProcessInstance.STATE_ABORTED);
        } else {
          ProcessEventSupport eventSupport = ((InternalProcessRuntime)
          ((InternalKnowledgeRuntime) ksession).getProcessRuntime()).getProcessEventSupport();
        eventSupport.fireBeforeNodeTriggered(subProcessNodeInstance, ksession);
        ProcessInstance subProcessInstance = (ProcessInstance)
View Full Code Here


public class DynamicUtils {
 
  public static void addDynamicWorkItem(
      DynamicNodeInstance dynamicContext, KnowledgeRuntime ksession,
      String workItemName, Map<String, Object> parameters) {
    WorkflowProcessInstance processInstance = dynamicContext.getProcessInstance();
    WorkItemImpl workItem = new WorkItemImpl();
    workItem.setState(WorkItem.ACTIVE);
    workItem.setProcessInstanceId(processInstance.getId());
    workItem.setName(workItemName);
    workItem.setParameters(parameters);
    WorkItemNodeInstance workItemNodeInstance = new WorkItemNodeInstance();
      workItemNodeInstance.setNodeInstanceContainer(dynamicContext);
    workItemNodeInstance.setProcessInstance(processInstance);
View Full Code Here

TOP

Related Classes of org.jbpm.workflow.instance.WorkflowProcessInstance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.