From ac21651ce47c258165c7eb559c6a6ab46aeb778e Mon Sep 17 00:00:00 2001 From: Rani Sharim Date: Sat, 5 Dec 2020 14:43:57 +0200 Subject: [PATCH] Fixed #2 --- src/main/java/io/crossid/zeebe/exporter/ZeebeMongoClient.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/crossid/zeebe/exporter/ZeebeMongoClient.java b/src/main/java/io/crossid/zeebe/exporter/ZeebeMongoClient.java index 40ca4b3..a4fcd00 100644 --- a/src/main/java/io/crossid/zeebe/exporter/ZeebeMongoClient.java +++ b/src/main/java/io/crossid/zeebe/exporter/ZeebeMongoClient.java @@ -222,7 +222,7 @@ private List>> 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)); @@ -246,6 +246,7 @@ private Tuple> 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);