Examples of FlowNode


Examples of org.camunda.bpm.model.bpmn.instance.FlowNode

  public SubProcessBuilder subProcess(String id) {
    return createTarget(SubProcess.class, id).builder();
  }

  public Gateway findLastGateway() {
    FlowNode lastGateway = element;
    while (true) {
      try {
        lastGateway = lastGateway.getPreviousNodes().singleResult();
        if (lastGateway instanceof Gateway) {
          return (Gateway) lastGateway;
        }
      }
      catch(BpmnModelException e) {
        throw new BpmnModelException("Unable to determine an unique previous gateway of " + lastGateway.getId(), e);
      }
    }
  }
View Full Code Here

Examples of org.camunda.bpm.model.bpmn.instance.FlowNode

    }
    else if (!(target instanceof FlowNode)) {
      throw new BpmnModelException("Unable to connect " + element.getId() + " to element " + identifier + " cause its not a flow node.");
    }
    else {
      FlowNode targetNode = (FlowNode) target;
      connectTarget(targetNode);
      return targetNode.builder();
    }
  }
View Full Code Here

Examples of org.eclipse.bpmn2.FlowNode

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.FLOW_NODE: {
            FlowNode flowNode = (FlowNode) theEObject;
            T result = caseFlowNode(flowNode);
            if (result == null)
                result = caseFlowElement(flowNode);
            if (result == null)
                result = caseBaseElement(flowNode);
View Full Code Here

Examples of org.eclipse.bpmn2.FlowNode

  private java.lang.String opinion;

  public void execute(ExecutionContext executionContext) throws Exception {
   
    FlowNode flowNode=executionContext.getTimeOutNode();
    if(flowNode==null){
      flowNode=executionContext.getToken().getFlowNode();
    }else{
      executeOld(executionContext);
      return;
View Full Code Here

Examples of org.eclipse.bpmn2.FlowNode

   
  }
 
  public void executeOld(ExecutionContext executionContext) throws Exception {
   
    FlowNode flowNode=executionContext.getTimeOutNode();

    UserTaskBehavior userTask=null;
    TokenEntity token=executionContext.getToken();
    if(flowNode instanceof UserTask){
      userTask=(UserTaskBehavior)flowNode;
View Full Code Here

Examples of org.eclipse.bpmn2.FlowNode

  }

  private void setSubProcess(SubProcess subProcess) {
    for (FlowElement flowElement : subProcess.getFlowElements()) {
      if (flowElement instanceof FlowNode) {
        FlowNode flowNode = (FlowNode) flowElement;
        flowNode.setSubProcess(subProcess);
        if (flowElement instanceof SubProcess) {
          setSubProcess(subProcess);
        }
      }
    }
View Full Code Here

Examples of org.eclipse.bpmn2.FlowNode

   * <!-- 开始-用户-文档 --> 返回流程定义的启动节点 <!-- 结束-用户-文档 -->
   *
   * @return 开始节点
   */
  public FlowNode getStartElement() {
    FlowNode startElement;

    for (FlowElement flowElement : this.getFlowElements()) {
      if (flowElement instanceof StartEventBehavior) {
        startElement = (FlowNode) flowElement;
        StartEventBehavior startEventBehavior = (StartEventBehavior) flowElement;
View Full Code Here

Examples of org.eclipse.bpmn2.FlowNode

  }

  public UserTask getSubTask() {

    FlowNode flowNode = getStartElement().getOutgoing().get(0).getTargetRef();
    if (flowNode instanceof UserTask) {
      UserTaskBehavior userTask = (UserTaskBehavior) flowNode;
      return userTask;
    }
    /*
 
View Full Code Here

Examples of org.eclipse.bpmn2.FlowNode

    if (startEvent == null) {
      return null;
    }

    FlowNode flowNode = startEvent.getOutgoing().get(0).getTargetRef();
    if (flowNode instanceof UserTask) {
      UserTaskBehavior userTask = (UserTaskBehavior) flowNode;
      return userTask;
    }
    throw new FixFlowException("流程启动节点后面没有提交节点! ");
View Full Code Here

Examples of org.eclipse.bpmn2.FlowNode

    ProcessDefinitionBehavior processDefinition=processInstance.getProcessDefinition();
    //获取指定的节点
    BaseElement baseElement=processDefinition.getDefinitions().getElement(nodeId);
    if(baseElement instanceof FlowNode){
     
      FlowNode flowNode= (FlowNode)baseElement;
      ExecutionContext executionContext=ProcessObjectFactory.FACTORYINSTANCE.createExecutionContext(token);
      //让令牌进入节点开始走流程
      flowNode.enter(executionContext);
     
    }else{
     
    }
    commandContext.getProcessInstanceManager().saveProcessInstance(processInstance);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.