See prasek/nexus-playground for initial setup.
Also note that commands are provided to exercise the nexus-playground
service.
- operation: help
- operation: sync-op-ok
- operation: async-op-workflow-ok
- operation: async-op-workflow-wait-for-signal
- operation: sync-op-signal
- operation: sync-op-wait-for-hour
- operation: async-op-workflow-wait-for-cancel
- operation: sync-op-error
- operation: async-op-error
- operation: async-op-workflow-error
Underlying Handler Workflows:
- workflow: Error
- workflow: OK
- workflow: WaitForCancel
- workflow: WaitForSignal
Common I/O types for all operaitons
type Input struct {
Operation string //Nexus Opeation name
BusinessID string // really just a timestamp
Args []string // additional args if needed, can also be used as `tag`
}
type Output struct {
Message string
}
The following commands should be run in the nexus-playground
project directory.
All commands support the following flags:
-timeout
- schedule-to-close timeout in seconds, default is 1 day; use to force a timeout with long running ops-tx-id
- optional for most commands, used for handler wf id, default: timestamp
Prints available commands
./local-run.sh starter help
./local-run.sh starter sync-op-ok
./local-run.sh starter async-op-workflow-ok
- complete by requesting cancelation in the UI (caller workflow or handler workflow):
./local-run.sh starter async-op-workflow-wait-for-cancel
The signal commands are intended for use together.
./local-run.sh starter -tx-id <your tx ID> async-op-workflow-wait-for-signal
./local-run.sh starter -tx-id <your tx ID> sync-op-signal
Get the available errors you can inject:
./local-run.sh starter sync-op-error help
Get the available errors you can inject:
./local-run.sh starter async-op-error help
Get the available errors you can inject:
./local-run.sh starter async-op-workflow-error help
You can force a Nexus Operation to timeout by using a long running command
with a short -timeout
for example:
./local-run.sh starter -timeout 5 async-op-workflow-wait-for-cancel