public WorkflowInstanceAssert hasPayload(String key, Object expectedValue) { final Optional<Record<WorkflowInstanceRecordValue>> record = RecordingExporter.workflowInstanceRecords() .withWorkflowInstanceKey(workflowInstanceKey) .withKey(workflowInstanceKey) .filter(intent(INSTANCE_ENDED_INTENTS)) .findFirst(); if (record.isPresent()) { hasPayload(record.get(), key, expectedValue); } else { failWithMessage("Expected workflow instance to contain payload but instance is not ended"); } return this; }
public WorkflowInstanceAssert hasPayload(String key, Object expectedValue) { final Optional<Record<WorkflowInstanceRecordValue>> record = RecordingExporter.workflowInstanceRecords() .withWorkflowInstanceKey(workflowInstanceKey) .withKey(workflowInstanceKey) .filter(intent(INSTANCE_ENDED_INTENTS)) .findFirst(); if (record.isPresent()) { hasPayload(record.get(), key, expectedValue); } else { failWithMessage("Expected workflow instance to contain payload but instance is not ended"); } return this; }
public WorkflowInstanceAssert isEnded() { final boolean isEnded = exists( RecordingExporter.workflowInstanceRecords() .withWorkflowInstanceKey(workflowInstanceKey) .withKey(workflowInstanceKey) .filter(intent(INSTANCE_ENDED_INTENTS))); if (!isEnded) { failWithMessage("Expected workflow instance to be <ended> but was <active>"); } return this; }
public WorkflowInstanceAssert isEnded() { final boolean isEnded = exists( RecordingExporter.workflowInstanceRecords() .withWorkflowInstanceKey(workflowInstanceKey) .withKey(workflowInstanceKey) .filter(intent(INSTANCE_ENDED_INTENTS))); if (!isEnded) { failWithMessage("Expected workflow instance to be <ended> but was <active>"); } return this; }