|
|
@ -110,6 +110,13 @@ public class ExecutorService extends BaseService{ |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!checkTenantSuitable(processDefinition)){ |
|
|
|
|
|
|
|
logger.error("there is not any vaild tenant for the process definition: id:{},name:{}, ", |
|
|
|
|
|
|
|
processDefinition.getId(), processDefinition.getName()); |
|
|
|
|
|
|
|
putMsg(result, Status.TENANT_NOT_SUITABLE); |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* create command |
|
|
|
* create command |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -190,15 +197,10 @@ public class ExecutorService extends BaseService{ |
|
|
|
if (status != Status.SUCCESS) { |
|
|
|
if (status != Status.SUCCESS) { |
|
|
|
return checkResult; |
|
|
|
return checkResult; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!checkTenantSuitable(processDefinition)){ |
|
|
|
// checkTenantExists();
|
|
|
|
|
|
|
|
Tenant tenant = processDao.getTenantForProcess(processDefinition.getTenantId(), |
|
|
|
|
|
|
|
processDefinition.getUserId()); |
|
|
|
|
|
|
|
if(tenant == null){ |
|
|
|
|
|
|
|
logger.error("there is not any vaild tenant for the process definition: id:{},name:{}, ", |
|
|
|
logger.error("there is not any vaild tenant for the process definition: id:{},name:{}, ", |
|
|
|
processDefinition.getId(), processDefinition.getName()); |
|
|
|
processDefinition.getId(), processDefinition.getName()); |
|
|
|
putMsg(result, Status.PROCESS_INSTANCE_NOT_EXIST, processInstanceId); |
|
|
|
putMsg(result, Status.TENANT_NOT_SUITABLE); |
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
switch (executeType) { |
|
|
|
switch (executeType) { |
|
|
@ -240,6 +242,21 @@ public class ExecutorService extends BaseService{ |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* check tenant suitable |
|
|
|
|
|
|
|
* @param processDefinition |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private boolean checkTenantSuitable(ProcessDefinition processDefinition) { |
|
|
|
|
|
|
|
// checkTenantExists();
|
|
|
|
|
|
|
|
Tenant tenant = processDao.getTenantForProcess(processDefinition.getTenantId(), |
|
|
|
|
|
|
|
processDefinition.getUserId()); |
|
|
|
|
|
|
|
if(tenant == null){ |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Check the state of process instance and the type of operation match |
|
|
|
* Check the state of process instance and the type of operation match |
|
|
|
* |
|
|
|
* |
|
|
|