Package org.eclipse.bpmn2

Examples of org.eclipse.bpmn2.FlowNode


    if (isLocked) {
      throw new FixFlowException("令牌已经锁定!");
    }

    try {
      FlowNode signalNode = this.getFlowNode();
 
      signalNode.leave(executionContext);

    } finally {

    }
  }
View Full Code Here


   
    flowElementNode.put(EDITOR_SHAPE_PROPERTIES, propertiesNode);
    ArrayNode outgoingArrayNode = objectMapper.createArrayNode();
   
    if (flowElement instanceof FlowNode) {
      FlowNode flowNode = (FlowNode) flowElement;
      for (SequenceFlow sequenceFlow : flowNode.getOutgoing()) {
        outgoingArrayNode.add(BpmnJsonConverterUtil.createResourceNode(sequenceFlow.getId()));
      }
    }
   
    if (flowElement instanceof Activity) {
View Full Code Here

          createEndEventTask(executionContext);
        }
      }
      // createEndEventTask(executionContext);
      if (this.getParentProcessInstanceTokenId() != null && this.getParentProcessInstanceToken() != null) {
        FlowNode flowNode = this.getParentProcessInstanceToken().getFlowNode();
        if (flowNode instanceof CallActivity) {
          CallActivityBehavior callActivityBehavior = (CallActivityBehavior) flowNode;
          startParentProcessInstance(this.getParentProcessInstanceToken(), callActivityBehavior);
        }
      }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetSourceRef(FlowNode newSourceRef, NotificationChain msgs) {
        FlowNode oldSourceRef = sourceRef;
        sourceRef = newSourceRef;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.SEQUENCE_FLOW__SOURCE_REF, oldSourceRef, newSourceRef);
            if (msgs == null)
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetTargetRef(FlowNode newTargetRef, NotificationChain msgs) {
        FlowNode oldTargetRef = targetRef;
        targetRef = newTargetRef;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.SEQUENCE_FLOW__TARGET_REF, oldTargetRef, newTargetRef);
            if (msgs == null)
View Full Code Here

     
      //发现上下文中有直接跳转节点,则流程引擎不走正常处理直接跳转到指定借点。
     
     
      //获取跳转节点
      FlowNode toFlowNode=executionContext.getToFlowNode();
     
      LOG.debug("==执行跳转机制,跳转目标: {}({}),离开节点: {}({}),令牌号: {}({}).",toFlowNode.getName(),toFlowNode.getId(), this.getName(),this.getId(),token.getName(),token.getId());
     
     
      toFlowNode.enter(executionContext);
      return;
    }
   
   
    //定义可通过线条集合
View Full Code Here

        if (incoming == null) {
            return false;
        }

        for (SequenceFlow sq : incoming) {
            FlowNode source = sq.getSourceRef();
            if (source instanceof ExclusiveGateway || source instanceof InclusiveGateway) {
                  if (((Gateway) source).getGatewayDirection().equals(GatewayDirection.DIVERGING)) {
                      return true;
                  }
            }
            boolean found = findSplitActivity(source.getIncoming());
            if (found) {
                return found;
            }
        }
View Full Code Here

    // removing until we start supporting global tasks
    public void testBusinessRuleTaskUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("businessRuleTask.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        GlobalBusinessRuleTask task = (GlobalBusinessRuleTask) definitions.getRootElements().get(0);
        assertEquals("call business rule", task.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

    // removing until we start supporting global tasks
    public void testManualTaskUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("manualTask.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        GlobalManualTask task = (GlobalManualTask) definitions.getRootElements().get(0);
        assertEquals("pull a lever", task.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

    // removing until we start supporting global tasks
    public void testScriptTaskUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("scriptTask.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        GlobalScriptTask task = (GlobalScriptTask) definitions.getRootElements().get(0);
        assertEquals("my script", task.getName());
        assertEquals("git status | grep modified | awk '{print $3}' | xargs echo | xargs git add", task.getScript());
        assertEquals("bash", task.getScriptLanguage());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

TOP

Related Classes of org.eclipse.bpmn2.FlowNode

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.