说明:

activiti本身状态存库,导致效率太低,把中间状态封装成一个载荷类,返回给上游,下次请求时给带着载荷类即可。

1.pom依赖

		<dependency>
			<groupId>net.sf.json-lib</groupId>
			<artifactId>json-lib</artifactId>
			<version>${json-lib.version}</version>
			<classifier>jdk15</classifier>
		</dependency>
		<dependency>
			<groupId>org.activiti</groupId>
			<artifactId>activiti-engine</artifactId>
			<version>5.22.0</version>
		</dependency>
		<dependency>
			<groupId>org.activiti</groupId>
			<artifactId>activiti-bpmn-converter</artifactId>
			<version>5.22.0</version>
		</dependency>
		<dependency>
			<groupId>org.activiti</groupId>
			<artifactId>activiti-bpmn-model</artifactId>
			<version>5.22.0</version>
		</dependency>

2.关键类

2.1解析类-BPMNService

package cn.com.agree.activiti10;
import org.activiti.bpmn.converter.BpmnXMLConverter;
import org.activiti.bpmn.model.BpmnModel;
import org.activiti.bpmn.model.CallActivity;
import org.activiti.bpmn.model.EndEvent;
import org.activiti.bpmn.model.ExclusiveGateway;
import org.activiti.bpmn.model.FlowElement;
import org.activiti.bpmn.model.FlowNode;
import org.activiti.bpmn.model.InclusiveGateway;
import org.activiti.bpmn.model.ParallelGateway;
import org.activiti.bpmn.model.Process;
import org.activiti.bpmn.model.SequenceFlow;
import org.activiti.bpmn.model.StartEvent;
import org.activiti.bpmn.model.SubProcess;
import org.activiti.engine.impl.util.io.InputStreamSource;
import org.mvel2.MVEL;

import log.cn.com.agree.ab.a5.runtime.InvokeLog;

import java.io.FileInputStream;
import java.io.InputStream;
import java.util.*;
/**
 * 	静态解析bpmn文件 -返回payLoad
 * 	payLoad:包含相关信息,替代数据库中 存储的信息。比如当前交易名,对象组名,整体链路节点等
 * 	每次请求时带着payLoad
 * @author fanjinliang@agree.com.cn
 *
 */
public class BPMNService {

	private Map<String, BpmnModel> bpmnModelMap = new HashMap<>();
	private Map<String, Process> processMap = new HashMap<>();

	// 初始化方法,在服务启动时调用
	public void init(List<String> bpmnFilePaths) throws Exception {
		for (String filePath : bpmnFilePaths) {
			loadBpmnModel(filePath);
		}
	}

	// 加载单个 BPMN 文件
	private void loadBpmnModel(String bpmnFilePath) throws Exception {
		InputStream bpmnStream = new FileInputStream(bpmnFilePath);
		BpmnXMLConverter bpmnXMLConverter = new BpmnXMLConverter();
		InputStreamSource inputStreamSource = new InputStreamSource(bpmnStream);
		BpmnModel bpmnModel = bpmnXMLConverter.convertToBpmnModel(inputStreamSource, false, false);
		bpmnStream.close();

		for (Process process : bpmnModel.getProcesses()) {
			String definitionKey = process.getId();
			bpmnModelMap.put(definitionKey, bpmnModel);
			processMap.put(definitionKey, process);
		}
	}

