Package com.founder.fix.fixflow.core.impl.bpmn.behavior

Examples of com.founder.fix.fixflow.core.impl.bpmn.behavior.CallActivityBehavior


  protected String getStencilId(FlowElement flowElement) {
    return STENCIL_CALL_ACTIVITY;
  }
 
  protected void convertElementToJson(ObjectNode propertiesNode, FlowElement flowElement) {
    CallActivityBehavior callActivity = (CallActivityBehavior) flowElement;
    String callElementId = callActivity.getCallableElementId();
    String callElementVersion = callActivity.getCallableElementVersion();
    String callElementBizKey = callActivity.getCallableElementBizKey();
    boolean isAsync = callActivity.isAsync();
    if(StringUtil.isNotEmpty(callElementId)){
      propertiesNode.put(PROPERTY_CALLACTIVITY_CALLEDELEMENT,callElementId);
    }
    if(StringUtil.isNotEmpty(callElementVersion)){
      propertiesNode.put(PROPERTY_CALLACTIVITY_ELEMENTVERSION,callElementVersion);
    }
    if(StringUtil.isNotEmpty(callElementBizKey)){
      propertiesNode.put(PROPERTY_CALLACTIVITY_BIZKEY, callElementBizKey);
    }
    propertiesNode.put(PROPERTY_CALLACTIVITY_ISASYNC, isAsync);
    DataSourceToSubProcessMapping dataSourceToSubProcessMapping = callActivity.getDataSourceToSubProcessMapping();
    if(dataSourceToSubProcessMapping != null){
      ObjectNode datavariableNode = objectMapper.createObjectNode();
      ArrayNode itemsNode = objectMapper.createArrayNode();
      List<DataVariableMapping> variableMappings = dataSourceToSubProcessMapping.getDataVariableMapping();
      for(DataVariableMapping dataVariable :variableMappings){
        ObjectNode datavariableItemNode = objectMapper.createObjectNode();
        datavariableItemNode.put(PROPERTY_CALLACTIVITY_DATASOURCE_ID,dataVariable.getDataSourceId());
        datavariableItemNode.put(PROPERTY_CALLACTIVITY_SUBPROCESS_ID,dataVariable.getSubProcesId());
        //datavariableItemNode.put(PROPERTY_CALLACTIVITY_DATA_TYPE,dataVariable.);
          itemsNode.add(datavariableItemNode);
        }
      datavariableNode.put("totalCount", itemsNode.size());
      datavariableNode.put(EDITOR_PROPERTIES_GENERAL_ITEMS, itemsNode);
        propertiesNode.put(PROPERTY_CALLACTIVITY_DATASOURCETOSUBPROCESS, datavariableNode);
    }
   
    SubProcessToDataSourceMapping subProcessToDataSourceMapping = callActivity.getSubProcessToDataSourceMapping();
    if(subProcessToDataSourceMapping != null){
      ObjectNode datavariableNode = objectMapper.createObjectNode();
      ArrayNode itemsNode = objectMapper.createArrayNode();
      List<DataVariableMapping> variableMappings = subProcessToDataSourceMapping.getDataVariableMapping();
      for(DataVariableMapping dataVariable :variableMappings){
View Full Code Here


      }
      // createEndEventTask(executionContext);
      if (this.getParentProcessInstanceTokenId() != null && this.getParentProcessInstanceToken() != null) {
        FlowNode flowNode = this.getParentProcessInstanceToken().getFlowNode();
        if (flowNode instanceof CallActivity) {
          CallActivityBehavior callActivityBehavior = (CallActivityBehavior) flowNode;
          startParentProcessInstance(this.getParentProcessInstanceToken(), callActivityBehavior);
        }
      }
      // 更新实例状态为正常完成
      this.instanceType = ProcessInstanceType.COMPLETE;
View Full Code Here

TOP

Related Classes of com.founder.fix.fixflow.core.impl.bpmn.behavior.CallActivityBehavior

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.