Skip to content

Commit ca0eba0

Browse files
committed
1212
1 parent 3a3b8a3 commit ca0eba0

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

OpenFlowNodeRED/src/nodered/nodes/workflow_nodes.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,11 +498,12 @@ export class run_workflow_node {
498498
this.node.status({ fill: "red", shape: "dot", text: "Unknown workflow " + workflowid });
499499
return;
500500
}
501+
var _id = msg._id;
501502
var queue: string = workflow.queue;
502503
delete msg._id;
503504
msg._type = "instance";
504505
msg.queue = resultqueue;
505-
msg.name = name;
506+
msg.name = "runner: " + name;
506507
msg.state = "pending";
507508
var res3 = await NoderedUtil.InsertOne("workflow_instances", msg, 1, true, jwt);
508509
msg._parentid = res3._id;
@@ -520,11 +521,13 @@ export class run_workflow_node {
520521
(_res2data as any).state = "new";
521522

522523
var res2 = await NoderedUtil.InsertOne("workflow_instances", _res2data, 1, true, jwt);
523-
msg._id = res2._id;
524+
msg.newinstanceid = res2._id;
524525
var message = { _id: res2._id };
525526

526527
this.con.SendMessage(JSON.stringify(message), queue, null, false);
527528

529+
msg._id = _id;
530+
528531
this.node.send(msg);
529532
} catch (error) {
530533
NoderedUtil.HandleError(this, error);

0 commit comments

Comments
 (0)