Skip to content

Commit

Permalink
Bulk Timeout Changes (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrg authored and Sam committed Sep 24, 2019
1 parent 5a7d06a commit 7e6bef1
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ group Prepare Handler Consume
end

group Reference: Prepare -> Position Produce message
alt If type == 'bulk-prepare'
alt If action == 'bulk-prepare'
note right of PREP_HANDLER #yellow
Message:
{
Expand All @@ -369,8 +369,8 @@ group Reference: Prepare -> Position Produce message
event: {
id: <uuid>,
responseTo: <previous.uuid>,
type: bulk-position,
action: prepare,
type: position,
action: bulk-prepare,
createdAt: <timestamp>,
state: {
status: "success",
Expand All @@ -381,7 +381,7 @@ group Reference: Prepare -> Position Produce message
}
end note
PREP_HANDLER -> TOPIC_TRANSFER_POSITION: Route & Publish Position event for Payer\n<color #FF0000><b>Error codes:</b> 2003</color>
else If type == 'prepare'
else If action == 'prepare'
note right of PREP_HANDLER #yellow
Message:
{
Expand Down Expand Up @@ -414,7 +414,7 @@ group Reference: Prepare -> Position Produce message
end

group Reference: Failure in Prepare Transfer Validation
alt If type == 'bulk-prepare'
alt If action == 'bulk-prepare'
note right of PREP_HANDLER #yellow
Message:
{
Expand All @@ -436,7 +436,7 @@ group Reference: Failure in Prepare Transfer Validation
id: <uuid>,
responseTo: <previous.uuid>,
type: bulk-processing,
action: prepare,
action: bulk-prepare,
createdAt: <timestamp>,
state: {
status: 'error',
Expand All @@ -448,7 +448,7 @@ group Reference: Failure in Prepare Transfer Validation
}
end note
PREP_HANDLER -> TOPIC_BULK_PROCESSING: Publish Prepare failure event to Bulk Processing Topic (for Payer) \n<color #FF0000><b>Error codes:</b> 2003</color>
else If type == 'prepare'
else If action == 'prepare'
note right of PREP_HANDLER #yellow
Message:
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ end


group Reference: Failure in Position Validation (Prepare)
alt If type == 'bulk-prepare'
alt If action == 'bulk-prepare'
note right of POS_HANDLER #yellow
Message:
{
Expand All @@ -243,7 +243,7 @@ group Reference: Failure in Position Validation (Prepare)
id: <uuid>,
responseTo: <previous.uuid>,
type: bulk-processing,
action: prepare,
action: bulk-prepare,
createdAt: <timestamp>,
state: {
status: 'error',
Expand All @@ -257,7 +257,7 @@ group Reference: Failure in Position Validation (Prepare)
POS_HANDLER -> TOPIC_BULK_PROCESSING: Publish Position failure event (in Prepare) to Bulk Processing Topic (for Payer) \n<color #FF0000><b>Error codes:</b> 2003</color>
activate TOPIC_BULK_PROCESSING
deactivate TOPIC_BULK_PROCESSING
else If type == 'prepare'
else If action == 'prepare'
note right of POS_HANDLER #yellow
Message:
{
Expand All @@ -279,7 +279,7 @@ group Reference: Failure in Position Validation (Prepare)
id: <uuid>,
responseTo: <previous.uuid>,
type: notification,
action: prepare,
action: position,
createdAt: <timestamp>,
state: {
status: 'error',
Expand All @@ -298,7 +298,7 @@ group Reference: Failure in Position Validation (Prepare)
end

group Reference: Position Validation Success case (Prepare)
alt If type == 'bulk-prepare'
alt If action == 'bulk-prepare'
note right of POS_HANDLER #yellow
Message:
{
Expand All @@ -315,7 +315,7 @@ group Reference: Position Validation Success case (Prepare)
id: <uuid>,
responseTo: <previous.uuid>,
type: bulk-processing,
action: prepare,
action: bulk-prepare,
createdAt: <timestamp>,
state: {
status: "success",
Expand All @@ -328,7 +328,7 @@ group Reference: Position Validation Success case (Prepare)
POS_HANDLER -> TOPIC_BULK_PROCESSING: Publish Position Success event (in Prepare) to Bulk Processing Topic\n<color #FF0000><b>Error codes:</b> 2003</color>
activate TOPIC_BULK_PROCESSING
deactivate TOPIC_BULK_PROCESSING
else If type == 'prepare'
else If action == 'prepare'
note right of POS_HANDLER #yellow
Message:
{
Expand All @@ -344,8 +344,8 @@ group Reference: Position Validation Success case (Prepare)
event: {
id: <uuid>,
responseTo: <previous.uuid>,
type: transfer,
action: prepare,
type: notification,
action: abort,
createdAt: <timestamp>,
state: {
status: "success",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ group Bulk Processing Handler Consume

break
group Validate Event
BULK_PROC_HANDLER <-> BULK_PROC_HANDLER: Validate event - Rule:\ntype == 'bulk-processing' && action IN\n['prepare-duplicate', 'prepare', 'timeout-received',\n'fulfil-duplicate', 'commit', 'reject', 'abort',\n'timeout-reserved']\n<color #FF0000><b>Error codes:</b> 2001</color>
BULK_PROC_HANDLER <-> BULK_PROC_HANDLER: Validate event - Rule:\ntype == 'bulk-processing' && action IN\n['bulk-prepare-duplicate<color #red>*</color>', 'bulk-prepare',\n'bulk-timeout-received', 'bulk-commit-duplicate<color #red>*</color>',\n'bulk-commit', 'bulk-reject<color #red>*</color>', 'bulk-abort<color #red>*</color>',\n'bulk-timeout-reserved']\n<color #red><b>Error codes:</b> 2001</color>\n<color #red>*</color> Not implemented
end
end

Expand Down Expand Up @@ -145,10 +145,10 @@ group Bulk Processing Handler Consume
note right of BULK_PROC_HANDLER #lightgrey
processingState = 'ACCEPTED'
end note
else action IN ['timeout-received', 'timeout-reserved']
else action IN ['bulk-timeout-received', 'bulk-timeout-reserved']
note right of BULK_PROC_HANDLER #lightgrey
incompleteBulkState = null
completedBulkState = 'COMPLETED'
incompleteBulkState = 'EXPIRING'
completedBulkState = 'EXPIRED'
processingState = 'EXPIRED'
end note
else all other actions
Expand All @@ -158,11 +158,11 @@ group Bulk Processing Handler Consume
end note
end
else bulkTransferInfo.bulkTransferState IN ['ACCEPTED']
alt action == 'timeout-reserved'
alt action == 'bulk-timeout-reserved'
note right of BULK_PROC_HANDLER #lightgrey
criteriaState = 'ACCEPTED'
incompleteBulkState = null
completedBulkState = 'COMPLETED'
incompleteBulkState = 'EXPIRING'
completedBulkState = 'EXPIRED'
processingState = 'EXPIRED'
end note
else all other actions
Expand All @@ -171,7 +171,7 @@ group Bulk Processing Handler Consume
errorMessage = 'Invalid action for bulk in ACCEPTED state'
end note
end
else bulkTransferInfo.bulkTransferState IN ['PROCESSING', 'PENDING_FULFIL']
else bulkTransferInfo.bulkTransferState IN ['PROCESSING', 'PENDING_FULFIL', 'EXPIRING']
note right of BULK_PROC_HANDLER #lightgrey
criteriaState = 'ACCEPTED'
incompleteBulkState = 'PENDING_FULFIL'
Expand All @@ -193,10 +193,10 @@ group Bulk Processing Handler Consume
note right of BULK_PROC_HANDLER #lightgrey
processingState = 'FULFIL_INVALID'
end note
else action == 'timeout-reserved'
else action == 'bulk-timeout-reserved'
note right of BULK_PROC_HANDLER #lightgrey
incompleteBulkState = null
completedBulkState = 'COMPLETED'
incompleteBulkState = 'EXPIRING'
completedBulkState = 'EXPIRED'
processingState = 'EXPIRED'
end note
else all other actions
Expand Down Expand Up @@ -284,7 +284,7 @@ group Bulk Processing Handler Consume
event: {
id: <uuid>,
responseTo: <previous.uuid>,
type: bulk-notification,
type: notification,
action: bulk-notification,
createdAt: <timestamp>,
state: {
Expand Down Expand Up @@ -343,7 +343,7 @@ group Bulk Processing Handler Consume
event: {
id: <uuid>,
responseTo: <previous.uuid>,
type: bulk-notification,
type: notification,
action: bulk-notification,
createdAt: <timestamp>,
state: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ group Timeout Handler Consume
event: {
id: <uuid>,
type: bulk-processing,
action: timeout-received,
action: bulk-timeout-received,
createdAt: <timestamp>,
state: {
status: 'error',
Expand Down Expand Up @@ -396,8 +396,8 @@ group Timeout Handler Consume
metadata: {
event: {
id: <uuid>,
type: bulk-position,
action: timeout-reserved,
type: position,
action: bulk-timeout-reserved,
createdAt: <timestamp>,
state: {
status: 'error',
Expand Down

0 comments on commit 7e6bef1

Please sign in to comment.