Search in sources :

Example 41 with ParameterValueProvider

use of org.camunda.bpm.engine.impl.core.variable.mapping.value.ParameterValueProvider 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);
}
Also used : ParameterValueProvider(org.camunda.bpm.engine.impl.core.variable.mapping.value.ParameterValueProvider) CallableElementBinding(org.camunda.bpm.engine.impl.core.model.BaseCallableElement.CallableElementBinding)

Example 42 with ParameterValueProvider

use of org.camunda.bpm.engine.impl.core.variable.mapping.value.ParameterValueProvider in project camunda-bpm-platform by camunda.

the class BpmnParse method parseExternalServiceTask.

protected void parseExternalServiceTask(ActivityImpl activity, Element serviceTaskElement) {
    activity.setScope(true);
    ParameterValueProvider topicNameProvider = parseTopic(serviceTaskElement, PROPERTYNAME_EXTERNAL_TASK_TOPIC);
    ParameterValueProvider priorityProvider = parsePriority(serviceTaskElement, PROPERTYNAME_TASK_PRIORITY);
    activity.setActivityBehavior(new ExternalTaskActivityBehavior(topicNameProvider, priorityProvider));
}
Also used : ParameterValueProvider(org.camunda.bpm.engine.impl.core.variable.mapping.value.ParameterValueProvider)

Aggregations

ParameterValueProvider (org.camunda.bpm.engine.impl.core.variable.mapping.value.ParameterValueProvider)42 CmmnActivity (org.camunda.bpm.engine.impl.cmmn.model.CmmnActivity)26 Test (org.junit.Test)26 CallableElement (org.camunda.bpm.engine.impl.core.model.CallableElement)20 ConstantValueProvider (org.camunda.bpm.engine.impl.core.variable.mapping.value.ConstantValueProvider)14 ElValueProvider (org.camunda.bpm.engine.impl.el.ElValueProvider)14 ExtensionElements (org.camunda.bpm.model.cmmn.instance.ExtensionElements)12 CaseTaskActivityBehavior (org.camunda.bpm.engine.impl.cmmn.behavior.CaseTaskActivityBehavior)10 ProcessTaskActivityBehavior (org.camunda.bpm.engine.impl.cmmn.behavior.ProcessTaskActivityBehavior)10 CallableElementParameter (org.camunda.bpm.engine.impl.core.model.CallableElementParameter)10 CamundaIn (org.camunda.bpm.model.cmmn.instance.camunda.CamundaIn)9 DecisionTaskActivityBehavior (org.camunda.bpm.engine.impl.cmmn.behavior.DecisionTaskActivityBehavior)6 DmnDecisionTaskActivityBehavior (org.camunda.bpm.engine.impl.cmmn.behavior.DmnDecisionTaskActivityBehavior)6 BaseCallableElement (org.camunda.bpm.engine.impl.core.model.BaseCallableElement)6 ExpressionManager (org.camunda.bpm.engine.impl.el.ExpressionManager)5 CamundaOut (org.camunda.bpm.model.cmmn.instance.camunda.CamundaOut)5 BpmnParseException (org.camunda.bpm.engine.BpmnParseException)3 NullValueProvider (org.camunda.bpm.engine.impl.core.variable.mapping.value.NullValueProvider)2 Element (org.camunda.bpm.engine.impl.util.xml.Element)2 DecisionRefExpression (org.camunda.bpm.model.cmmn.instance.DecisionRefExpression)2