Special functions

The definition provides some special purpose functions to provide information about the configured workflow.

These are intended to remove the necessity to make available too much information about the specifics of the workflow, to encourage well-designed composeable features.

Definition

function getUsedActionableBy()

Returns a de-duplicated list of all the actionableBy properties in the state definitions.

Note that this will only return information about the currently defined states. If a feature relies on this, it will get different results depending on when in the definition process it’s called.

Workflow feature

function P.workflow.registerOnLoadCallback(callback)

Registers a callback function which will be called when the platform calls the std_workflow onLoad() function, passing in an AllWorkflows object.

P.workflow.registerOnLoadCallback(function(workflows) {
    workflows.forEach(function(workflow) {
        console.log(workflow.fullName);
    });
});