	// 根据 definitionKey 获取 Process
	public Process getProcessByDefinitionKey(String definitionKey) {
		return processMap.get(definitionKey);
	}
	// 根据当前节点的 ID 获取下一个节点(包括处理网关和嵌套流程)
	public FlowElement getNextFlowElement(String definitionKey, String currentElementId, Map<String, Object> variables) throws  ActivitiException{
		Process process = getProcessByDefinitionKey(definitionKey);
		if (process == null||process.getFlowElement(currentElementId)==null) {
			return null;
		}

		FlowElement currentElement = process.getFlowElement(currentElementId);

		FlowElement flowElement =null;

		if (currentElement instanceof FlowNode) {
			List<SequenceFlow> outgoingFlows = ((FlowNode) currentElement).getOutgoingFlows();

			if (outgoingFlows.isEmpty()) {
				return null;
			}
			Class<?> currentElementType = currentElement.getClass();
			switch (currentElementType.getSimpleName()) {
			case "ExclusiveGateway":
				// 处理排他网关
				for (SequenceFlow outgoingFlow : outgoingFlows) {
					if (evaluateCondition(outgoingFlow.getConditionExpression(), variables)) {
						return process.getFlowElement(outgoingFlow.getTargetRef());
					}
				}
//				InvokeLog.error("网关不匹配");
				throw new ActivitiException(ActivitiServiceResults.BIZ002_网关未匹配);
//				break;

			case "ParallelGateway":
			case "InclusiveGateway":
				// 处理并行网关或包容网关,假设返回第一个符合条件的目标节点
				for (SequenceFlow outgoingFlow : outgoingFlows) {
					return process.getFlowElement(outgoingFlow.getTargetRef());
				}
				break;

			case "CallActivity":
				// 处理 CallActivity
				String calledElement = ((CallActivity) currentElement).getCalledElement();
				Process calledProcess = getProcessByDefinitionKey(calledElement);
				if (calledProcess != null) {
					// 假设子流程的开始事件是唯一的
					for (FlowElement element : calledProcess.getFlowElements()) {
						if (element instanceof StartEvent) {
							return element;
						}
					}
				}
				break;

			case "SubProcess":
				// 处理 SubProcess
				flowElement = process.getFlowElement(outgoingFlows.get(0).getTargetRef());
				break;

			default:
				// 默认处理,返回第一个目标节点
				flowElement = process.getFlowElement(outgoingFlows.get(0).getTargetRef());
				break;
			}

			//			if (currentElement instanceof ExclusiveGateway) {
			//				// 处理排他网关
			//				for (SequenceFlow outgoingFlow : outgoingFlows) {
			//					if (evaluateCondition(outgoingFlow.getConditionExpression(), variables)) {
			//						return process.getFlowElement(outgoingFlow.getTargetRef());
			//					}else {
			//						throw new RuntimeException("网关不匹配");
			//					}
			//				}
			//			} else if (currentElement instanceof ParallelGateway || currentElement instanceof InclusiveGateway) {
			//				// 处理并行网关或包容网关,假设返回第一个符合条件的目标节点
			//				for (SequenceFlow outgoingFlow : outgoingFlows) {
			//					return process.getFlowElement(outgoingFlow.getTargetRef());
			//				}
			//			} else if (currentElement instanceof CallActivity) {
			//				// 处理 callActivity
			//				String calledElement = ((CallActivity) currentElement).getCalledElement();
			//				Process calledProcess = getProcessByDefinitionKey(calledElement);
			//				if (calledProcess != null) {
			//					// 假设子流程的开始事件是唯一的
			//					for (FlowElement element : calledProcess.getFlowElements()) {
			//						if (element instanceof StartEvent) {
			//							return element;
			//						}
			//					}
			//				}
			//			} else if (currentElement instanceof SubProcess) {
			//				// 处理 SubProcess
			//				flowElement =process.getFlowElement(outgoingFlows.get(0).getTargetRef());
			//			} 
			//			else {
			//				flowElement = process.getFlowElement(outgoingFlows.get(0).getTargetRef());
			//				// 默认处理,返回第一个目标节点
			//			}
		}
		//判断flowElement的类型

		if (flowElement!=null) {
			//对象组后的汇总网关放过就行
			if (currentElement instanceof SubProcess&&flowElement instanceof ParallelGateway) {
				flowElement=getNextFlowElement(process, flowElement.getId(), variables);
			}
		}

		return flowElement;

	}


	private boolean evaluateCondition(String conditionExpression, Map<String, Object> variables) {
		if (conditionExpression == null || conditionExpression.trim().isEmpty()) {
			return true; // 无条件表达式时默认返回 true
		}
		return MVEL.evalToBoolean(conditionExpression.replaceAll("\\$|\\{|\\}", ""), variables);
	}

	public ProcessPayload startProcess(String definitionKey, Map<String, Object> var) throws ActivitiException {
		// TODO Auto-generated method stub
		Process process = processMap.get(definitionKey);
		if (process==null) {
			throw new ActivitiException(ActivitiServiceResults.BIZ001_流程定义不存在);
		}
		Collection<FlowElement> flowElements = process.getFlowElements();
		String startId="";
		for (FlowElement e : flowElements) {
			if (e instanceof StartEvent) {
				startId = e.getId();
				break;
			}
		}
		FlowElement nextFlowElement = getNextFlowElement(definitionKey, startId, var);

		ProcessPayload processPayload=new ProcessPayload(definitionKey, process.getName());

		refreshProcessPayload(processPayload,nextFlowElement);

		return processPayload;
	}

