Trigger Reference of GS2-StateMachine Script
Reference for event triggers that call extended scripts, as defined in GS2-StateMachine
start
Event trigger to call GS2-Script before Start state machine.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
stateMachineMaster | StateMachineMaster | State machine master data |
status | Status | Status |
userId | string | User ID |
parameters | string | Arguments to be passed to the state machine |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow start |
Implementation Example
namespace = args.namespace
stateMachineMaster = args.stateMachineMaster
status = args.status
userId = args.userId
parameters = args.parameters
result = {
permit=permit
}
startDone
GS2-Script called after Start state machine.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
stateMachineMaster | StateMachineMaster | State machine master data |
status | Status | Status |
userId | string | User ID |
parameters | string | Arguments to be passed to the state machine |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
stateMachineMaster = args.stateMachineMaster
status = args.status
userId = args.userId
parameters = args.parameters
result = {
}
pass
Event trigger to call GS2-Script before Pass state machine.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
stateMachineMaster | StateMachineMaster | State machine master data |
status | Status | Status |
userId | string | User ID |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow |
Implementation Example
namespace = args.namespace
stateMachineMaster = args.stateMachineMaster
status = args.status
userId = args.userId
result = {
permit=permit
}
passDone
GS2-Script called after Pass state machine.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
stateMachineMaster | StateMachineMaster | State machine master data |
status | Status | Status |
userId | string | User ID |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
stateMachineMaster = args.stateMachineMaster
status = args.status
userId = args.userId
result = {
}
error
Event trigger to call GS2-Script before Error state machine.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
stateMachineMaster | StateMachineMaster | State machine master data |
status | Status | Status |
userId | string | User ID |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow |
Implementation Example
namespace = args.namespace
stateMachineMaster = args.stateMachineMaster
status = args.status
userId = args.userId
result = {
permit=permit
}
errorDone
GS2-Script called after Error state machine.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
stateMachineMaster | StateMachineMaster | State machine master data |
status | Status | Status |
userId | string | User ID |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
stateMachineMaster = args.stateMachineMaster
status = args.status
userId = args.userId
result = {
}