Examples of CmmnOnPartDeclaration


Examples of org.camunda.bpm.engine.impl.cmmn.model.CmmnOnPartDeclaration

    List<CmmnOnPartDeclaration> onPartsAssociatedWithSource = sentryDeclaration.getOnParts(source.getId());
    assertNotNull(onPartsAssociatedWithSource);
    assertFalse(onPartsAssociatedWithSource.isEmpty());
    assertEquals(1, onParts.size());

    CmmnOnPartDeclaration onPartDeclaration = onPartsAssociatedWithSource.get(0);
    assertNotNull(onPartDeclaration);
    // source
    assertEquals(source, onPartDeclaration.getSource());
    assertEquals(onPart.getSource().getId(), onPartDeclaration.getSource().getId());
    // standardEvent
    assertEquals(onPart.getStandardEvent().name(), onPartDeclaration.getStandardEvent());
    // sentry
    assertNull(onPartDeclaration.getSentry());

    assertNull(sentryDeclaration.getIfPart());

  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.cmmn.model.CmmnOnPartDeclaration

    List<CmmnOnPartDeclaration> onPartsAssociatedWithSource = sentryDeclaration.getOnParts(source.getId());
    assertNotNull(onPartsAssociatedWithSource);
    assertFalse(onPartsAssociatedWithSource.isEmpty());
    assertEquals(1, onParts.size());

    CmmnOnPartDeclaration onPartDeclaration = onPartsAssociatedWithSource.get(0);
    assertNotNull(onPartDeclaration);
    // source
    assertEquals(source, onPartDeclaration.getSource());
    assertEquals(onPart.getSource().getId(), onPartDeclaration.getSource().getId());
    // standardEvent
    assertEquals(onPart.getStandardEvent().name(), onPartDeclaration.getStandardEvent());
    // sentry
    assertNotNull(onPartDeclaration.getSentry());
    assertEquals(exitSentryDeclaration, onPartDeclaration.getSentry());

    assertNull(sentryDeclaration.getIfPart());

  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.cmmn.model.CmmnOnPartDeclaration

    // a pseudo sentry
    CmmnSentryDeclaration sentryDeclaration = new CmmnSentryDeclaration("X");
    caseDefinition.findActivity("Case1").addSentry(sentryDeclaration);
    activity.addEntryCriteria(sentryDeclaration);

    CmmnOnPartDeclaration onPartDeclaration = new CmmnOnPartDeclaration();
    onPartDeclaration.setSource(new CmmnActivity("B", caseDefinition));
    onPartDeclaration.setStandardEvent("complete");
    sentryDeclaration.addOnPart(onPartDeclaration);

    // an active case instance
    CmmnCaseInstance caseInstance = caseDefinition.createCaseInstance();
    caseInstance.create();
View Full Code Here

Examples of org.camunda.bpm.engine.impl.cmmn.model.CmmnOnPartDeclaration

    PlanItem source = onPart.getSource();
    PlanItemTransition standardEvent = onPart.getStandardEvent();

    if (source != null && standardEvent != null) {
      CmmnOnPartDeclaration onPartDeclaration = new CmmnOnPartDeclaration();

      // initialize standardEvent
      String standardEventName = standardEvent.name();
      onPartDeclaration.setStandardEvent(standardEventName);

      // initialize sourceRef
      String sourceId = source.getId();
      CmmnActivity sourceActivity = parent.findActivity(sourceId);

      if (sourceActivity != null) {
        onPartDeclaration.setSource(sourceActivity);
      }

      // initialize sentryRef
      Sentry sentryRef = onPart.getSentry();
      if (sentryRef != null) {
        String sentryRefId = sentryRef.getId();

        CmmnSentryDeclaration sentryRefDeclaration = parent.getSentry(sentryRefId);
        onPartDeclaration.setSentry(sentryRefDeclaration);
      }

      // add onPartDeclaration to sentryDeclaration
      sentryDeclaration.addOnPart(onPartDeclaration);
    }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.cmmn.model.CmmnOnPartDeclaration

    PlanItem source = onPart.getSource();
    PlanItemTransition standardEvent = onPart.getStandardEvent();

    if (source != null && standardEvent != null) {
      CmmnOnPartDeclaration onPartDeclaration = new CmmnOnPartDeclaration();

      // initialize standardEvent
      String standardEventName = standardEvent.name();
      onPartDeclaration.setStandardEvent(standardEventName);

      // initialize sourceRef
      String sourceId = source.getId();
      CmmnActivity sourceActivity = parent.findActivity(sourceId);

      if (sourceActivity != null) {
        onPartDeclaration.setSource(sourceActivity);
      }

      // initialize sentryRef
      Sentry sentryRef = onPart.getSentry();
      if (sentryRef != null) {
        String sentryRefId = sentryRef.getId();

        CmmnSentryDeclaration sentryRefDeclaration = parent.getSentry(sentryRefId);
        onPartDeclaration.setSentry(sentryRefDeclaration);
      }

      // add onPartDeclaration to sentryDeclaration
      sentryDeclaration.addOnPart(onPartDeclaration);
    }
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.