	private void refreshProcessPayload(ProcessPayload processPayload, FlowElement nextFlowElement) {
		// TODO Auto-generated method stub
		if (nextFlowElement==null) {
			processPayload.setEnd(true);
			return;
		}
		String id=nextFlowElement.getId();
		String name=nextFlowElement.getName();
		String type = nextFlowElement.getClass().getSimpleName();
		SimpleFlowElement simpleFlowElement = new SimpleFlowElement(id, name, type);
		Set<String> objIds=new HashSet<String>();
		if ("SubProcess".equalsIgnoreCase(type)) {
			//对象组
			simpleFlowElement.setSubProcess(true);
			SubProcess sub=(SubProcess)nextFlowElement;
			List<SimpleFlowElement> subSimpleFlowElement=getSubProcessSimpleFlowElement(sub);
			//更新当前对象组的对象列表
			simpleFlowElement.setSubSimpleFlowElement(subSimpleFlowElement);

			for (SimpleFlowElement e : subSimpleFlowElement) {
				objIds.add(e.getId());
			}
			//更新当前对象组的对象id列表

		}else if ("ExclusiveGateway".equalsIgnoreCase(type)) {
			simpleFlowElement.setExclusiveGateway(true);
			objIds.add(simpleFlowElement.getId());
		}else if ("ParallelGateway".equalsIgnoreCase(type)) {
			simpleFlowElement.setParallelGateway(true);
			objIds.add(simpleFlowElement.getId());
		}else {
			objIds.add(simpleFlowElement.getId());
		}
		processPayload.setCurrentObjtIdSet(objIds);
		processPayload.setCurrentFlowElement(simpleFlowElement);
	}

	/**
	 * 获取对象组内的对象节点信息
	 * @param process
	 * @return
	 */
	private List<SimpleFlowElement> getSubProcessSimpleFlowElement(SubProcess process) {
		// TODO Auto-generated method stub
		List<SimpleFlowElement> list=new ArrayList<SimpleFlowElement>();
		Collection<FlowElement> flowElements = process.getFlowElements();
		for (FlowElement e : flowElements) {
			if (!(e instanceof StartEvent || e instanceof EndEvent || e instanceof SequenceFlow)) {
				String id=e.getId();
				String name=e.getName();
				String type = e.getClass().getSimpleName();
				SimpleFlowElement simpleFlowElement = new SimpleFlowElement(id, name, type);
				list.add(simpleFlowElement);
			}
		}
		return list;
	}

	private FlowElement getNextFlowElement(Process process, String currentElementId, Map<String, Object> var) {
		if (process == null) {
			return null;
		}

		FlowElement currentElement = process.getFlowElement(currentElementId);
		if (currentElement == null) {
			return null;
		}

		if (currentElement instanceof FlowNode) {
			List<SequenceFlow> outgoingFlows = ((FlowNode) currentElement).getOutgoingFlows();
			if (outgoingFlows.isEmpty()) {
				return null;
			}

			if (currentElement instanceof ExclusiveGateway) {
				// 处理排他网关
				for (SequenceFlow outgoingFlow : outgoingFlows) {
					if (evaluateCondition(outgoingFlow.getConditionExpression(), var)) {
						return process.getFlowElement(outgoingFlow.getTargetRef());
					}
				}
			} else if (currentElement instanceof ParallelGateway || currentElement instanceof InclusiveGateway) {
				// 处理并行网关或包容网关,假设返回第一个符合条件的目标节点
				for (SequenceFlow outgoingFlow : outgoingFlows) {
					return process.getFlowElement(outgoingFlow.getTargetRef());
				}
			} else if (currentElement instanceof CallActivity) {
				// 处理 callActivity
				String calledElement = ((CallActivity) currentElement).getCalledElement();
				Process calledProcess = getProcessByDefinitionKey(calledElement);
				if (calledProcess != null) {
					// 假设子流程的开始事件是唯一的
					for (FlowElement element : calledProcess.getFlowElements()) {
						if (element instanceof StartEvent) {
							return element;
						}
					}
				}
			} else {
				// 默认处理,返回第一个目标节点
				return process.getFlowElement(outgoingFlows.get(0).getTargetRef());
			}
		}

		return null;
	}

