Search in sources :

Example 6 with IOParameter

use of org.activiti.bpmn.model.IOParameter in project Activiti by Activiti.

the class CallActivityConverterTest method validateModel.

private void validateModel(BpmnModel model) {
    FlowElement flowElement = model.getMainProcess().getFlowElement("callactivity");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof CallActivity);
    CallActivity callActivity = (CallActivity) flowElement;
    assertEquals("callactivity", callActivity.getId());
    assertEquals("Call activity", callActivity.getName());
    assertEquals("processId", callActivity.getCalledElement());
    List<IOParameter> parameters = callActivity.getInParameters();
    assertEquals(2, parameters.size());
    IOParameter parameter = parameters.get(0);
    assertEquals("test", parameter.getSource());
    assertEquals("test", parameter.getTarget());
    parameter = parameters.get(1);
    assertEquals("${test}", parameter.getSourceExpression());
    assertEquals("test", parameter.getTarget());
    parameters = callActivity.getOutParameters();
    assertEquals(1, parameters.size());
    parameter = parameters.get(0);
    assertEquals("test", parameter.getSource());
    assertEquals("test", parameter.getTarget());
}
Also used : IOParameter(org.activiti.bpmn.model.IOParameter) FlowElement(org.activiti.bpmn.model.FlowElement) CallActivity(org.activiti.bpmn.model.CallActivity)

Aggregations

IOParameter (org.activiti.bpmn.model.IOParameter)6 CallActivity (org.activiti.bpmn.model.CallActivity)2 FlowElement (org.activiti.bpmn.model.FlowElement)2 JsonNode (com.fasterxml.jackson.databind.JsonNode)1 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)1 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)1 ArrayList (java.util.ArrayList)1 Expression (org.activiti.engine.delegate.Expression)1 CallActivityBehavior (org.activiti.engine.impl.bpmn.behavior.CallActivityBehavior)1 SimpleDataInputAssociation (org.activiti.engine.impl.bpmn.data.SimpleDataInputAssociation)1 MessageImplicitDataOutputAssociation (org.activiti.engine.impl.bpmn.webservice.MessageImplicitDataOutputAssociation)1