@Test public void shouldCorrelateMessageAndContinue() { // given testClient.createWorkflowInstance(PROCESS_ID, asMsgPack("orderId", "order-123")); // when assertThat( testClient .receiveWorkflowInstanceSubscriptions() .withMessageName("order canceled") .withIntent(WorkflowInstanceSubscriptionIntent.OPENED) .limit(1) .getFirst()) .isNotNull(); testClient.publishMessage("order canceled", "order-123"); // then assertThat( RecordingExporter.workflowInstanceRecords(continueState) .withElementId(continuedElementId) .exists()) .isTrue(); assertThat( RecordingExporter.workflowInstanceRecords(WorkflowInstanceIntent.SEQUENCE_FLOW_TAKEN) .withElementId("to-end") .exists()) .isTrue(); } }
@Test public void shouldCorrelateMessageAndContinue() { // given testClient.createWorkflowInstance(PROCESS_ID, asMsgPack("orderId", "order-123")); // when assertThat( testClient .receiveWorkflowInstanceSubscriptions() .withMessageName("order canceled") .withIntent(WorkflowInstanceSubscriptionIntent.OPENED) .limit(1) .getFirst()) .isNotNull(); testClient.publishMessage("order canceled", "order-123"); // then assertThat( RecordingExporter.workflowInstanceRecords(continueState) .withElementId(continuedElementId) .exists()) .isTrue(); assertThat( RecordingExporter.workflowInstanceRecords(WorkflowInstanceIntent.SEQUENCE_FLOW_TAKEN) .withElementId("to-end") .exists()) .isTrue(); } }
RecordingExporter.workflowInstanceSubscriptionRecords( WorkflowInstanceSubscriptionIntent.CORRELATED) .withMessageName(messageNames.get(0)) .exists()) .isTrue(); RecordingExporter.workflowInstanceSubscriptionRecords( WorkflowInstanceSubscriptionIntent.CORRELATE) .withMessageName(messageNames.get(1)) .onlyCommandRejections() .getFirst()
RecordingExporter.workflowInstanceSubscriptionRecords( WorkflowInstanceSubscriptionIntent.CORRELATED) .withMessageName(messageNames.get(0)) .exists()) .isTrue(); RecordingExporter.workflowInstanceSubscriptionRecords( WorkflowInstanceSubscriptionIntent.CORRELATE) .withMessageName(messageNames.get(1)) .onlyCommandRejections() .getFirst()
testClient .receiveWorkflowInstanceSubscriptions() .withMessageName("message") .withIntent(WorkflowInstanceSubscriptionIntent.OPENED) .exists())
testClient .receiveWorkflowInstanceSubscriptions() .withMessageName("message") .withIntent(WorkflowInstanceSubscriptionIntent.OPENED) .exists())