	public ProcessPayload commitProcess(ProcessPayload processPayload, Set<String> commitObjIdSet, Map<String, Object> var) {
		try {
			SimpleFlowElement currentFlowElement = processPayload.getCurrentFlowElement();
			if (currentFlowElement.isSubProcess()) {
				//处理对象组
				List<SimpleFlowElement> subSimpleFlowElement = currentFlowElement.getSubSimpleFlowElement();
				for (String string : commitObjIdSet) {
					for (SimpleFlowElement e : subSimpleFlowElement) {
						if (e.getId().equalsIgnoreCase(string)) {
							e.setCommit(true);
							processPayload.getCurrentObjtIdSet().remove(string);
							currentFlowElement.getFlowElementNum().addAndGet(1);
						}
					}
				}
				//			if (currentFlowElement.getFlowElementNum().get()==subSimpleFlowElement.size()) {
				//				//当前对象组提交完毕
				//				
				//			}
				if (processPayload.getCurrentObjtIdSet().size()==0) {
					//当前对象组提交完毕
					//1.更新当前节点状态

					currentFlowElement.setCommit(true);
					//2.更新历史节点
					processPayload.addHistoryFlowElement(currentFlowElement);
					//3.获取下一节点并且封装对象
					FlowElement nextFlowElement = getNextFlowElement(processPayload.getId(), currentFlowElement.getId(), var);
					refreshProcessPayload(processPayload, nextFlowElement);
//					return processPayload;
				}else {
					//仍然返回当前节点
//					return processPayload;
				}

			}else {//非对象组
				currentFlowElement.setCommit(true);
				//2.更新历史节点
				processPayload.addHistoryFlowElement(currentFlowElement);
				//3.获取下一节点并且封装对象
				FlowElement nextFlowElement = getNextFlowElement(processPayload.getId(), currentFlowElement.getId(), var);
				refreshProcessPayload(processPayload, nextFlowElement);

			}
		} catch (Exception e) {
			e.printStackTrace();
			if (e instanceof ActivitiException) {
				ActivitiException ae=(ActivitiException) e;
				processPayload.setErrorInfo(ae);
			}
		}
		
		return processPayload;

	}


}

2.2 自定义节点类-SimpleFlowElement

package cn.com.agree.activiti10;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

public class SimpleFlowElement {

	private String id;

	private String name;

	private String type; // Task, Event, Gateway, etc.

	/* 标识对象是否提交  */
	private boolean isCommit=false;

	/*	当前节点是否是对象组	*/
	private boolean isSubProcess;

	/*	当前节点是否是排他网关	*/
	private boolean isExclusiveGateway;

	/*	当前节点是否是并行网关	*/
	private boolean isParallelGateway;

	/*	如果是对象组,保留组内对象	*/
	List<SimpleFlowElement> subSimpleFlowElement=new ArrayList<SimpleFlowElement>();

	private AtomicInteger flowElementNum=new AtomicInteger(0);

	public SimpleFlowElement(String id, String name, String type) {
		this.id = id;
		this.name = name;
		this.type = type;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public boolean isCommit() {
		return isCommit;
	}

	public void setCommit(boolean isCommit) {
		this.isCommit = isCommit;
	}

	public boolean isSubProcess() {
		return isSubProcess;
	}

	public void setSubProcess(boolean isSubProcess) {
		this.isSubProcess = isSubProcess;
	}

	public List<SimpleFlowElement> getSubSimpleFlowElement() {
		return subSimpleFlowElement;
	}

	public void setSubSimpleFlowElement(List<SimpleFlowElement> subSimpleFlowElement) {
		this.subSimpleFlowElement = subSimpleFlowElement;
	}

	public boolean isExclusiveGateway() {
		return isExclusiveGateway;
	}

	public void setExclusiveGateway(boolean isExclusiveGateway) {
		this.isExclusiveGateway = isExclusiveGateway;
	}

	public boolean isParallelGateway() {
		return isParallelGateway;
	}

	public void setParallelGateway(boolean isParallelGateway) {
		this.isParallelGateway = isParallelGateway;
	}

	public AtomicInteger getFlowElementNum() {
		return flowElementNum;
	}

	public void setFlowElementNum(AtomicInteger flowElementNum) {
		this.flowElementNum = flowElementNum;
	}

}

2.3 自定义载荷类

package cn.com.agree.activiti10;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

public class ProcessPayload {

	/* 活动ID */
	private String id;
	
	/* 活动name */
	private String name;

	/* 当前节点 */
	private SimpleFlowElement currentFlowElement;
	
