@ -226,7 +226,6 @@ public class PythonGateway {
* @param timeout timeout for workflow working , if running time longer than timeout ,
* @param timeout timeout for workflow working , if running time longer than timeout ,
* task will mark as fail
* task will mark as fail
* @param workerGroup run task in which worker group
* @param workerGroup run task in which worker group
* @param tenantCode tenantCode
* @param taskRelationJson relation json for nodes
* @param taskRelationJson relation json for nodes
* @param taskDefinitionJson taskDefinitionJson
* @param taskDefinitionJson taskDefinitionJson
* @param otherParamsJson otherParamsJson handle other params
* @param otherParamsJson otherParamsJson handle other params
@ -242,13 +241,16 @@ public class PythonGateway {
int warningGroupId ,
int warningGroupId ,
int timeout ,
int timeout ,
String workerGroup ,
String workerGroup ,
String tenantCode ,
int releaseState ,
int releaseState ,
String taskRelationJson ,
String taskRelationJson ,
String taskDefinitionJson ,
String taskDefinitionJson ,
String otherParamsJson ,
String otherParamsJson ,
String executionType ) {
String executionType ) {
User user = usersService . queryUser ( userName ) ;
User user = usersService . queryUser ( userName ) ;
if ( user . getTenantCode ( ) = = null ) {
throw new RuntimeException ( "Can not create or update workflow for user who not related to any tenant." ) ;
}
Project project = projectMapper . queryByName ( projectName ) ;
Project project = projectMapper . queryByName ( projectName ) ;
long projectCode = project . getCode ( ) ;
long projectCode = project . getCode ( ) ;
@ -263,12 +265,12 @@ public class PythonGateway {
ReleaseState . OFFLINE ) ;
ReleaseState . OFFLINE ) ;
processDefinitionService . updateProcessDefinition ( user , projectCode , name ,
processDefinitionService . updateProcessDefinition ( user , projectCode , name ,
processDefinitionCode , description , globalParams ,
processDefinitionCode , description , globalParams ,
null , timeout , tenantCode , taskRelationJson , taskDefinitionJson , otherParamsJson ,
null , timeout , user . ge tT enantCode( ) , taskRelationJson , taskDefinitionJson , otherParamsJson ,
executionTypeEnum ) ;
executionTypeEnum ) ;
} else {
} else {
Map < String , Object > result = processDefinitionService . createProcessDefinition ( user , projectCode , name ,
Map < String , Object > result = processDefinitionService . createProcessDefinition ( user , projectCode , name ,
description , globalParams ,
description , globalParams ,
null , timeout , tenantCode , taskRelationJson , taskDefinitionJson , otherParamsJson ,
null , timeout , user . ge tT enantCode( ) , taskRelationJson , taskDefinitionJson , otherParamsJson ,
executionTypeEnum ) ;
executionTypeEnum ) ;
processDefinition = ( ProcessDefinition ) result . get ( Constants . DATA_LIST ) ;
processDefinition = ( ProcessDefinition ) result . get ( Constants . DATA_LIST ) ;
processDefinitionCode = processDefinition . getCode ( ) ;
processDefinitionCode = processDefinition . getCode ( ) ;