Examples of CmmnSentryDeclaration


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

    CmmnActivity newActivity = handler.handleElement(casePlanModel, context);

    // transform Sentry
    context.setParent(newActivity);
    SentryHandler sentryHandler = new SentryHandler();
    CmmnSentryDeclaration sentryDeclaration = sentryHandler.handleElement(sentry, context);

    // when
    handler.initializeExitCriterias(casePlanModel, newActivity, context);

    // then
View Full Code Here

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

    context.setParent(newActivity);
    SentryHandler sentryHandler = new SentryHandler();

    // transform first Sentry
    CmmnSentryDeclaration firstSentryDeclaration = sentryHandler.handleElement(sentry1, context);

    // transform second Sentry
    CmmnSentryDeclaration secondSentryDeclaration = sentryHandler.handleElement(sentry2, context);

    // when
    handler.initializeExitCriterias(casePlanModel, newActivity, context);

    // then
View Full Code Here

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

  @Test
  public void testSentry() {
    // given

    // when
    CmmnSentryDeclaration sentryDeclaration = sentryHandler.handleElement(sentry, context);

    // then
    assertNotNull(sentryDeclaration);

    assertEquals(sentry.getId(), sentryDeclaration.getId());

    assertNull(sentryDeclaration.getIfPart());
    assertTrue(sentryDeclaration.getOnParts().isEmpty());
  }
View Full Code Here

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

    Body body = createElement(conditionExpression, null, Body.class);
    String expression = "${test}";
    body.setTextContent(expression);

    // when
    CmmnSentryDeclaration sentryDeclaration = sentryHandler.handleElement(sentry, context);

    // then
    assertNotNull(sentryDeclaration);

    CmmnIfPartDeclaration ifPartDeclaration = sentryDeclaration.getIfPart();
    assertNotNull(ifPartDeclaration);

    Expression condition = ifPartDeclaration.getCondition();
    assertNotNull(condition);
    assertEquals(expression, condition.getExpressionText());

    assertTrue(sentryDeclaration.getOnParts().isEmpty());

  }
View Full Code Here

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

    Body secondBody = createElement(secondConditionExpression, null, Body.class);
    String secondExpression = "${secondExpression}";
    secondBody.setTextContent(secondExpression);

    // when
    CmmnSentryDeclaration sentryDeclaration = sentryHandler.handleElement(sentry, context);

    // then
    assertNotNull(sentryDeclaration);

    CmmnIfPartDeclaration ifPartDeclaration = sentryDeclaration.getIfPart();
    assertNotNull(ifPartDeclaration);

    Expression condition = ifPartDeclaration.getCondition();
    assertNotNull(condition);
    assertEquals(firstExpression, condition.getExpressionText());

    // the second condition will be ignored!

    assertTrue(sentryDeclaration.getOnParts().isEmpty());

  }
View Full Code Here

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

  public void testSentryWithOnPart() {
    // given
    CmmnActivity casePlanModelActivity = new CasePlanModelHandler().handleElement(casePlanModel, context);
    context.setParent(casePlanModelActivity);

    CmmnSentryDeclaration sentryDeclaration = sentryHandler.handleElement(sentry, context);
    CmmnActivity source = taskItemHandler.handleElement(planItem, context);

    // when
    sentryHandler.initializeOnParts(sentry, context);

    // then
    assertNotNull(sentryDeclaration);

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

    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.CmmnSentryDeclaration

    onPart.setSentry(exitSentry);

    CmmnActivity casePlanModelActivity = new CasePlanModelHandler().handleElement(casePlanModel, context);
    context.setParent(casePlanModelActivity);

    CmmnSentryDeclaration sentryDeclaration = sentryHandler.handleElement(sentry, context);
    CmmnSentryDeclaration exitSentryDeclaration = sentryHandler.handleElement(exitSentry, context);
    CmmnActivity source = taskItemHandler.handleElement(planItem, context);

    // when
    sentryHandler.initializeOnParts(sentry, context);
View Full Code Here

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

    // transform casePlanModel as parent
    CmmnActivity parent = new CasePlanModelHandler().handleElement(casePlanModel, context);
    context.setParent(parent);

    // transform Sentry
    CmmnSentryDeclaration sentryDeclaration = new SentryHandler().handleElement(sentry, context);

    // when
    CmmnActivity newActivity = handler.handleElement(planItem, context);

    // then
View Full Code Here

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

    // transform casePlanModel as parent
    CmmnActivity parent = new CasePlanModelHandler().handleElement(casePlanModel, context);
    context.setParent(parent);

    // transform Sentry
    CmmnSentryDeclaration firstSentryDeclaration = new SentryHandler().handleElement(sentry1, context);
    CmmnSentryDeclaration secondSentryDeclaration = new SentryHandler().handleElement(sentry2, context);

    // when
    CmmnActivity newActivity = handler.handleElement(planItem, context);

    // then
View Full Code Here

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

    // transform casePlanModel as parent
    CmmnActivity parent = new CasePlanModelHandler().handleElement(casePlanModel, context);
    context.setParent(parent);

    // transform Sentry
    CmmnSentryDeclaration sentryDeclaration = new SentryHandler().handleElement(sentry, context);

    // when
    CmmnActivity newActivity = handler.handleElement(planItem, context);

    // then
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.