Start the case at the message's own start event instead of by process key - #9
Merged
Merged
Conversation
… key, release 6.1.1 A process may have more than one start event - a plain one for the start form and the message start event the `receive-message` link hangs on - and Operaton enters a process started by key at whichever it considers the initial activity, which is the plain one. The message's own start event then never runs, so neither do the execution listeners that put the message 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.
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
SlackMessageProcessStarterno longer starts the process by its definition key. It now creates the case document and correlates the start message of the element thereceive-messagelink hangs on.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 message's own start event then never runs, so neither do the execution listeners that put the message 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.Tests
Two tests added for the start path, which had no coverage before: one asserting the correlation targets the linked process definition, carries the document id as business key and creates the process-document association, one asserting the message is handed on as process variables.
Full suite green locally: 61 tests across 7 classes, including the 5
SlackReceiveMessageITintegration tests.Released as 6.1.1 (backend + frontend).