@@ -102,6 +102,7 @@ export class workflow_in_node {
102102 wf . addRight ( role . _id , role . name , [ - 1 ] ) ;
103103 this . workflow = wf ;
104104 this . workflow . queue = queue ;
105+ this . workflow . name = this . config . name ;
105106 this . workflow . rpa = this . config . rpa ;
106107 this . workflow . web = this . config . web ;
107108 this . workflow = await NoderedUtil . _UpdateOne ( "workflow" , null , this . workflow , 0 , false , null ) ;
@@ -150,14 +151,23 @@ export class workflow_in_node {
150151 }
151152 }
152153 this . node . status ( { fill : "blue" , shape : "dot" , text : "Processing " + _id } ) ;
154+ console . log ( data ) ;
153155 if ( _id !== null && _id !== undefined && _id !== "" ) {
154156 var res = await NoderedUtil . Query ( "workflow_instances" , { "_id" : _id } , null , null , 1 , 0 , data . jwt ) ;
155157 if ( res . length == 0 ) {
156158 NoderedUtil . HandleError ( this , "Unknown workflow_instances id " + _id ) ;
157159 if ( ack !== null && ack !== undefined ) ack ( ) ;
158160 return ;
159161 }
160- data = Object . assign ( res [ 0 ] , { payload : data } ) ;
162+ if ( res [ 0 ] . payload === null || res [ 0 ] . payload === undefined ) {
163+ res [ 0 ] . payload = data ;
164+ data = res [ 0 ] ;
165+ } else {
166+ res [ 0 ] . payload = Object . assign ( res [ 0 ] . payload , data ) ;
167+ data = res [ 0 ] ;
168+ }
169+ console . log ( data . payload ) ;
170+ // data = Object.assign(res[0], { payload: data });
161171 // Logger.instanse.info("workflow in activated id " + data._id);
162172 // result.name = res[0].name;
163173 // result._id = res[0]._id;
0 commit comments