'Wait for message' is found in the 'Common' category of workflow nodes.
Wait for a specific message to arrive before moving to the next state
Content >>>
Detailed notes on the configuration editor can be found here
// Call busby.result(json) with a json object that is equal to or a subset of the incoming significant event
busby.result({"fileArrived":"xyz.mxf"});
busby.exit(0)
/***
This script runs each time a message is received from the significant event service. The script
should either exit with one of the configured exit codes, or with a busby.ExitCodes.REMAIN_IN_STATE.
The script is passed in an object called root with the following properties
-- root.job - the job that is waiting for the message
-- root.message - the message that is being tested
***/
const job = busby.stateStore.getJob(root.message.params.jobUuid);
if (job.internalRef === root.job.internalRef) {
busby.exit(0)
} else {
busby.exit(busby.ExitCodes.REMAIN_IN_STATE);
}
Content >>>
Previous: Transaction || Next: Wait for significant event
Index of: Workflow Nodes
Back to: Configuration Editor