本文整理了Java中org.activiti.bpmn.model.Process.findParent()
方法的一些代码示例,展示了Process.findParent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Process.findParent()
方法的具体详情如下:
包路径:org.activiti.bpmn.model.Process
类名称: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;
内容来源于网络,如有侵权,请联系作者删除!