	/* 历史节点 */
	private List<SimpleFlowElement> historyFlowElement=new ArrayList<SimpleFlowElement>();
	
//	/*	一级流程下的节点ID	---合并到currentFlowElement*/
//	private String currentObjtId;

	/*	提交上来的taskId	*/
//	private Set<String> commitObjtId;

//	/*	当前节点是否是对象组 ---合并到currentFlowElement	*/
//	private boolean isSubProcess;

//	/*	当前待做的taskId,如果是对象组,那就是多个	---合并到currentFlowElement*/
	private Set<String> currentObjtIdSet;

	private boolean end=false;
	
	//TODO 接收到json串的时候,记得把上次可能存在的错误信息给重置下
	private String code="200";

	private String message;



	public ProcessPayload() {
	}



	public ProcessPayload(String id, String name) {
		this.id = id;
		this.name = name;
	}



	public ProcessPayload errorProcessPayload(String msg) {
		this.setCode("400");
		this.setMessage(msg);
		return this;
	}



	public String getId() {
		return id;
	}



	public void setId(String id) {
		this.id = id;
	}



	public String getName() {
		return name;
	}



	public void setName(String name) {
		this.name = name;
	}



	public SimpleFlowElement getCurrentFlowElement() {
		return currentFlowElement;
	}



	public void setCurrentFlowElement(SimpleFlowElement currentFlowElement) {
		this.currentFlowElement = currentFlowElement;
	}



//	public Set<String> getCommitObjtId() {
//		return commitObjtId;
//	}
//
//
//
//	public void setCommitObjtId(Set<String> commitObjtId) {
//		this.commitObjtId = commitObjtId;
//	}



	public boolean isEnd() {
		return end;
	}



	public void setEnd(boolean end) {
		this.end = end;
	}





	public String getCode() {
		return code;
	}



	public void setCode(String code) {
		this.code = code;
	}



	public String getMessage() {
		return message;
	}



	public void setMessage(String message) {
		this.message = message;
	}



	public List<SimpleFlowElement> getHistoryFlowElement() {
		return historyFlowElement;
	}



	public void setHistoryFlowElement(List<SimpleFlowElement> historyFlowElement) {
		this.historyFlowElement = historyFlowElement;
	}



	public Set<String> getCurrentObjtIdSet() {
		return currentObjtIdSet;
	}



	public void setCurrentObjtIdSet(Set<String> currentObjtIdSet) {
		this.currentObjtIdSet = currentObjtIdSet;
	}



	public void addHistoryFlowElement(SimpleFlowElement historyFlowElement) {
		getHistoryFlowElement().add(historyFlowElement);
	}



