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

x33g5p2x  于2022-01-26 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(133)

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

Process.findParent介绍

暂无

代码示例

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

@Override
protected void executeValidation(BpmnModel bpmnModel, Process process, List<ValidationError> errors) {
 List<EndEvent> endEvents = process.findFlowElementsOfType(EndEvent.class);
 for (EndEvent endEvent : endEvents) {
  if (endEvent.getEventDefinitions() != null && !endEvent.getEventDefinitions().isEmpty()) {
   EventDefinition eventDefinition = endEvent.getEventDefinitions().get(0);
   // Error end event
   if (eventDefinition instanceof CancelEventDefinition) {
    FlowElementsContainer parent = process.findParent(endEvent);
    if (!(parent instanceof Transaction)) {
     addError(errors, Problems.END_EVENT_CANCEL_ONLY_INSIDE_TRANSACTION, process, endEvent, "end event with cancelEventDefinition only supported inside transaction subprocess");
    }
   }
  }
 }
}

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

visitedElements.add(sourceElement.getId());
FlowElementsContainer parentElement = process.findParent(sourceElement);
if (parentElement instanceof SubProcess) {
 sourceElement = (SubProcess) parentElement;

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

@Override
protected void executeValidation(BpmnModel bpmnModel, Process process, List<ValidationError> errors) {
 List<EndEvent> endEvents = process.findFlowElementsOfType(EndEvent.class);
 for (EndEvent endEvent : endEvents) {
  if (endEvent.getEventDefinitions() != null && !endEvent.getEventDefinitions().isEmpty()) {
   EventDefinition eventDefinition = endEvent.getEventDefinitions().get(0);
   // Error end event
   if (eventDefinition instanceof CancelEventDefinition) {
    FlowElementsContainer parent = process.findParent(endEvent);
    if (!(parent instanceof Transaction)) {
     addError(errors, Problems.END_EVENT_CANCEL_ONLY_INSIDE_TRANSACTION, process, endEvent, "end event with cancelEventDefinition only supported inside transaction subprocess");
    }
   }
  }
 }
}

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

visitedElements.add(sourceElement.getId());
FlowElementsContainer parentElement = process.findParent(sourceElement);
if (parentElement instanceof SubProcess) {
 sourceElement = (SubProcess) parentElement;

相关文章