Skip to content

Commit caa0420

Browse files
committed
Add support for unknown form
1 parent c673682 commit caa0420

4 files changed

Lines changed: 9 additions & 1 deletion

File tree

OpenFlow/src/Messages/CreateWorkflowInstanceMessage.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export class CreateWorkflowInstanceMessage<T extends Base> implements IReplyMess
1414
public parentid: string;
1515
public name: string;
1616
public initialrun: boolean;
17+
public form: string;
1718

1819
public payload: any;
1920

OpenFlow/src/Messages/Message.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,6 +1353,7 @@ export class Message {
13531353
if (res.length != 1) throw new Error("Unknown target id " + msg.targetid);
13541354
workflow = res[0];
13551355
msg.state = "new";
1356+
msg.form = "unknown";
13561357
(msg as any).workflow = msg.workflowid;
13571358

13581359
if (Util.IsNullEmpty(msg.correlationId)) {

OpenFlow/src/public/Controllers.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,6 +1552,12 @@ module openflow {
15521552
this.$location.path("/main");
15531553
if (!this.$scope.$$phase) { this.$scope.$apply(); }
15541554
return;
1555+
} else if (this.model.form === "unknown") {
1556+
console.debug("Form is unknown for instance, send empty message");
1557+
console.debug("SendOne: " + this.workflow._id + " / " + this.workflow.queue);
1558+
await this.SendOne(this.workflow.queue, {});
1559+
this.loadData();
1560+
return;
15551561
} else if (this.model.form !== "") {
15561562
var res = await this.api.Query("forms", { _id: this.model.form }, null, { _created: -1 }, 1);
15571563
if (res.length > 0) { this.form = res[0]; } else {

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.485
1+
0.0.486

0 commit comments

Comments
 (0)