Skip to content

Commit

Permalink
fix: Check "Done" States First
Browse files Browse the repository at this point in the history
Status such as `Delivered`, `Redelivered` and `Cancelled` (BE; sic!)
are all considered final states, where we do not expect to download
anymore.

To understand, it may be important to know, that from this client's
perspective the state `Delivered` is only reached after successful
download and XLIFF import, as only then the API is called to mark
corresponding tasks (and subsequently the submission) as `Done` aka
`Delivered`.

TL;DR - Moved all "final state options" before checking for possible
download translation errors.
  • Loading branch information
mmichaelis committed Jan 10, 2025
1 parent da9e5e9 commit 8f4d842
Showing 1 changed file with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,6 @@
</AutomatedTask>

<Switch name="CheckDownloadTranslation" defaultSuccessor="DownloadTranslation">
<Case successor="HandleDownloadTranslationError">
<!-- if there are errors that are not retried automatically, let the user handle them in the error user task -->
<And>
<NotEmpty variable="workflowActionIssues"/>
<Equal><Get variable="remainingAutomaticRetries"/><Integer value="0"/></Equal>
</And>
</Case>
<Case successor="ReviewRedeliveredTranslation">
<Equal><Get variable="globalLinkSubmissionStatus"/><String value="REDELIVERED"/></Equal>
</Case>
Expand All @@ -273,6 +266,20 @@
<Case successor="CancelTranslation">
<Get variable="cancelRequested"/>
</Case>
<!--
Must be last option: As all states above signal a "done" state, where
we would not expect to retry a download, these must be checked first.
-->
<Case successor="HandleDownloadTranslationError">
<!--
If there are errors that are not retried automatically, let the user
handle them in the error user task.
-->
<And>
<NotEmpty variable="workflowActionIssues"/>
<Equal><Get variable="remainingAutomaticRetries"/><Integer value="0"/></Equal>
</And>
</Case>
</Switch>

<UserTask name="HandleDownloadTranslationError" successor="SelectTaskAfterDownloadTranslationError">
Expand Down

0 comments on commit 8f4d842

Please sign in to comment.