Last active
October 25, 2026 11:36
-
-
Save WhereJuly/8dfcc0018efe0c9bbc5e01c807ab3889 to your computer and use it in GitHub Desktop.
payment-process-saga.bpmn.mmd
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
| bpmn LR | |
| layout elk | |
| pool payment_process "Payment process" | |
| lane saga "Payment Saga" | |
| message start payment_initiated "Payment initiated" | |
| service task debit_payer "DEBIT_PAYER_FUNDS\ Debit payer funds" | |
| error boundary debit_failed "Debit failed" | |
| subprocess transaction_checks "PERFORM_FRAUD_CHECK\ Perform transaction\ checks" | |
| parallel gate checks_fork | |
| port checks_fraud_out n | |
| port checks_external_out s | |
| service task fraud_check "Perform anti-fraud\ check" | |
| service task external_checks "Perform compliance\ and\ restriction-control\ checks" | |
| parallel gate checks_join | |
| checks_fraud_out --> fraud_check | |
| checks_external_out --> external_checks | |
| fraud_check --> checks_join | |
| external_checks --> checks_join | |
| timer boundary check_cutoff "Check cut-off: 30\ seconds" | |
| error boundary check_failed "Check failed" | |
| exclusive gate fraud_outcome "FraudCheck outcome?" | |
| port fraud_approved_out n | |
| port fraud_suspicious_out s | |
| user task manual_review "Manual review by\ operator" | |
| event gate await_manual_review "Await manual-review\ decision or cut-off" | |
| port manual_decision_out n | |
| port manual_cutoff_out s | |
| message catch manual_decision "Manual-review\ decision" | |
| timer catch manual_review_cutoff "20 minutes" | |
| exclusive gate manual_outcome "Payment approved?" | |
| port manual_approved_out n | |
| port manual_denied_out s | |
| service task transfer_to_payee "TRANSFER_FUNDS_TO_PAYEE\ Transfer funds to\ payee" | |
| error boundary transfer_failed "Transfer failed" | |
| comment transfer_pivot "Pivot point —\ transfer to payee\ is irreversible" e | |
| comment check_cutoff_decision "Critical\ requirement: The\ cost of processing\ an erroneous\ payment is\ significantly\ higher than the\ potential loss from\ rejecting a valid\ payment." e | |
| comment manual_review_cutoff_decision "Critical\ requirement: The\ cost of processing\ an erroneous\ payment is\ significantly\ higher than the\ potential loss from\ rejecting a valid\ payment." e | |
| parallel gate suspicious_fork | |
| port security_notification_out s | |
| port suspicious_refund_out n | |
| send task notify_security "NOTIFY_SECURITY_SYSTEM\ Notify Security\ System" | |
| parallel gate suspicious_join | |
| port suspicious_join_out e | |
| compensation task refund_payer "REFUND_PAYER\ Automatically\ refund payer" | |
| service task rollback_payment_status "ROLLBACK_PAYMENT_STATUS\ Roll back payment\ status" | |
| exclusive gate refund_result "Refund reason?" | |
| port suspicious_refund_outcome s | |
| port other_refund_outcome n | |
| exclusive gate payment_result "Payment result?" | |
| port completed_notification_out n | |
| port refunded_notification_out s | |
| send task notify_completed "SEND_PAYMENT_STATUS_NOTIFICATION\ Send\ completed-payment\ notification" | |
| send task notify_refunded "SEND_PAYMENT_STATUS_NOTIFICATION\ Send\ refunded-payment\ notification" | |
| end payment_completed "PAYMENT_COMPLETED" | |
| end payment_refunded "PAYMENT_REFUNDED" | |
| error end payment_failed "PAYMENT_FAILED_SYSTEM" | |
| payment_initiated --> debit_payer | |
| debit_payer --> transaction_checks | |
| debit_failed --> payment_failed | |
| transaction_checks --> fraud_outcome | |
| check_cutoff --> refund_payer "default: denied" | |
| check_cutoff --- check_cutoff_decision | |
| check_failed --> refund_payer | |
| fraud_approved_out --> transfer_to_payee "approved" | |
| fraud_outcome --> manual_review "manual review\ required" | |
| fraud_outcome --> refund_payer "denied" | |
| fraud_suspicious_out --> suspicious_fork "suspicious" | |
| manual_review --> await_manual_review | |
| manual_decision_out --> manual_decision "decision received" | |
| manual_cutoff_out --> manual_review_cutoff "no decision" | |
| manual_decision --> manual_outcome | |
| manual_review_cutoff --> refund_payer "default: denied" | |
| manual_review_cutoff --- manual_review_cutoff_decision | |
| manual_approved_out --> transfer_to_payee "approved" | |
| manual_denied_out --> refund_payer "denied" | |
| transfer_to_payee --> payment_result | |
| transfer_to_payee --- transfer_pivot | |
| transfer_failed --> refund_payer | |
| security_notification_out --> notify_security | |
| suspicious_refund_out --> refund_payer | |
| notify_security --> suspicious_join | |
| refund_payer --> rollback_payment_status | |
| rollback_payment_status --> refund_result | |
| suspicious_refund_outcome --> suspicious_join "suspicious" | |
| other_refund_outcome --> payment_result "denied or failed" | |
| suspicious_join_out --> payment_result | |
| completed_notification_out --> notify_completed "completed" | |
| refunded_notification_out --> notify_refunded "refunded" | |
| notify_completed --> payment_completed | |
| notify_refunded --> payment_refunded |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment