Skip to content

Commit

Permalink
Fixed #2
Browse files Browse the repository at this point in the history
  • Loading branch information
ranisharim-crossid committed Dec 5, 2020
1 parent 1d16087 commit ac21651
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ private List<Tuple<String, UpdateOneModel<Document>>> handleWorkflowInstanceEven
var timestamp = new Date(record.getTimestamp());

var castRecord = (WorkflowInstanceRecordValue) record.getValue();
if (record.getKey() != castRecord.getWorkflowKey()) {
if (record.getKey() == castRecord.getWorkflowInstanceKey()) {
result.add(workflowInstanceReplaceCommand(record, timestamp));
}
result.add(elementInstanceReplaceCommand(record, timestamp));
Expand All @@ -246,6 +246,7 @@ private Tuple<String, UpdateOneModel<Document>> workflowInstanceReplaceCommand(f
document.append("parentElementInstanceKey", castRecord.getParentElementInstanceKey());
}

System.out.println("Intent name: " + record.getIntent().name() + " Key: " + record.getKey() + " Workflow instance Key: " + castRecord.getWorkflowInstanceKey());
switch (record.getIntent().name()) {
case "ELEMENT_ACTIVATED":
document.append("state", "active").append("startTime", timestamp);
Expand Down

0 comments on commit ac21651

Please sign in to comment.