use of org.camunda.bpm.engine.impl.core.model.BaseCallableElement.CallableElementBinding in project camunda-bpm-platform by camunda.
the class ProcessTaskPlanItemHandlerTest method testBinding.
@Test
public void testBinding() {
// given:
CallableElementBinding processBinding = CallableElementBinding.LATEST;
processTask.setCamundaProcessBinding(processBinding.getValue());
// when
CmmnActivity activity = handler.handleElement(planItem, context);
// then
ProcessTaskActivityBehavior behavior = (ProcessTaskActivityBehavior) activity.getActivityBehavior();
CallableElement callableElement = behavior.getCallableElement();
CallableElementBinding binding = callableElement.getBinding();
assertNotNull(binding);
assertEquals(processBinding, binding);
}
use of org.camunda.bpm.engine.impl.core.model.BaseCallableElement.CallableElementBinding in project camunda-bpm-platform by camunda.
the class CaseTaskPlanItemHandlerTest method testBinding.
@Test
public void testBinding() {
// given:
CallableElementBinding caseBinding = CallableElementBinding.LATEST;
caseTask.setCamundaCaseBinding(caseBinding.getValue());
// when
CmmnActivity activity = handler.handleElement(planItem, context);
// then
CaseTaskActivityBehavior behavior = (CaseTaskActivityBehavior) activity.getActivityBehavior();
CallableElement callableElement = behavior.getCallableElement();
CallableElementBinding binding = callableElement.getBinding();
assertNotNull(binding);
assertEquals(caseBinding, binding);
}
use of org.camunda.bpm.engine.impl.core.model.BaseCallableElement.CallableElementBinding in project camunda-bpm-platform by camunda.
the class DecisionTaskPlanItemHandlerTest method testBinding.
@Test
public void testBinding() {
// given:
CallableElementBinding caseBinding = CallableElementBinding.LATEST;
decisionTask.setCamundaDecisionBinding(caseBinding.getValue());
// when
CmmnActivity activity = handler.handleElement(planItem, context);
// then
DecisionTaskActivityBehavior behavior = (DecisionTaskActivityBehavior) activity.getActivityBehavior();
BaseCallableElement callableElement = behavior.getCallableElement();
CallableElementBinding binding = callableElement.getBinding();
assertNotNull(binding);
assertEquals(caseBinding, binding);
}
use of org.camunda.bpm.engine.impl.core.model.BaseCallableElement.CallableElementBinding in project camunda-bpm-platform by camunda.
the class BpmnParse method parseVersion.
protected void parseVersion(Element callingActivityElement, ActivityImpl activity, BaseCallableElement callableElement, String bindingAttributeName, String versionAttributeName) {
String version = null;
CallableElementBinding binding = callableElement.getBinding();
version = callingActivityElement.attributeNS(CAMUNDA_BPMN_EXTENSIONS_NS, versionAttributeName);
if (binding != null && binding.equals(CallableElementBinding.VERSION) && version == null) {
addError("Missing attribute '" + versionAttributeName + "' when '" + bindingAttributeName + "' has value '" + CallableElementBinding.VERSION.getValue() + "'", callingActivityElement);
}
ParameterValueProvider versionProvider = createParameterValueProvider(version, expressionManager);
callableElement.setVersionValueProvider(versionProvider);
}
Aggregations