Package org.eclipse.bpmn2

Examples of org.eclipse.bpmn2.LoopCharacteristics


          }
        } else {
          // 子流程多实例的时候 每个子流程结束的时候去触发验证完成条件
          if (getParent().getFlowNode() instanceof Activity) {
            Activity activity = (Activity) getParent().getFlowNode();
            LoopCharacteristics loopCharacteristics = activity.getLoopCharacteristics();
            if (loopCharacteristics instanceof MultiInstanceLoopCharacteristics) {
              if (this.isSubProcessRootToken) {
                if (!getParent().hasEnded()) {
                  getParent().signal();
                }
View Full Code Here


   * <!-- begin-user-doc --> <!-- end-user-doc -->
   *
   * @generated
   */
  public NotificationChain basicSetLoopCharacteristics(LoopCharacteristics newLoopCharacteristics, NotificationChain msgs) {
    LoopCharacteristics oldLoopCharacteristics = loopCharacteristics;
    loopCharacteristics = newLoopCharacteristics;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Bpmn2Package.ACTIVITY__LOOP_CHARACTERISTICS,
          oldLoopCharacteristics, newLoopCharacteristics);
      if (msgs == null)
View Full Code Here

    Activity activity = (Activity) this;
   
    TokenEntity token=executionContext.getToken();
   
    //获取 Activity 的多实例信息
    LoopCharacteristics loopCharacteristics = activity.getLoopCharacteristics();
   
    //判断事都是并行多实例
    if (loopCharacteristics instanceof MultiInstanceLoopCharacteristics) {
     
      // 并行多实例处理
View Full Code Here

    //在离开节点的时候判断多实例
    if (this instanceof Activity && ((Activity) this).getLoopCharacteristics() != null) {
     
      Activity activity = (Activity) this;
     
      LoopCharacteristics loopCharacteristics = activity.getLoopCharacteristics();
     
      // 如果是并行多实例
      if (loopCharacteristics instanceof MultiInstanceLoopCharacteristics) {
        // 并行多实例处理
       
View Full Code Here

  String convertPropertyToString(Activity activity) {
    return getLoopCharacteristicsValue(activity).getName();
  }

  public static LoopCharacteristicType getLoopCharacteristicsValue(Activity activity) {
    LoopCharacteristics loopCharacteristics = activity.getLoopCharacteristics();
    LoopCharacteristicType type = LoopCharacteristicType.NULL;

    if (loopCharacteristics != null) {
      if (loopCharacteristics instanceof MultiInstanceLoopCharacteristics) {
        MultiInstanceLoopCharacteristics multi = (MultiInstanceLoopCharacteristics) loopCharacteristics;
View Full Code Here

    public void testMessageUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("message.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 2);
        assertTrue(definitions.getRootElements().iterator().next() instanceof Message);
        Message msg = (Message) definitions.getRootElements().iterator().next();
        assertEquals("message", msg.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

    public void testParallelGatewayUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("parallelGateway.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = getRootProcess(definitions);
        ParallelGateway g = (ParallelGateway) process.getFlowElements().get(0);
        assertEquals("parallel gateway", g.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

    public void testPoolUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("pool.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        assertTrue(definitions.getRootElements().get(0) instanceof Process);
        Process process = getRootProcess(definitions);
        assertEquals("pool", process.getName());
        assertEquals(ProcessType.PRIVATE, process.getProcessType());
        assertTrue(process.isIsClosed());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

    public void testLaneUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("pool.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        assertTrue(definitions.getRootElements().get(0) instanceof Process);
        Process process = getRootProcess(definitions);
        assertTrue(process.getLaneSets().size() == 1);
        assertTrue(process.getLaneSets().get(0).getLanes().size() == 1);
        Lane l = process.getLaneSets().get(0).getLanes().get(0);
        assertEquals("my first lane", l.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

    @Test
    public void testSequenceFlowUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("sequenceFlow.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = getRootProcess(definitions);
        assertTrue(process.getFlowElements().get(0) instanceof Task);
        Task task = (Task) process.getFlowElements().get(0);
        assertEquals("task1", task.getName());
        Task task2 = (Task) process.getFlowElements().get(1);
        assertEquals("task2", task2.getName());
        SequenceFlow flow = (SequenceFlow) process.getFlowElements().get(2);
        assertEquals("seqFlow", flow.getName());
        assertEquals(task, flow.getSourceRef());
        assertEquals(task2, flow.getTargetRef());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

TOP

Related Classes of org.eclipse.bpmn2.LoopCharacteristics

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.