You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by zh...@apache.org on 2019/06/21 10:34:18 UTC

[servicecomb-pack] 02/05: SCB-1321 Add state machine uml file

This is an automated email from the ASF dual-hosted git repository.

zhanglei pushed a commit to branch SCB-1321
in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git

commit 6e592d03b1c347a542bb6949d45f4afc4a4866f1
Author: Lei Zhang <zh...@apache.org>
AuthorDate: Fri Jun 21 17:37:26 2019 +0800

    SCB-1321 Add state machine uml file
---
 docs/fsm/plantuml/saga-state-diagram.puml | 52 +++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/docs/fsm/plantuml/saga-state-diagram.puml b/docs/fsm/plantuml/saga-state-diagram.puml
new file mode 100644
index 0000000..429687d
--- /dev/null
+++ b/docs/fsm/plantuml/saga-state-diagram.puml
@@ -0,0 +1,52 @@
+@startuml
+hide empty description
+
+[*] --> IDEL : SagaStartedEvent
+
+IDEL --> PARTIALLY_ACTIVE : TxStartedEvent<font color=blue>:addTxEntity</font>
+
+IDEL --> SUSPENDED : SagaEndedEvent
+
+IDEL --> SUSPENDED : SagaAbortedEvent
+
+PARTIALLY_COMMITTED --> PARTIALLY_COMMITTED : TxEndedEvent<font color=blue>:UpdateTxEntity</font>
+
+PARTIALLY_COMMITTED --> COMMITTED : SagaEndedEvent
+
+PARTIALLY_COMMITTED --> PARTIALLY_ACTIVE : TxStartedEvent<font color=blue>:AddTxEntity</font>
+
+PARTIALLY_COMMITTED --> FAILED : SagaAbortedEvent<font color=red>:doCompensation</font>
+
+PARTIALLY_COMMITTED --> SUSPENDED : SagaTimeoutEvent
+
+PARTIALLY_ACTIVE --> PARTIALLY_ACTIVE : TxStartedEvent<font color=blue>:addTxEntity</font>
+
+PARTIALLY_ACTIVE --> PARTIALLY_COMMITTED : TxEndedEvent<font color=blue>:UpdateTxEntity</font>
+
+PARTIALLY_ACTIVE --> FAILED : TxAbortedEvent<font color=blue>:UpdateTxEntity</font><font color=red>,doCompensation</font>
+
+PARTIALLY_ACTIVE --> SUSPENDED : SagaTimeoutEvent
+
+SUSPENDED --> SUSPENDED : SagaTimeoutEvent
+
+FAILED --> COMPENSATED : SagaAbortedEvent<font color=red>:doCompensation</font>
+
+FAILED --> SUSPENDED : SagaTimeoutEvent
+
+FAILED --> FAILED : TxComponsitedEvent<font color=blue>:UpdateTxEntity</font>\nTxStartedEvent<font color=blue>:AddTxEntity</font>\nTxEndedEvent<font color=red>:doCompensation</font>
+
+COMPENSATED --> [*]
+
+COMMITTED --> [*]
+
+SUSPENDED --> [*]
+
+IDEL: Map<localTxId,TxEntity> txEntityMap
+PARTIALLY_ACTIVE: Map<localTxId,TxEntity> txEntityMap
+PARTIALLY_COMMITTED: Map<localTxId,TxEntity> txEntityMap
+FAILED: Map<localTxId,TxEntity> txEntityMap
+COMMITTED: Map<localTxId,TxEntity> txEntityMap
+COMPENSATED: Map<localTxId,TxEntity> txEntityMap
+SUSPENDED: Map<localTxId,TxEntity> txEntityMap
+
+@enduml