Search in sources :

Example 1 with TransformationDataOutputAssociation

use of org.activiti.engine.impl.bpmn.data.TransformationDataOutputAssociation 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;
    }
}
Also used : MessageImplicitDataOutputAssociation(org.activiti.engine.impl.bpmn.webservice.MessageImplicitDataOutputAssociation) TransformationDataOutputAssociation(org.activiti.engine.impl.bpmn.data.TransformationDataOutputAssociation) AbstractDataAssociation(org.activiti.engine.impl.bpmn.data.AbstractDataAssociation) Expression(org.activiti.engine.delegate.Expression)

Example 2 with TransformationDataOutputAssociation

use of org.activiti.engine.impl.bpmn.data.TransformationDataOutputAssociation in project Activiti by Activiti.

the class WebServiceActivityBehavior method createDataOutputAssociation.

protected AbstractDataAssociation createDataOutputAssociation(DataAssociation dataAssociationElement) {
    if (StringUtils.isNotEmpty(dataAssociationElement.getSourceRef())) {
        return new MessageImplicitDataOutputAssociation(dataAssociationElement.getTargetRef(), dataAssociationElement.getSourceRef());
    } else {
        ExpressionManager expressionManager = Context.getProcessEngineConfiguration().getExpressionManager();
        Expression transformation = expressionManager.createExpression(dataAssociationElement.getTransformation());
        AbstractDataAssociation dataOutputAssociation = new TransformationDataOutputAssociation(null, dataAssociationElement.getTargetRef(), transformation);
        return dataOutputAssociation;
    }
}
Also used : MessageImplicitDataOutputAssociation(org.activiti.engine.impl.bpmn.webservice.MessageImplicitDataOutputAssociation) ExpressionManager(org.activiti.engine.impl.el.ExpressionManager) TransformationDataOutputAssociation(org.activiti.engine.impl.bpmn.data.TransformationDataOutputAssociation) AbstractDataAssociation(org.activiti.engine.impl.bpmn.data.AbstractDataAssociation) Expression(org.activiti.engine.delegate.Expression)

Aggregations

Expression (org.activiti.engine.delegate.Expression)2 AbstractDataAssociation (org.activiti.engine.impl.bpmn.data.AbstractDataAssociation)2 TransformationDataOutputAssociation (org.activiti.engine.impl.bpmn.data.TransformationDataOutputAssociation)2 MessageImplicitDataOutputAssociation (org.activiti.engine.impl.bpmn.webservice.MessageImplicitDataOutputAssociation)2 ExpressionManager (org.activiti.engine.impl.el.ExpressionManager)1