Hi, can you give a example of setting and using the variables I tried this but had no luck
im using this to set the variable
// First, initialize workflowContext.globals if it's undefined
if (!workflowContext.globals) {
workflowContext.globals = {};
}
// Optionally set the value
workflowContext.globals.fulfillmentMethod = workflowContext.globals.fulfillmentMethod || "fbb";
// Return the value
return workflowContext.globals.fulfillmentMethod;
result: {"data":"fbb"}
then use this to return the variable
if (!workflowContext.globals) {
workflowContext.globals = {};
}
return workflowContext.globals.fulfillmentMethod || "not set";
result: {"data":"not set"}