Skip to content

Commit

Permalink
Add documetaion to integ workflow implemented by raw REST controller
Browse files Browse the repository at this point in the history
  • Loading branch information
longquanzheng committed Dec 23, 2024
1 parent 20103a8 commit f2d0d97
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions integ/workflow/any_command_close/routers.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ import (
"net/http"
)

/**
* This test workflow has 2 states, using REST controller to implement the workflow directly.
*
* State1:
* - WaitUntil method will wait for SignalName1 or SignalName2
* - Execute method will go to State2
* State2:
* - WaitUntil method does nothing
* - Execute method will gracefully complete workflow
*/
const (
WorkflowType = "any_command_close"
State1 = "S1"
Expand Down
12 changes: 12 additions & 0 deletions integ/workflow/any_command_combination/routers.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ import (
"time"
)

/**
* This test workflow has 2 states, using REST controller to implement the workflow directly.
*
* State1:
* - WaitUntil method will run for two attempts. The first attempt attempt will wait for an invalid list of commands.
* This will be rejected by server can cause a 2nd attempt.
* The second attempt will wait for a valid list of commands of signals and timers, using ANY_COMMAND_COMBINATION_COMPLETED
* - Execute method will go to State2
* State2:
* - WaitUntil method is similar to State1 to have 2 attempts. But the combination of commands to wait for is different.
* - Execute method will gracefully complete workflow
*/
const (
WorkflowType = "any_command_combination"
State1 = "S1"
Expand Down

0 comments on commit f2d0d97

Please sign in to comment.