Skip to content

feature/613-Receive-Task-support#643

Open
alisku wants to merge 10 commits into
mainfrom
feature/613-Receive-Task-support
Open

feature/613-Receive-Task-support#643
alisku wants to merge 10 commits into
mainfrom
feature/613-Receive-Task-support

Conversation

@alisku

@alisku alisku commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

No description provided.

alisku added 3 commits June 14, 2026 22:15
 - publish the message only once per BPMN spec

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements comprehensive support for BPMN Receive Tasks, including execution logic, multi-instance loop characteristics, boundary event subscriptions, and instantiating receive tasks that can trigger new process instances. The review feedback highlights two critical issues regarding token state persistence: first, in createMultiInstanceReceiveTask, the updated token returned by createReceiveTaskSubscription is discarded and never persisted in the Waiting state; second, in createReceiveTaskSubscription, the token state is updated to TokenStateWaiting only after the subscription is saved, causing the subscription to be persisted with an incorrect token state.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread pkg/bpmn/engine.go
Comment thread pkg/bpmn/engine.go
Comment thread pkg/bpmn/engine.go
variableHolder runtime.VariableHolder,
) (runtime.ExecutionToken, error) {
if err := variableHolder.EvaluateAndSetMappingsToLocalVariables(element.GetInputMapping(), engine.evaluateExpression); err != nil {
currentToken.State = runtime.TokenStateFailed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my point of view, it should probably create an incident because you are not able to continue, but please confirm this with Adam.

Comment thread pkg/bpmn/engine.go
OutputVariables: nil,
})
if err != nil {
currentToken.State = runtime.TokenStateFailed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my point of view, it should probably create an incident because you are not able to continue, but please confirm this with Adam.

Comment thread pkg/bpmn/engine.go
messageDef := bpmn20.TMessageEventDefinition{MessageRef: element.MessageRef}
correlationKey, err := engine.evaluateMessageCorrelationKey(*instance.ProcessInstance().Definition, variableHolder.LocalVariables(), messageDef)
if err != nil {
currentToken.State = runtime.TokenStateFailed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my point of view, it should probably create an incident because you are not able to continue, but please confirm this with Adam.

Comment thread pkg/bpmn/engine.go
}
messageName, err := engine.getMessageName(*instance.ProcessInstance().Definition, messageDef)
if err != nil {
currentToken.State = runtime.TokenStateFailed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my point of view, it should probably create an incident because you are not able to continue, but please confirm this with Adam.

Comment thread pkg/bpmn/events_api.go
Comment thread pkg/bpmn/instantiating_receive_task_test.go Outdated
Comment thread pkg/bpmn/sub_process_test.go Outdated
Comment thread pkg/bpmn/sub_process_test.go Outdated
Comment thread pkg/bpmn/sub_process_test.go Outdated
Comment thread pkg/bpmn/sub_process_test.go Outdated
Comment thread pkg/bpmn/sub_process_test.go Outdated
Comment thread test/e2e/receive_task_instantiating_test.go Outdated
Comment thread test/e2e/receive_task_instantiating_test.go Outdated
Comment thread test/e2e/receive_task_instantiating_test.go Outdated
alisku added 6 commits June 15, 2026 14:15
 - AI findings fixes
 - Remove sleep from sub_process_test.go
…ask-support

# Conflicts:
#	pkg/bpmn/sub_process_test.go
 - Move non-test helper functions to the end of the file
 - fix test race conditions
 - Use zenbpm namespace instead of zeebe. Don't use Camunda links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants