@@ -123,10 +123,12 @@ export class rpa_workflow_node {
123123
124124 if ( data . payload . command == "invokecompleted" ) {
125125 result . payload = data . payload . data ;
126+ this . node . status ( { fill : "green" , shape : "dot" , text : data . payload . command } ) ;
126127 this . node . send ( result ) ;
127128 }
128129 else if ( data . payload . command == "invokefailed" || data . payload . command == "invokeaborted" || data . payload . command == "error" ) {
129130 result . payload = data . payload ;
131+ this . node . status ( { fill : "red" , shape : "dot" , text : data . payload . command } ) ;
130132 this . node . send ( [ null , null , result ] ) ;
131133 }
132134 else {
@@ -135,6 +137,7 @@ export class rpa_workflow_node {
135137 }
136138 // this.node.send(result);
137139 } catch ( error ) {
140+ this . node . status ( { } ) ;
138141 NoderedUtil . HandleError ( this , error ) ;
139142 }
140143 }
@@ -156,14 +159,18 @@ export class rpa_workflow_node {
156159 jwt : msg . jwt ,
157160 payload : rpacommand
158161 }
162+ this . node . status ( { fill : "blue" , shape : "dot" , text : "Robot running..." } ) ;
159163 this . con . SendMessage ( JSON . stringify ( data ) , this . config . queue , correlationId ) ;
160164 // var data: any = {};
161165 // data.payload = msg.payload;
162166 // data.jwt = msg.jwt;
163167 // this.con.SendMessage(JSON.stringify(data), this.config.queue);
164- this . node . status ( { } ) ;
165168 } catch ( error ) {
166169 NoderedUtil . HandleError ( this , error ) ;
170+ try {
171+ this . node . status ( { fill : "red" , shape : "dot" , text : error } ) ;
172+ } catch ( error ) {
173+ }
167174 }
168175 }
169176 onclose ( ) {
0 commit comments