Package org.activiti.bpmn.model

Examples of org.activiti.bpmn.model.CallActivity


 
  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());
  }
View Full Code Here


  protected String getStencilId(FlowElement flowElement) {
    return STENCIL_CALL_ACTIVITY;
  }
 
  protected void convertElementToJson(ObjectNode propertiesNode, FlowElement flowElement) {
    CallActivity callActivity = (CallActivity) flowElement;
    if (StringUtils.isNotEmpty(callActivity.getCalledElement())) {
      propertiesNode.put(PROPERTY_CALLACTIVITY_CALLEDELEMENT, callActivity.getCalledElement());
    }
   
    addJsonParameters(PROPERTY_CALLACTIVITY_IN, callActivity.getInParameters(), propertiesNode);
    addJsonParameters(PROPERTY_CALLACTIVITY_OUT, callActivity.getOutParameters(), propertiesNode);
  }
View Full Code Here

    parametersNode.put(EDITOR_PROPERTIES_GENERAL_ITEMS, itemsNode);
    propertiesNode.put(propertyName, parametersNode);
  }
 
  protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
    CallActivity callActivity = new CallActivity();
    if (StringUtils.isNotEmpty(getPropertyValueAsString(PROPERTY_CALLACTIVITY_CALLEDELEMENT, elementNode))) {
      callActivity.setCalledElement(getPropertyValueAsString(PROPERTY_CALLACTIVITY_CALLEDELEMENT, elementNode));
    }
   
    callActivity.getInParameters().addAll(convertToIOParameters(PROPERTY_CALLACTIVITY_IN, elementNode));
    callActivity.getOutParameters().addAll(convertToIOParameters(PROPERTY_CALLACTIVITY_OUT, elementNode));
   
    return callActivity;
  }
View Full Code Here

 
  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());
  }
View Full Code Here

    return ELEMENT_CALL_ACTIVITY;
  }
 
  @Override
  protected BaseElement convertXMLToElement(XMLStreamReader xtr, BpmnModel model) throws Exception {
    CallActivity callActivity = new CallActivity();
    BpmnXMLUtil.addXMLLocation(callActivity, xtr);
    callActivity.setCalledElement(xtr.getAttributeValue(null, ATTRIBUTE_CALL_ACTIVITY_CALLEDELEMENT));
    parseChildElements(getXMLElementName(), callActivity, childParserMap, model, xtr);
    return callActivity;
  }
View Full Code Here

    return callActivity;
  }

  @Override
  protected void writeAdditionalAttributes(BaseElement element, BpmnModel model, XMLStreamWriter xtw) throws Exception {
    CallActivity callActivity = (CallActivity) element;
    if (StringUtils.isNotEmpty(callActivity.getCalledElement())) {
      xtw.writeAttribute(ATTRIBUTE_CALL_ACTIVITY_CALLEDELEMENT, callActivity.getCalledElement());
    }
  }
View Full Code Here

    }
  }
 
  @Override
  protected boolean writeExtensionChildElements(BaseElement element, boolean didWriteExtensionStartElement, XMLStreamWriter xtw) throws Exception {
    CallActivity callActivity = (CallActivity) element;
    didWriteExtensionStartElement = writeIOParameters(ELEMENT_CALL_ACTIVITY_IN_PARAMETERS, callActivity.getInParameters(), didWriteExtensionStartElement, xtw);
    didWriteExtensionStartElement = writeIOParameters(ELEMENT_CALL_ACTIVITY_OUT_PARAMETERS, callActivity.getOutParameters(), didWriteExtensionStartElement, xtw);
    return didWriteExtensionStartElement;
  }
View Full Code Here

  public void refresh() {

    calledElementText.removeFocusListener(calledElementTextFocusChanged);
    calledElementText.removeModifyListener(calledElementTextModified);

    final CallActivity callActivity = getDefaultBusinessObject(CallActivity.class);
    if (callActivity != null) {
      final String calledElement = callActivity.getCalledElement();

      if (calledElement == null) {
        calledElementText.setText(ActivitiConstants.EMPTY_STRING);
      } else {
        calledElementText.setText(calledElement);
View Full Code Here

 
  private void validateModel(BpmnModel model) {
    FlowElement flowElement = model.getMainProcess().getFlowElementMap().get("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());
  }
View Full Code Here

    super(fp, "CallActivity", "Add call activity");
  }

  @Override
  public Object[] create(ICreateContext context) {
    CallActivity callActivity = new CallActivity();
    addObjectToContainer(context, callActivity, "Call activity");

    // return newly created business object(s)
    return new Object[] { callActivity };
View Full Code Here

TOP

Related Classes of org.activiti.bpmn.model.CallActivity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.