Search in sources :

Example 6 with Stage

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

the class CreateModelTest method createCaseWithOneStageAndNestedHumanTask.

@Test
public void createCaseWithOneStageAndNestedHumanTask() {
    // create process
    Case caseInstance = createElement(definitions, "case-with-one-human-task", Case.class);
    // create case plan model
    CasePlanModel casePlanModel = createElement(caseInstance, "casePlanModel_1", CasePlanModel.class);
    // create a stage
    Stage stage = createElement(casePlanModel, "Stage_1", Stage.class);
    // create elements
    HumanTask humanTask = createElement(stage, "HumanTask_1", HumanTask.class);
    // create a plan item
    PlanItem planItem = createElement(stage, "PlanItem_1", PlanItem.class);
    // set definition to human task
    planItem.setDefinition(humanTask);
}
Also used : CasePlanModel(org.camunda.bpm.model.cmmn.instance.CasePlanModel) Stage(org.camunda.bpm.model.cmmn.instance.Stage) HumanTask(org.camunda.bpm.model.cmmn.instance.HumanTask) PlanItem(org.camunda.bpm.model.cmmn.instance.PlanItem) Case(org.camunda.bpm.model.cmmn.instance.Case) Test(org.junit.Test)

Aggregations

Stage (org.camunda.bpm.model.cmmn.instance.Stage)6 HumanTask (org.camunda.bpm.model.cmmn.instance.HumanTask)4 CmmnActivity (org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity)3 PlanItem (org.camunda.bpm.model.cmmn.instance.PlanItem)3 Test (org.junit.Test)3 CaseDefinitionEntity (org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionEntity)2 PlanItemDefinition (org.camunda.bpm.model.cmmn.instance.PlanItemDefinition)2 Collection (java.util.Collection)1 ItemHandler (org.camunda.bpm.engine.impl.cmmn.handler.ItemHandler)1 Case (org.camunda.bpm.model.cmmn.instance.Case)1 CasePlanModel (org.camunda.bpm.model.cmmn.instance.CasePlanModel)1 CaseTask (org.camunda.bpm.model.cmmn.instance.CaseTask)1 DecisionTask (org.camunda.bpm.model.cmmn.instance.DecisionTask)1 EventListener (org.camunda.bpm.model.cmmn.instance.EventListener)1 Milestone (org.camunda.bpm.model.cmmn.instance.Milestone)1 PlanFragment (org.camunda.bpm.model.cmmn.instance.PlanFragment)1 PlanningTable (org.camunda.bpm.model.cmmn.instance.PlanningTable)1 ProcessTask (org.camunda.bpm.model.cmmn.instance.ProcessTask)1 Task (org.camunda.bpm.model.cmmn.instance.Task)1 ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)1