Function Signature WorkflowStepCode
Signature of your code which is used in workflows.
Basically it's just a function receiving WorkflowStepCodeArguments
export type WorkflowCode = (args: WorkflowStepCodeArguments) => WorkflowStepCodeArguments;
To use you would do this:
code: (wfArgs) => {
console.log("We are doing something - here are the details.", wfArgs);
}
- If your code is triggered, it will receive a
wfArgs
object containing a lot of internal stuff, workflow information and more
note that this object isn't 100% final, it may still change a bit in future versions. We don't expect breaking changes, but be aware of this if you use deep properties. - If your code returns
false
, the command (likerefresh
) will stop - this can prevent the dialog from openening and the page from refreshing
See also: CMS Command Workflows for Commands and Toolbars
History
- Introduced in 2sxc 11.12