Start the case at the event's own start event instead of by process key - #5
Merged
Merged
Conversation
Add the S3 bucket that the backend now dual-publishes to as a dependency repository, so artifacts released there resolve without waiting for the Maven Central sync.
…ey, release 0.1.2 A process may have more than one start event - a plain one for the start form and the message start event the `receive-cloud-event` link hangs on - and Operaton enters a process started by key at whichever it considers the initial activity, which is the plain one. The event's own start event then never runs, so neither do the execution listeners that put the event on the case, and the case is created empty. The case is now created directly and the start message of the linked element correlated to it, with the document id as business key so `doc:` resolves before the process-document association exists. Also makes the two silent skips - no linked case definition, superseded case definition version - visible in the logs, and turns the BPMN lookup of the message name into a clear error instead of a NullPointerException.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
CloudEventProcessLinkListenerno longer starts the process by its definition key. It now creates the case document and correlates the start message of the element thereceive-cloud-eventlink hangs on.Two smaller fixes come along, both in the same code path:
getMessageNameerrors clearly when the activity is not in the model or carries no message event definition, instead of throwing aNullPointerException.Why
A process may have more than one start event — a plain one for the start form, and the message start event the link hangs on. Operaton enters a process started by key at whichever it considers the initial activity, which is the plain one. The event's own start event then never runs, so neither do the execution listeners that put the event on the case, and the case is created empty.
The document id is passed as the process instance business key: Valtimo resolves
doc:through the process-document association and falls back to the business key while that association does not exist yet — which is the case during the start event's own listeners, since the association can only be created once the instance has an id.This is the same fix as imap-mail-plugin 0.0.4 (
e031408), ported over.Not in scope
signalWaitingExecutionsstill signals every execution parked at the activity, across all cases. The imap and slack plugins narrow this down by thread, but a cloud event carries no correlation key inReceiveCloudEventProperties, so that needs a design decision rather than a port. Left as is deliberately.Tests
ApplicationStartITpasses, which covers the changed bean wiring (DocumentService+ProcessDocumentAssociationService). The listener has no unit tests in this repo, so the start path itself is not covered by a test — worth adding separately.Released as 0.1.2 (backend + frontend).