	public void setErrorInfo(ActivitiException ae) {
		this.setCode(ae.getCode());
		this.setMessage(ae.getMessage());
	}
	

	
}

2.4 测试类

package cn.com.agree.activiti10;

import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import org.activiti.bpmn.model.FlowElement;

import com.alibaba.fastjson.JSON;


public class Test {
	public static void main(String[] args) {
		try {
			BPMNService bpmnService = new BPMNService();
			//	            bpmnService.init(Arrays.asList("bpmn\\index.flow.bpmn"));
			//	            String definitionKey = "trade/test";
			//	            String startNodeId = "task2";
			bpmnService.init(Arrays.asList("bpmn\\index.activity.bpmn"));

			String definitionKey = "publicAc";
			Map<String,Object>var=new HashMap<String,Object>();
			var.put("a", "2");
			ProcessPayload processPayload=bpmnService.startProcess(definitionKey,var);
			String jsonString = JSON.toJSONString(processPayload);
			System.out.println(jsonString);
			while (!processPayload.isEnd()) {
				SimpleFlowElement currentFlowElement = processPayload.getCurrentFlowElement();
				System.out.println("currentFlowElement ID: " + currentFlowElement.getId());
				System.out.println("currentFlowElement Name: " + currentFlowElement.getName());
				System.out.println("currentObjIds : " + processPayload.getCurrentObjtIdSet());
				System.out.println("=========================================================");
				Set<String> currentObjtIdSet = processPayload.getCurrentObjtIdSet();
				Set<String>commitObjIdSet=new HashSet<String>();
				commitObjIdSet.addAll(currentObjtIdSet);
				processPayload=bpmnService.commitProcess(processPayload,commitObjIdSet,var);
				if (!"200".equalsIgnoreCase(processPayload.getCode())) {
					
					System.out.println(processPayload.getCode()+"--"+processPayload.getMessage());
					break;
				}
//				jsonString = JSON.toJSONString(processPayload);
//				System.out.println("processPayload"+jsonString);
			}
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}

2.5 其他类

package cn.com.agree.activiti10;

public class ActivitiException extends Exception{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String code;

	private String detail;
	public ActivitiException(ActivitiServiceResults callResult)
	{
		super(callResult.getMessage());
		this.code = callResult.getCode();
	}

	public ActivitiException(ActivitiServiceResults callResult, String detail)
	{
		this(callResult);
		this.detail = detail;
	}
	public ActivitiException() {
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}
	
	

}

package cn.com.agree.activiti10;
public enum ActivitiServiceResults
{
    BIZ001_流程定义不存在("BIZ001", "流程定义不存在"),

    BIZ002_网关未匹配("BIZ002", "网关未匹配");

    private String code;

    private String message;

    ActivitiServiceResults(String code, String message)
    {
        this.code = code;
        this.message = message;
    }

    /**
     * @return the code
     */
    public String getCode()
    {
        return code;
    }

    /**
     * @return the message
     */
    public String getMessage()
    {
        return message;
    }

    /**
     * @param code
     *            the code to set
     */
    public void setCode(String code)
    {
        this.code = code;
    }

    /**
     * @param message
     *            the message to set
     */
    public void setMessage(String message)
    {
        this.message = message;
    }
}

2.6 bpmn文件

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process isExecutable="true" id="publicAc" name="通用活动">
    <startEvent id="startEvent1" name="startEvent" />
    <endEvent id="endEvent1" name="endEvent" />
    <userTask id="pubObj_subObject1" name="账务提交处理" objectEntryConditions="">
      <extensionElements>
        <activiti:formProperty id="CPCP条件" default="" />
        <activiti:formProperty id="pojoPath" default="BankCModule/scene/activity/publicAc/pubObj/pubObj" />
      </extensionElements>
    </userTask>
    <parallelGateway id="parallelGateway_subProcess1" name="parallelGateway_风控对象组" />
    <sequenceFlow id="sequenceFlow_subProcess1" name="" sourceRef="subProcess1" targetRef="parallelGateway_subProcess1" />
    <subProcess id="subProcess1" name="风控对象组">
      <startEvent id="subProcess1_start" name="startEvent" />
      <endEvent id="subProcess_end_authCheck_subObject2" name="endEvent" />
      <sequenceFlow id="sequenceFlow_start_authCheck_subObject2" name="" sourceRef="subProcess1_start" targetRef="authCheck_subObject2" />
      <sequenceFlow id="sequenceFlow_end_authCheck_subObject2" name="" sourceRef="authCheck_subObject2" targetRef="subProcess_end_authCheck_subObject2" />
      <userTask id="authCheck_subObject2" name="授权对象处理" objectEntryConditions="">
        <documentation>
          {&quot;id&quot;:&quot;subProcess1&quot;,&quot;name&quot;:&quot;风控对象组&quot;}
        </documentation>
        <extensionElements>
          <activiti:formProperty id="CPCP条件" default="" />
          <activiti:formProperty id="pojoPath" default="BankCModule/processes/authCheck/authCheck" />
        </extensionElements>
      </userTask>
      <endEvent id="subProcess_end_reviewCheck_subObject3" name="endEvent" />
      <sequenceFlow id="sequenceFlow_start_reviewCheck_subObject3" name="" sourceRef="subProcess1_start" targetRef="reviewCheck_subObject3" />
      <sequenceFlow id="sequenceFlow_end_reviewCheck_subObject3" name="" sourceRef="reviewCheck_subObject3" targetRef="subProcess_end_reviewCheck_subObject3" />
      <userTask id="reviewCheck_subObject3" name="复核对象处理" objectEntryConditions="">
        <documentation>
          {&quot;id&quot;:&quot;subProcess1&quot;,&quot;name&quot;:&quot;风控对象组&quot;}
        </documentation>
        <extensionElements>
          <activiti:formProperty id="CPCP条件" default="" />
          <activiti:formProperty id="pojoPath" default="BankCModule/processes/reviewCheck/reviewCheck" />
        </extensionElements>
      </userTask>
    </subProcess>
    <sequenceFlow id="sequenceFlow5" name="" sourceRef="parallelGateway_subProcess1" targetRef="pubObj_subObject1" />
    <sequenceFlow id="sequenceFlow6" name="" sourceRef="startEvent1" targetRef="subProcess1" />
    <exclusiveGateway id="exclusiveGateway1" name="网关" />
    <userTask id="subObject4" name="网关1" objectEntryConditions="" />
    <sequenceFlow id="sequenceFlow7" name="条件" sourceRef="exclusiveGateway1" targetRef="subObject4">
      <conditionExpression xsi:type="tFormalExpression">
        ${a==&#39;1&#39;}
      </conditionExpression>
    </sequenceFlow>
    <userTask id="subObject5" name="网关2" objectEntryConditions="" />
    <sequenceFlow id="sequenceFlow8" name="条件" sourceRef="exclusiveGateway1" targetRef="subObject5">
      <conditionExpression xsi:type="tFormalExpression">
        ${a==&#39;2&#39;}
      </conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sequenceFlow9" name="" sourceRef="pubObj_subObject1" targetRef="exclusiveGateway1" />
    <userTask id="subObject6" name="对象" objectEntryConditions="" />
    <sequenceFlow id="sequenceFlow10" name="" sourceRef="subObject4" targetRef="subObject6" />
    <sequenceFlow id="sequenceFlow12" name="" sourceRef="subObject6" targetRef="endEvent1" />
    <sequenceFlow id="sequenceFlow13" name="" sourceRef="subObject5" targetRef="endEvent1" />
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_通用活动" xmlns="http://www.omg.org/spec/BPMN/20100524/DI">
    <bpmndi:BPMNPlane bpmnElement="通用活动" id="BPMNPlane_通用活动">
      <bpmndi:BPMNShape id="BPMNShape_startEvent1" bpmnElement="startEvent1">
        <omgdc:Bounds x="65" y="85" height="50" width="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_endEvent1" bpmnElement="endEvent1">
        <omgdc:Bounds x="950" y="185" height="50" width="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_pubObj_subObject1" bpmnElement="pubObj_subObject1">
        <omgdc:Bounds x="530" y="85" height="50" width="90" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_authCheck_subObject2" bpmnElement="authCheck_subObject2">
        <omgdc:Bounds x="40" y="33" height="50" width="90" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_reviewCheck_subObject3" bpmnElement="reviewCheck_subObject3">
        <omgdc:Bounds x="160" y="35" height="50" width="90" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_subProcess1" bpmnElement="subProcess1">
        <omgdc:Bounds x="230" y="52" height="115" width="265" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_sequenceFlow5" bpmnElement="sequenceFlow5">
        <omgdi:waypoint x="495" y="109.5" />
        <omgdi:waypoint x="530" y="110" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sequenceFlow6" bpmnElement="sequenceFlow6">
        <omgdi:waypoint x="115" y="110" />
        <omgdi:waypoint x="230" y="109.5" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="BPMNShape_exclusiveGateway1" bpmnElement="exclusiveGateway1">
        <omgdc:Bounds x="535" y="235" height="30" width="30" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_subObject4" bpmnElement="subObject4">
        <omgdc:Bounds x="620" y="145" height="50" width="90" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_sequenceFlow7" bpmnElement="sequenceFlow7">
        <omgdi:waypoint x="565" y="250" />
        <omgdi:waypoint x="620" y="170" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="BPMNShape_subObject5" bpmnElement="subObject5">
        <omgdc:Bounds x="615" y="285" height="50" width="90" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_sequenceFlow8" bpmnElement="sequenceFlow8">
        <omgdi:waypoint x="565" y="250" />
        <omgdi:waypoint x="615" y="310" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sequenceFlow9" bpmnElement="sequenceFlow9">
        <omgdi:waypoint x="620" y="110" />
        <omgdi:waypoint x="535" y="250" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="BPMNShape_subObject6" bpmnElement="subObject6">
        <omgdc:Bounds x="810" y="185" height="50" width="90" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_sequenceFlow10" bpmnElement="sequenceFlow10">
        <omgdi:waypoint x="710" y="170" />
        <omgdi:waypoint x="810" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sequenceFlow12" bpmnElement="sequenceFlow12">
        <omgdi:waypoint x="900" y="210" />
        <omgdi:waypoint x="950" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_sequenceFlow13" bpmnElement="sequenceFlow13">
        <omgdi:waypoint x="705" y="310" />
        <omgdi:waypoint x="950" y="210" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部