@@ -1858,23 +1858,24 @@ export class FormCtrl extends entityCtrl<WorkflowInstance> {
18581858 if ( ! NoderedUtil . IsNullEmpty ( this . localexchangequeue ) ) return ;
18591859 const result = await NoderedUtil . RegisterExchange ( WebSocketClient . instance , exchange , "direct" ,
18601860 "" , async ( msg : QueueMessage , ack : any ) => {
1861- // this.OnMessage(msg, ack);
18621861 console . log ( msg ) ;
18631862 ack ( ) ;
1864- // this.loadData();
1865- this . model . payload = Object . assign ( this . model . payload , msg . data . payload ) ;
1866- if ( ! NoderedUtil . IsNullEmpty ( msg . data . payload . form ) ) {
1867- if ( msg . data . payload . form != this . model . form ) {
1868- const res = await NoderedUtil . Query ( "forms" , { _id : msg . data . payload . form } , null , { _created : - 1 } , 1 , 0 , null ) ;
1869- if ( res . length > 0 ) {
1870- this . model . form = msg . data . payload . form ;
1871- this . form = res [ 0 ] ;
1872- } else {
1873- console . error ( "Failed locating form " + msg . data . payload . form )
1863+ if ( NoderedUtil . IsNullEmpty ( msg . routingkey ) || msg . routingkey == this . instanceid ) {
1864+ // this.loadData();
1865+ this . model . payload = Object . assign ( this . model . payload , msg . data . payload ) ;
1866+ if ( ! NoderedUtil . IsNullEmpty ( msg . data . payload . form ) ) {
1867+ if ( msg . data . payload . form != this . model . form ) {
1868+ const res = await NoderedUtil . Query ( "forms" , { _id : msg . data . payload . form } , null , { _created : - 1 } , 1 , 0 , null ) ;
1869+ if ( res . length > 0 ) {
1870+ this . model . form = msg . data . payload . form ;
1871+ this . form = res [ 0 ] ;
1872+ } else {
1873+ console . error ( "Failed locating form " + msg . data . payload . form )
1874+ }
18741875 }
18751876 }
1877+ this . renderform ( ) ;
18761878 }
1877- this . renderform ( ) ;
18781879 } , ( msg ) => {
18791880 // if (this != null && this.node != null) this.node.status({ fill: "red", shape: "dot", text: "Disconnected" });
18801881 // setTimeout(this.connect.bind(this), (Math.floor(Math.random() * 6) + 1) * 500);
0 commit comments