|
@@ -124,7 +124,7 @@ public class SnakerEngineImpl implements SnakerEngine {
|
|
|
/**
|
|
|
* 根据流程定义ID启动流程实例
|
|
|
*/
|
|
|
- @Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
public Order startInstanceById(String id) {
|
|
|
return startInstanceById(id, null, null);
|
|
|
}
|
|
@@ -132,7 +132,7 @@ public class SnakerEngineImpl implements SnakerEngine {
|
|
|
/**
|
|
|
* 根据流程定义ID,操作人ID启动流程实例
|
|
|
*/
|
|
|
- @Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
public Order startInstanceById(String id, String operator) {
|
|
|
return startInstanceById(id, operator, null);
|
|
|
}
|
|
@@ -140,7 +140,7 @@ public class SnakerEngineImpl implements SnakerEngine {
|
|
|
/**
|
|
|
* 根据流程定义ID,操作人ID,参数列表启动流程实例
|
|
|
*/
|
|
|
- @Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
public Order startInstanceById(String id, String operator, Map<String, Object> args) {
|
|
|
if(args == null) args = new HashMap<String, Object>();
|
|
|
Process process = process().getProcessById(id);
|
|
@@ -152,7 +152,7 @@ public class SnakerEngineImpl implements SnakerEngine {
|
|
|
* 根据流程名称启动流程实例
|
|
|
* @since 1.3
|
|
|
*/
|
|
|
- @Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
public Order startInstanceByName(String name) {
|
|
|
return startInstanceByName(name, null, null, null);
|
|
|
}
|
|
@@ -161,7 +161,7 @@ public class SnakerEngineImpl implements SnakerEngine {
|
|
|
* 根据流程名称、版本号启动流程实例
|
|
|
* @since 1.3
|
|
|
*/
|
|
|
- @Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
public Order startInstanceByName(String name, Integer version) {
|
|
|
return startInstanceByName(name, version, null, null);
|
|
|
}
|
|
@@ -170,7 +170,7 @@ public class SnakerEngineImpl implements SnakerEngine {
|
|
|
* 根据流程名称、版本号、操作人启动流程实例
|
|
|
* @since 1.3
|
|
|
*/
|
|
|
- @Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
public Order startInstanceByName(String name, Integer version,
|
|
|
String operator) {
|
|
|
return startInstanceByName(name, version, operator, null);
|
|
@@ -180,7 +180,7 @@ public class SnakerEngineImpl implements SnakerEngine {
|
|
|
* 根据流程名称、版本号、操作人、参数列表启动流程实例
|
|
|
* @since 1.3
|
|
|
*/
|
|
|
- @Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
public Order startInstanceByName(String name, Integer version,
|
|
|
String operator, Map<String, Object> args) {
|
|
|
if(args == null) args = new HashMap<String, Object>();
|
|
@@ -189,7 +189,7 @@ public class SnakerEngineImpl implements SnakerEngine {
|
|
|
return startProcess(process, operator, args);
|
|
|
}
|
|
|
|
|
|
- @Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
private Order startProcess(Process process, String operator, Map<String, Object> args) {
|
|
|
Execution execution = execute(process, operator, args, null, null);
|
|
|
if(process.getModel() != null) {
|
|
@@ -204,7 +204,7 @@ public class SnakerEngineImpl implements SnakerEngine {
|
|
|
/**
|
|
|
* 根据父执行对象启动子流程实例(用于启动子流程)
|
|
|
*/
|
|
|
- @Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
public Order startInstanceByExecution(Execution execution) {
|
|
|
Process process = execution.getProcess();
|
|
|
StartModel start = process.getModel().getStart();
|
|
@@ -225,7 +225,7 @@ public class SnakerEngineImpl implements SnakerEngine {
|
|
|
* @param parentNodeName 启动子流程的父流程节点名称
|
|
|
* @return Execution
|
|
|
*/
|
|
|
- @Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
private Execution execute(Process process, String operator, Map<String, Object> args,
|
|
|
String parentId, String parentNodeName) {
|
|
|
Order order = order().createOrder(process, operator, args, parentId, parentNodeName);
|
|
@@ -240,7 +240,7 @@ public class SnakerEngineImpl implements SnakerEngine {
|
|
|
/**
|
|
|
* 根据任务主键ID执行任务
|
|
|
*/
|
|
|
- @Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
public List<Task> executeTask(String taskId) {
|
|
|
return executeTask(taskId, null);
|
|
|
}
|
|
@@ -248,7 +248,7 @@ public class SnakerEngineImpl implements SnakerEngine {
|
|
|
/**
|
|
|
* 根据任务主键ID,操作人ID执行任务
|
|
|
*/
|
|
|
- @Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
public List<Task> executeTask(String taskId, String operator) {
|
|
|
return executeTask(taskId, operator, null);
|
|
|
}
|
|
@@ -256,7 +256,7 @@ public class SnakerEngineImpl implements SnakerEngine {
|
|
|
/**
|
|
|
* 根据任务主键ID,操作人ID,参数列表执行任务
|
|
|
*/
|
|
|
- @Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
public List<Task> executeTask(String taskId, String operator, Map<String, Object> args) {
|
|
|
//完成任务,并且构造执行对象
|
|
|
Execution execution = execute(taskId, operator, args);
|
|
@@ -275,7 +275,7 @@ public class SnakerEngineImpl implements SnakerEngine {
|
|
|
* 1、nodeName为null时,则驳回至上一步处理
|
|
|
* 2、nodeName不为null时,则任意跳转,即动态创建转移
|
|
|
*/
|
|
|
- @Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
public List<Task> executeAndJumpTask(String taskId, String operator, Map<String, Object> args, String nodeName) {
|
|
|
Execution execution = execute(taskId, operator, args);
|
|
|
if(execution == null) return Collections.emptyList();
|
|
@@ -300,7 +300,7 @@ public class SnakerEngineImpl implements SnakerEngine {
|
|
|
/**
|
|
|
* 根据流程实例ID,操作人ID,参数列表按照节点模型model创建新的自由任务
|
|
|
*/
|
|
|
- @Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
public List<Task> createFreeTask(String orderId, String operator, Map<String, Object> args, TaskModel model) {
|
|
|
Order order = query().getOrder(orderId);
|
|
|
AssertHelper.notNull(order, "指定的流程实例[id=" + orderId + "]已完成或不存在");
|
|
@@ -319,7 +319,7 @@ public class SnakerEngineImpl implements SnakerEngine {
|
|
|
* @param args 参数列表
|
|
|
* @return Execution
|
|
|
*/
|
|
|
- @Transactional(propagation = Propagation.REQUIRED, noRollbackFor = Exception.class)
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
private Execution execute(String taskId, String operator, Map<String, Object> args) {
|
|
|
if(args == null) args = new HashMap<String, Object>();
|
|
|
Task task = task().complete(taskId, operator, args);
|