use of org.activiti.engine.impl.bpmn.webservice.MessageImplicitDataOutputAssociation in project Activiti by Activiti.
the class AbstractExternalInvocationBpmnParseHandler method createDataOutputAssociation.
public AbstractDataAssociation createDataOutputAssociation(BpmnParse bpmnParse, DataAssociation dataAssociationElement) {
if (StringUtils.isNotEmpty(dataAssociationElement.getSourceRef())) {
return new MessageImplicitDataOutputAssociation(dataAssociationElement.getTargetRef(), dataAssociationElement.getSourceRef());
} else {
Expression transformation = bpmnParse.getExpressionManager().createExpression(dataAssociationElement.getTransformation());
AbstractDataAssociation dataOutputAssociation = new TransformationDataOutputAssociation(null, dataAssociationElement.getTargetRef(), transformation);
return dataOutputAssociation;
}
}
use of org.activiti.engine.impl.bpmn.webservice.MessageImplicitDataOutputAssociation in project Activiti by Activiti.
the class DefaultActivityBehaviorFactory method createCallActivityBehavior.
// Call activity
public CallActivityBehavior createCallActivityBehavior(CallActivity callActivity) {
String expressionRegex = "\\$+\\{+.+\\}";
CallActivityBehavior callActivityBehaviour = null;
if (StringUtils.isNotEmpty(callActivity.getCalledElement()) && callActivity.getCalledElement().matches(expressionRegex)) {
callActivityBehaviour = new CallActivityBehavior(expressionManager.createExpression(callActivity.getCalledElement()), callActivity.getMapExceptions());
} else {
callActivityBehaviour = new CallActivityBehavior(callActivity.getCalledElement(), callActivity.getMapExceptions());
}
callActivityBehaviour.setInheritVariables(callActivity.isInheritVariables());
for (IOParameter ioParameter : callActivity.getInParameters()) {
if (StringUtils.isNotEmpty(ioParameter.getSourceExpression())) {
Expression expression = expressionManager.createExpression(ioParameter.getSourceExpression().trim());
callActivityBehaviour.addDataInputAssociation(new SimpleDataInputAssociation(expression, ioParameter.getTarget()));
} else {
callActivityBehaviour.addDataInputAssociation(new SimpleDataInputAssociation(ioParameter.getSource(), ioParameter.getTarget()));
}
}
for (IOParameter ioParameter : callActivity.getOutParameters()) {
if (StringUtils.isNotEmpty(ioParameter.getSourceExpression())) {
Expression expression = expressionManager.createExpression(ioParameter.getSourceExpression().trim());
callActivityBehaviour.addDataOutputAssociation(new MessageImplicitDataOutputAssociation(ioParameter.getTarget(), expression));
} else {
callActivityBehaviour.addDataOutputAssociation(new MessageImplicitDataOutputAssociation(ioParameter.getTarget(), ioParameter.getSource()));
}
}
return callActivityBehaviour;
}
Aggregations