Examples of CmmnActivity


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

  @Test
  public void testActivityBehavior() {
    // given: a discretionaryItem

    // when
    CmmnActivity activity = handler.handleElement(discretionaryItem, context);

    // then
    CmmnActivityBehavior behavior = activity.getActivityBehavior();
    assertTrue(behavior instanceof StageActivityBehavior);
  }
View Full Code Here

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

  @Test
  public void testWithoutParent() {
    // given: a discretionaryItem

    // when
    CmmnActivity activity = handler.handleElement(discretionaryItem, context);

    // then
    assertNull(activity.getParent());
  }
View Full Code Here

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

    // a new activity as parent
    CmmnCaseDefinition parent = new CmmnCaseDefinition("aParentActivity");
    context.setParent(parent);

    // when
    CmmnActivity activity = handler.handleElement(discretionaryItem, context);

    // then
    assertEquals(parent, activity.getParent());
    assertTrue(parent.getActivities().contains(activity));
  }
View Full Code Here

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

  public void testCaseExecutionListener() {
    // given:
    testSpecification.addListenerToElement(modelInstance, caseTask);

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

    // then
    testSpecification.verify(activity);
  }
View Full Code Here

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

    // the case has a name "A Case"
    String name = "A Case";
    caseDefinition.setName(name);

    // when
    CmmnActivity activity = handler.handleElement(caseDefinition, context);

    // then
    assertEquals(name, activity.getName());
  }
View Full Code Here

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

  @Test
  public void testActivityBehavior() {
    // given: a case

    // when
    CmmnActivity activity = handler.handleElement(caseDefinition, context);

    // then
    CmmnActivityBehavior behavior = activity.getActivityBehavior();
    assertNull(behavior);
  }
View Full Code Here

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

  @Test
  public void testCaseHasNoParent() {
    // given: a caseDefinition

    // when
    CmmnActivity activity = handler.handleElement(caseDefinition, context);

    // then
    assertNull(activity.getParent());
  }
View Full Code Here

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

  public void testCaseExecutionListener() {
    // given:
    testSpecification.addListenerToElement(modelInstance, stage);

    // when
    CmmnActivity activity = handler.handleElement(discretionaryItem, context);

    // then
    testSpecification.verify(activity);
  }
View Full Code Here

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

  public void testCaseExecutionListener() {
    // given:
    testSpecification.addListenerToElement(modelInstance, milestone);

    // when
    CmmnActivity activity = handler.handleElement(discretionaryItem, context);

    // then
    testSpecification.verify(activity);
  }
View Full Code Here

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

public class ActivityBehaviorUtil {

  public static CmmnActivityBehavior getActivityBehavior(CmmnExecution execution) {
    String id = execution.getId();

    CmmnActivity activity = execution.getActivity();
    ensureNotNull(PvmException.class, "Case execution '"+id+"' has no current activity.", "activity", activity);

    CmmnActivityBehavior behavior = activity.getActivityBehavior();
    ensureNotNull(PvmException.class, "There is no behavior specified in "+activity+" for case execution '"+id+"'.", "behavior", behavior);

    return behavior;
  }
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.