use of org.camunda.bpm.engine.impl.cmmn.behavior.DmnDecisionTaskActivityBehavior in project camunda-bpm-platform by camunda.
the class DecisionTaskItemHandler method initializeDecisionTableResultMapper.
protected void initializeDecisionTableResultMapper(CmmnElement element, CmmnActivity activity, CmmnHandlerContext context) {
DecisionTask decisionTask = getDefinition(element);
DmnDecisionTaskActivityBehavior behavior = getActivityBehavior(activity);
String mapper = decisionTask.getCamundaMapDecisionResult();
DecisionResultMapper decisionResultMapper = getDecisionResultMapperForName(mapper);
behavior.setDecisionTableResultMapper(decisionResultMapper);
}
use of org.camunda.bpm.engine.impl.cmmn.behavior.DmnDecisionTaskActivityBehavior in project camunda-bpm-platform by camunda.
the class DecisionTaskPlanItemHandlerTest method testActivityBehavior.
@Test
public void testActivityBehavior() {
// given: a planItem
// when
CmmnActivity activity = handler.handleElement(planItem, context);
// then
CmmnActivityBehavior behavior = activity.getActivityBehavior();
assertTrue(behavior instanceof DmnDecisionTaskActivityBehavior);
}
use of org.camunda.bpm.engine.impl.cmmn.behavior.DmnDecisionTaskActivityBehavior in project camunda-bpm-platform by camunda.
the class DecisionTaskPlanItemHandlerTest method testDefaultMapDecisionResult.
@Test
public void testDefaultMapDecisionResult() {
// given:
// when
CmmnActivity activity = handler.handleElement(planItem, context);
// then
DmnDecisionTaskActivityBehavior behavior = (DmnDecisionTaskActivityBehavior) activity.getActivityBehavior();
DecisionResultMapper mapper = behavior.getDecisionTableResultMapper();
assertTrue(mapper instanceof ResultListDecisionTableResultMapper);
}
use of org.camunda.bpm.engine.impl.cmmn.behavior.DmnDecisionTaskActivityBehavior in project camunda-bpm-platform by camunda.
the class DecisionTaskPlanItemHandlerTest method testMapDecisionResult.
@Test
public void testMapDecisionResult() {
// given:
decisionTask.setCamundaMapDecisionResult("singleResult");
// when
CmmnActivity activity = handler.handleElement(planItem, context);
// then
DmnDecisionTaskActivityBehavior behavior = (DmnDecisionTaskActivityBehavior) activity.getActivityBehavior();
DecisionResultMapper mapper = behavior.getDecisionTableResultMapper();
assertTrue(mapper instanceof SingleResultDecisionResultMapper);
}
use of org.camunda.bpm.engine.impl.cmmn.behavior.DmnDecisionTaskActivityBehavior in project camunda-bpm-platform by camunda.
the class DecisionTaskItemHandler method initializeResultVariable.
protected void initializeResultVariable(CmmnElement element, CmmnActivity activity, CmmnHandlerContext context) {
DecisionTask decisionTask = getDefinition(element);
DmnDecisionTaskActivityBehavior behavior = getActivityBehavior(activity);
String resultVariable = decisionTask.getCamundaResultVariable();
behavior.setResultVariable(resultVariable);
}
Aggregations