Class

WorkflowUtils

WorkflowUtils

cplaceJS utilities provided by workflow plugin

Note: These utils can be accessed via cplace.utils('cf.cplace.workflow').

Since:
  • 5.4

Methods

isValidState(page, workflowAttributeName, stateName) → {boolean}

Checks if a given state is existent in a page's specified workflow attribute.

Parameters:
Name Type Description
page Page

The page the attribute is attached to.

workflowAttributeName string

The internal name of the target workflow attribute.

stateName string

The internal name of the state to check.

Whether the state is a valid state of the given workflow or not.

boolean
Example
if (cplace.utils('cf.cplace.workflow').isValidState(page, 'cf.workflow', 'initialState')) {
  // do something...
}