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

TypeDescription
namespaceNamespaceNamespace
stateMachineMasterStateMachineMasterState machine master data
statusStatusStatus
userIdstringUser ID
parametersstringArguments to be passed to the state machine

Result

TypeRequireDefaultLimitationDescription
permitboolAllow 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

TypeDescription
namespaceNamespaceNamespace
stateMachineMasterStateMachineMasterState machine master data
statusStatusStatus
userIdstringUser ID
parametersstringArguments to be passed to the state machine

Result

TypeRequireDefaultLimitationDescription

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

TypeDescription
namespaceNamespaceNamespace
stateMachineMasterStateMachineMasterState machine master data
statusStatusStatus
userIdstringUser ID

Result

TypeRequireDefaultLimitationDescription
permitboolAllow

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

TypeDescription
namespaceNamespaceNamespace
stateMachineMasterStateMachineMasterState machine master data
statusStatusStatus
userIdstringUser ID

Result

TypeRequireDefaultLimitationDescription

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

TypeDescription
namespaceNamespaceNamespace
stateMachineMasterStateMachineMasterState machine master data
statusStatusStatus
userIdstringUser ID

Result

TypeRequireDefaultLimitationDescription
permitboolAllow

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

TypeDescription
namespaceNamespaceNamespace
stateMachineMasterStateMachineMasterState machine master data
statusStatusStatus
userIdstringUser ID

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
stateMachineMaster = args.stateMachineMaster
status = args.status
userId = args.userId

result = {
}