@@ -157,19 +157,29 @@ export class rpa_workflow_node {
157157 async oninput ( msg : any ) {
158158 try {
159159 this . node . status ( { } ) ;
160+ let targetid = NoderedUtil . IsNullEmpty ( this . config . queue ) || this . config . queue === 'none' ? msg . targetid : this . config . queue ;
161+ let workflowid = NoderedUtil . IsNullEmpty ( this . config . workflow ) ? msg . workflowid : this . config . workflow ;
160162 var correlationId = Math . random ( ) . toString ( 36 ) . substr ( 2 , 9 ) ;
161163 this . messages [ correlationId ] = msg ;
162164 if ( msg . payload == null || typeof msg . payload == "string" || typeof msg . payload == "number" ) {
163165 msg . payload = { "data" : msg . payload } ;
164166 }
167+ if ( NoderedUtil . IsNullEmpty ( targetid ) ) {
168+ this . node . status ( { fill : "red" , shape : "dot" , text : "robot is mandatory" } ) ;
169+ return ;
170+ }
171+ if ( NoderedUtil . IsNullEmpty ( workflowid ) ) {
172+ this . node . status ( { fill : "red" , shape : "dot" , text : "workflow is mandatory" } ) ;
173+ return ;
174+ }
165175 var rpacommand = {
166176 command : "invoke" ,
167- workflowid : this . config . workflow ,
177+ workflowid : workflowid ,
168178 jwt : msg . jwt ,
169179 data : { payload : msg . payload }
170180 }
171181 this . node . status ( { fill : "blue" , shape : "dot" , text : "Robot running..." } ) ;
172- this . con . SendMessage ( JSON . stringify ( rpacommand ) , this . config . queue , correlationId , true ) ;
182+ this . con . SendMessage ( JSON . stringify ( rpacommand ) , targetid , correlationId , true ) ;
173183 } catch ( error ) {
174184 NoderedUtil . HandleError ( this , error ) ;
175185 try {
0 commit comments