org.activiti.bpmn.model.Activity.getLoopCharacteristics()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(11.9k)|赞(0)|评价(0)|浏览(297)

本文整理了Java中org.activiti.bpmn.model.Activity.getLoopCharacteristics()方法的一些代码示例,展示了Activity.getLoopCharacteristics()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Activity.getLoopCharacteristics()方法的具体详情如下:
包路径:org.activiti.bpmn.model.Activity
类名称:Activity
方法名:getLoopCharacteristics

Activity.getLoopCharacteristics介绍

暂无

代码示例

代码示例来源:origin: Activiti/Activiti

@Override
public void parse(BpmnParse bpmnParse, BaseElement element) {
 super.parse(bpmnParse, element);
 if (element instanceof Activity && ((Activity) element).getLoopCharacteristics() != null) {
  createMultiInstanceLoopCharacteristics(bpmnParse, (Activity) element);
 }
}

代码示例来源:origin: Activiti/Activiti

protected void handleMultiInstanceLoopCharacteristics(Process process, Activity activity, List<ValidationError> errors) {
  MultiInstanceLoopCharacteristics multiInstanceLoopCharacteristics = activity.getLoopCharacteristics();
  if (multiInstanceLoopCharacteristics != null) {
    if (StringUtils.isEmpty(multiInstanceLoopCharacteristics.getLoopCardinality())
      && StringUtils.isEmpty(multiInstanceLoopCharacteristics.getInputDataItem())) {
    
     addError(errors, Problems.MULTI_INSTANCE_MISSING_COLLECTION, process, activity,
        "Either loopCardinality or loopDataInputRef/activiti:collection must been set");
  }
  }
}

代码示例来源:origin: Activiti/Activiti

public static void writeMultiInstance(Activity activity, XMLStreamWriter xtw) throws Exception {
  if (activity.getLoopCharacteristics() != null) {
   MultiInstanceLoopCharacteristics multiInstanceObject = activity.getLoopCharacteristics();
   if (StringUtils.isNotEmpty(multiInstanceObject.getLoopCardinality()) || StringUtils.isNotEmpty(multiInstanceObject.getInputDataItem())
     || StringUtils.isNotEmpty(multiInstanceObject.getCompletionCondition())) {

    xtw.writeStartElement(ELEMENT_MULTIINSTANCE);
    BpmnXMLUtil.writeDefaultAttribute(ATTRIBUTE_MULTIINSTANCE_SEQUENTIAL, String.valueOf(multiInstanceObject.isSequential()).toLowerCase(), xtw);
    if (StringUtils.isNotEmpty(multiInstanceObject.getInputDataItem())) {
     BpmnXMLUtil.writeQualifiedAttribute(ATTRIBUTE_MULTIINSTANCE_COLLECTION, multiInstanceObject.getInputDataItem(), xtw);
    }
    if (StringUtils.isNotEmpty(multiInstanceObject.getElementVariable())) {
     BpmnXMLUtil.writeQualifiedAttribute(ATTRIBUTE_MULTIINSTANCE_VARIABLE, multiInstanceObject.getElementVariable(), xtw);
    }
    if (StringUtils.isNotEmpty(multiInstanceObject.getLoopCardinality())) {
     xtw.writeStartElement(ELEMENT_MULTIINSTANCE_CARDINALITY);
     xtw.writeCharacters(multiInstanceObject.getLoopCardinality());
     xtw.writeEndElement();
    }
    if (StringUtils.isNotEmpty(multiInstanceObject.getCompletionCondition())) {
     xtw.writeStartElement(ELEMENT_MULTIINSTANCE_CONDITION);
     xtw.writeCharacters(multiInstanceObject.getCompletionCondition());
     xtw.writeEndElement();
    }
    xtw.writeEndElement();
   }
  }
 }
}

代码示例来源:origin: Activiti/Activiti

