Search in sources :

Example 21 with CmmnModelInstance

use of org.camunda.bpm.model.cmmn.CmmnModelInstance in project camunda-cmmn-model by camunda.

the class Cmmn10Test method shouldGetPlanItemExitCriterion.

@Test
public void shouldGetPlanItemExitCriterion() {
    CmmnModelInstance modelInstance = getCmmnModelInstance();
    PlanItem planItem = modelInstance.getModelElementsByType(PlanItem.class).iterator().next();
    Collection<Sentry> exitCriterias = planItem.getExitCriterias();
    assertThat(exitCriterias).hasSize(1);
    Collection<Sentry> exitCriteria = planItem.getExitCriteria();
    assertThat(exitCriteria).hasSize(1);
    Collection<ExitCriterion> exitCriterions = planItem.getExitCriterions();
    assertThat(exitCriterions).isEmpty();
}
Also used : PlanItem(org.camunda.bpm.model.cmmn.instance.PlanItem) Sentry(org.camunda.bpm.model.cmmn.instance.Sentry) CmmnModelInstance(org.camunda.bpm.model.cmmn.CmmnModelInstance) ExitCriterion(org.camunda.bpm.model.cmmn.instance.ExitCriterion) Test(org.junit.Test)

Example 22 with CmmnModelInstance

use of org.camunda.bpm.model.cmmn.CmmnModelInstance in project camunda-cmmn-model by camunda.

the class Cmmn10Test method shouldGetPlanItemEntryCriterion.

@Test
public void shouldGetPlanItemEntryCriterion() {
    CmmnModelInstance modelInstance = getCmmnModelInstance();
    PlanItem planItem = modelInstance.getModelElementsByType(PlanItem.class).iterator().next();
    Collection<Sentry> entryCriterias = planItem.getEntryCriterias();
    assertThat(entryCriterias).hasSize(1);
    Collection<Sentry> entryCriteria = planItem.getEntryCriteria();
    assertThat(entryCriteria).hasSize(1);
    Collection<EntryCriterion> entryCriterions = planItem.getEntryCriterions();
    assertThat(entryCriterions).isEmpty();
}
Also used : PlanItem(org.camunda.bpm.model.cmmn.instance.PlanItem) Sentry(org.camunda.bpm.model.cmmn.instance.Sentry) EntryCriterion(org.camunda.bpm.model.cmmn.instance.EntryCriterion) CmmnModelInstance(org.camunda.bpm.model.cmmn.CmmnModelInstance) Test(org.junit.Test)

Aggregations

CmmnModelInstance (org.camunda.bpm.model.cmmn.CmmnModelInstance)22 Test (org.junit.Test)14 CasePlanModel (org.camunda.bpm.model.cmmn.instance.CasePlanModel)6 Case (org.camunda.bpm.model.cmmn.instance.Case)4 Sentry (org.camunda.bpm.model.cmmn.instance.Sentry)4 HumanTask (org.camunda.bpm.model.cmmn.instance.HumanTask)3 PlanItem (org.camunda.bpm.model.cmmn.instance.PlanItem)3 CaseDefinitionEntity (org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionEntity)2 PluggableProcessEngineTestCase (org.camunda.bpm.engine.impl.test.PluggableProcessEngineTestCase)2 ConditionExpression (org.camunda.bpm.model.cmmn.instance.ConditionExpression)2 Event (org.camunda.bpm.model.cmmn.instance.Event)2 ExitCriterion (org.camunda.bpm.model.cmmn.instance.ExitCriterion)2 TimerEvent (org.camunda.bpm.model.cmmn.instance.TimerEvent)2 UserEvent (org.camunda.bpm.model.cmmn.instance.UserEvent)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 HashSet (java.util.HashSet)1 CommandChecker (org.camunda.bpm.engine.impl.cfg.CommandChecker)1 ProcessEngineConfigurationImpl (org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)1 DeploymentCache (org.camunda.bpm.engine.impl.persistence.deploy.cache.DeploymentCache)1 ResourceEntity (org.camunda.bpm.engine.impl.persistence.entity.ResourceEntity)1