fix(bpmn): fix AI Email Support Agent layout and lint issues#94
fix(bpmn): fix AI Email Support Agent layout and lint issues#94HanselIdes wants to merge 5 commits intomainfrom
Conversation
- Swap order of Review case resolution and Final answer tasks so human review happens before sending the customer email (correct HiL flow) - Move Case solved end event to the right of both tasks, fix overlapping sequence flow edges - Add missing BPMNLabel on unnamed joining gateway (Gateway_0kp1fqr) - Fix fake-join on Specialist answered event by introducing an XOR join gateway (Gateway_join_specialist) inside the ad-hoc sub-process - Convert implicit-end escalation throw event to explicit end by adding Event_human_control_end downstream of Event_1jfz6dk - Add missing BPMNShape/BPMNEdge for TextAnnotation_loan_approval_intro and its association (no-bpmndi lint errors) - Consolidate duplicate global escalation and error elements; remove unused Message_0fr5ip9 Reported via: https://camunda.slack.com/archives/C05S2QM684U/p1776068928897879 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Review case resolution (user task) now precedes Final answer to customer (service task) in the AGENT_SUCCESS path. Update both affected test cases to complete Activity_1647ldd before Activity_0d9av47, and add ASSERT_ELEMENT_INSTANCES routing validation before the user task step. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e overlaps Manual layout refinements: relocated TextAnnotation_loan_approval_intro and resized elements to eliminate the remaining overlap warnings detected by bpmnlint. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diagram screenshot (post-fix)
Rendered via camunda-viewer + Playwright after all visual and lint fixes were applied.
What to verify visually:
|
There was a problem hiding this comment.
Pull request overview
Fixes the AI Email Support Agent blueprint by correcting the human-in-the-loop ordering (review happens before sending the final customer email), and resolves multiple bpmnlint/diagram (DI) issues to reach a clean lint state.
Changes:
- Reordered the “Review case resolution” user task to occur before “Final answer to customer”.
- Added/adjusted BPMN elements and DI (explicit join gateway, explicit end event, missing labels/shapes/edges) to eliminate bpmnlint errors/warnings.
- Updated JSON process test cases to match the corrected execution order.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| solutions/bank-ai-loan-approval/AI Email Support Agent.bpmn | Corrects task sequencing and fixes DI/lint issues (explicit join/end, labels, shapes/edges, de-dup of escalation/error elements). |
| solutions/bank-ai-loan-approval/test/src/test/resources/test-cases/AI Email Support Agent.test.json | Updates test instruction order to complete the review user task before the final email service task, adding assertions for expected active elements. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@philippfromme No, that's a weird arrow, thanks for catching it. |




Summary
Fixes two issues reported in Slack (thread) with the AI Email Support Agent blueprint.
Logic fix: Swapped "Review case resolution" and "Final answer to customer" so the human reviewer approves the agent's response before it is sent to the customer. The previous order inverted the human-in-the-loop step.
Layout and DI fixes:
<bpmndi:BPMNLabel />on unnamed join gatewayGateway_0kp1fqr— this element was omitted by the modeling tool for unnamed gateways, which surfaced a serialization bugGateway_join_specialist) before "Specialist answered" inside the ad-hoc sub-process to fix afake-joinlint violationno-implicit-endBPMNShape/BPMNEdgeforTextAnnotation_loan_approval_introand its association, which were in the process XML but missing from the diagram (no-bpmndierrors)Message_0fr5ip9Result: 0 bpmnlint errors, 0 warnings (down from 2 errors, 8 warnings).
Test fix: Updated test cases to complete the user task ("Review case resolution") before the service task ("Final answer to customer") to match the corrected flow order.
Test plan
npx bpmnlint --config .bpmnlintrc "solutions/bank-ai-loan-approval/AI Email Support Agent.bpmn"— exits 0, 0 errors, 0 warningsmvn testpasses in CI🤖 Generated with Claude Code