protected DelegateExecution findMultiInstanceParentExecution(DelegateExecution execution) {
 DelegateExecution multiInstanceExecution = null;
 DelegateExecution parentExecution = execution.getParent();
 if (parentExecution != null && parentExecution.getCurrentFlowElement() != null) {
  FlowElement flowElement = parentExecution.getCurrentFlowElement();
  if (flowElement instanceof Activity) {
   Activity activity = (Activity) flowElement;
   if (activity.getLoopCharacteristics() != null) {
    multiInstanceExecution = parentExecution;
   }
  }
  if (multiInstanceExecution == null) {
   DelegateExecution potentialMultiInstanceExecution = findMultiInstanceParentExecution(parentExecution);
   if (potentialMultiInstanceExecution != null) {
    multiInstanceExecution = potentialMultiInstanceExecution;
   }
  }
 }
 return multiInstanceExecution;
}

代码示例来源:origin: Activiti/Activiti

!activity.isNotExclusive());
if (activity.getLoopCharacteristics() != null) {
  MultiInstanceLoopCharacteristics loopDef = activity.getLoopCharacteristics();
  if (StringUtils.isNotEmpty(loopDef.getLoopCardinality()) || StringUtils.isNotEmpty(loopDef.getInputDataItem()) || StringUtils.isNotEmpty(loopDef.getCompletionCondition())) {

代码示例来源:origin: Activiti/Activiti

protected void createMultiInstanceLoopCharacteristics(BpmnParse bpmnParse, Activity modelActivity) {
 MultiInstanceLoopCharacteristics loopCharacteristics = modelActivity.getLoopCharacteristics();

代码示例来源:origin: Activiti/Activiti

if (flowNode instanceof Activity) {
  Activity activity = (Activity) flowNode;
  MultiInstanceLoopCharacteristics multiInstanceLoopCharacteristics = activity.getLoopCharacteristics();
  if (multiInstanceLoopCharacteristics != null) {
    multiInstanceSequential = multiInstanceLoopCharacteristics.isSequential();

代码示例来源:origin: Activiti/Activiti

if (subProcessExecution.getCurrentFlowElement() instanceof Activity) {
 Activity activity = (Activity) subProcessExecution.getCurrentFlowElement();
 if (activity.getLoopCharacteristics() != null) {
  ExecutionEntity miExecution = subProcessExecution.getParent();
  List<ExecutionEntity> miChildExecutions = executionEntityManager.findChildExecutionsByParentExecutionId(miExecution.getId());

代码示例来源:origin: bill1012/AdminEAP

if (flowNode instanceof Activity) {
  Activity activity = (Activity) flowNode;
  MultiInstanceLoopCharacteristics multiInstanceLoopCharacteristics = activity.getLoopCharacteristics();
  if (multiInstanceLoopCharacteristics != null) {
    multiInstanceSequential = multiInstanceLoopCharacteristics.isSequential();

代码示例来源:origin: org.activiti/activiti-process-validation

protected void handleMultiInstanceLoopCharacteristics(Process process, Activity activity, List<ValidationError> errors) {
  MultiInstanceLoopCharacteristics multiInstanceLoopCharacteristics = activity.getLoopCharacteristics();
  if (multiInstanceLoopCharacteristics != null) {
    if (StringUtils.isEmpty(multiInstanceLoopCharacteristics.getLoopCardinality())
      && StringUtils.isEmpty(multiInstanceLoopCharacteristics.getInputDataItem())) {
    
     addError(errors, Problems.MULTI_INSTANCE_MISSING_COLLECTION, process, activity,
        "Either loopCardinality or loopDataInputRef/activiti:collection must been set");
  }
  }
}

代码示例来源:origin: org.activiti/activiti-engine

@Override
public void parse(BpmnParse bpmnParse, BaseElement element) {
 super.parse(bpmnParse, element);
 if (element instanceof Activity && ((Activity) element).getLoopCharacteristics() != null) {
  createMultiInstanceLoopCharacteristics(bpmnParse, (Activity) element);
 }
}

代码示例来源:origin: org.activiti/activiti-bpmn-converter

public static void writeMultiInstance(Activity activity, XMLStreamWriter xtw) throws Exception {
  if (activity.getLoopCharacteristics() != null) {
   MultiInstanceLoopCharacteristics multiInstanceObject = activity.getLoopCharacteristics();
   if (StringUtils.isNotEmpty(multiInstanceObject.getLoopCardinality()) || StringUtils.isNotEmpty(multiInstanceObject.getInputDataItem())
     || StringUtils.isNotEmpty(multiInstanceObject.getCompletionCondition())) {

    xtw.writeStartElement(ELEMENT_MULTIINSTANCE);
    BpmnXMLUtil.writeDefaultAttribute(ATTRIBUTE_MULTIINSTANCE_SEQUENTIAL, String.valueOf(multiInstanceObject.isSequential()).toLowerCase(), xtw);
    if (StringUtils.isNotEmpty(multiInstanceObject.getInputDataItem())) {
     BpmnXMLUtil.writeQualifiedAttribute(ATTRIBUTE_MULTIINSTANCE_COLLECTION, multiInstanceObject.getInputDataItem(), xtw);
    }
    if (StringUtils.isNotEmpty(multiInstanceObject.getElementVariable())) {
     BpmnXMLUtil.writeQualifiedAttribute(ATTRIBUTE_MULTIINSTANCE_VARIABLE, multiInstanceObject.getElementVariable(), xtw);
    }
    if (StringUtils.isNotEmpty(multiInstanceObject.getLoopCardinality())) {
     xtw.writeStartElement(ELEMENT_MULTIINSTANCE_CARDINALITY);
     xtw.writeCharacters(multiInstanceObject.getLoopCardinality());
     xtw.writeEndElement();
    }
    if (StringUtils.isNotEmpty(multiInstanceObject.getCompletionCondition())) {
     xtw.writeStartElement(ELEMENT_MULTIINSTANCE_CONDITION);
     xtw.writeCharacters(multiInstanceObject.getCompletionCondition());
     xtw.writeEndElement();
    }
    xtw.writeEndElement();
   }
  }
 }
}

代码示例来源:origin: com.bbossgroups.activiti/activiti-bpmn-converter

public static void writeMultiInstance(Activity activity, XMLStreamWriter xtw) throws Exception {
  if (activity.getLoopCharacteristics() != null) {
   MultiInstanceLoopCharacteristics multiInstanceObject = activity.getLoopCharacteristics();
   if (StringUtils.isNotEmpty(multiInstanceObject.getLoopCardinality()) ||
     StringUtils.isNotEmpty(multiInstanceObject.getInputDataItem()) ||
     StringUtils.isNotEmpty(multiInstanceObject.getCompletionCondition())) {
    
    xtw.writeStartElement(ELEMENT_MULTIINSTANCE);
    BpmnXMLUtil.writeDefaultAttribute(ATTRIBUTE_MULTIINSTANCE_SEQUENTIAL, String.valueOf(multiInstanceObject.isSequential()).toLowerCase(), xtw);
    if (StringUtils.isNotEmpty(multiInstanceObject.getInputDataItem())) {
     BpmnXMLUtil.writeQualifiedAttribute(ATTRIBUTE_MULTIINSTANCE_COLLECTION, multiInstanceObject.getInputDataItem(), xtw);
    }
    if (StringUtils.isNotEmpty(multiInstanceObject.getElementVariable())) {
     BpmnXMLUtil.writeQualifiedAttribute(ATTRIBUTE_MULTIINSTANCE_VARIABLE, multiInstanceObject.getElementVariable(), xtw);
    }
    if (StringUtils.isNotEmpty(multiInstanceObject.getLoopCardinality())) {
     xtw.writeStartElement(ELEMENT_MULTIINSTANCE_CARDINALITY);
     xtw.writeCharacters(multiInstanceObject.getLoopCardinality());
     xtw.writeEndElement();
    }
    if (StringUtils.isNotEmpty(multiInstanceObject.getCompletionCondition())) {
     xtw.writeStartElement(ELEMENT_MULTIINSTANCE_CONDITION);
     xtw.writeCharacters(multiInstanceObject.getCompletionCondition());
     xtw.writeEndElement();
    }
    xtw.writeEndElement();
   }
  }
 }
}

代码示例来源:origin: org.activiti/activiti-engine

protected DelegateExecution findMultiInstanceParentExecution(DelegateExecution execution) {
 DelegateExecution multiInstanceExecution = null;
 DelegateExecution parentExecution = execution.getParent();
 if (parentExecution != null && parentExecution.getCurrentFlowElement() != null) {
  FlowElement flowElement = parentExecution.getCurrentFlowElement();
  if (flowElement instanceof Activity) {
   Activity activity = (Activity) flowElement;
   if (activity.getLoopCharacteristics() != null) {
    multiInstanceExecution = parentExecution;
   }
  }
  if (multiInstanceExecution == null) {
   DelegateExecution potentialMultiInstanceExecution = findMultiInstanceParentExecution(parentExecution);
   if (potentialMultiInstanceExecution != null) {
    multiInstanceExecution = potentialMultiInstanceExecution;
   }
  }
 }
 return multiInstanceExecution;
}

代码示例来源:origin: com.bbossgroups.activiti/activiti-engine

@Override
public void parse(BpmnParse bpmnParse, BaseElement element) {
 super.parse(bpmnParse, element);
 
 if (element instanceof Activity
     && ((Activity) element).getLoopCharacteristics() != null) {
  createMultiInstanceLoopCharacteristics(bpmnParse, (Activity) element);
 }
 else  if(element instanceof UserTask && BeansConfigurationHelper.getProcessEngineConfiguration().enableMixMultiUserTask())
 {
    UserTask userTask = (UserTask)element;
    createUserTaskMultiInstanceLoopCharacteristics(bpmnParse, userTask) ;
 }
}

代码示例来源:origin: org.activiti/activiti-json-converter

propertiesNode.put(PROPERTY_EXCLUSIVE, !activity.isNotExclusive());
if (activity.getLoopCharacteristics() != null) {
 MultiInstanceLoopCharacteristics loopDef = activity.getLoopCharacteristics();
 if (StringUtils.isNotEmpty(loopDef.getLoopCardinality()) || StringUtils.isNotEmpty(loopDef.getInputDataItem()) || StringUtils.isNotEmpty(loopDef.getCompletionCondition())) {

代码示例来源:origin: org.activiti/activiti-engine

protected void createMultiInstanceLoopCharacteristics(BpmnParse bpmnParse, Activity modelActivity) {
 MultiInstanceLoopCharacteristics loopCharacteristics = modelActivity.getLoopCharacteristics();

代码示例来源:origin: com.bbossgroups.activiti/activiti-engine

if (flowNode instanceof Activity) {
 Activity activity = (Activity) flowNode;
 MultiInstanceLoopCharacteristics multiInstanceLoopCharacteristics = activity.getLoopCharacteristics();
 if (multiInstanceLoopCharacteristics != null) {
  multiInstanceSequential = multiInstanceLoopCharacteristics.isSequential();

代码示例来源:origin: org.activiti/activiti-engine

if (subProcessExecution.getCurrentFlowElement() instanceof Activity) {
 Activity activity = (Activity) subProcessExecution.getCurrentFlowElement();
 if (activity.getLoopCharacteristics() != null) {
  ExecutionEntity miExecution = subProcessExecution.getParent();
  List<ExecutionEntity> miChildExecutions = executionEntityManager.findChildExecutionsByParentExecutionId(miExecution.getId());

代码示例来源:origin: com.bbossgroups.activiti/activiti-engine

protected void createMultiInstanceLoopCharacteristics(BpmnParse bpmnParse, org.activiti.bpmn.model.Activity modelActivity) {
 MultiInstanceLoopCharacteristics loopCharacteristics = modelActivity.getLoopCharacteristics();

相关文章