Class

WorkflowActions

WorkflowActions

cplaceJS actions provided by workflow plugin

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

Since:
  • 4.57

Methods

setTransitionTargetPage(targetPage, showInNewTabopt)

Set target page to be displayed after manual transition. This method should be called only in transition action or entry action scripts, as it will not have any effect elsewhere.

Parameters:
Name Type Attributes Default Description
targetPage Page

Target page to be displayed. Must not be null.

showInNewTab boolean <optional>
false

When set to true, a new browser tab is opened to display the given targetPage

Examples
// Transition action script to create a new page and display this newly created page in a new browser tab after executing transition
var newPage = cplace.actions().createPage({
    name: 'new page',
    space: 'pageSpace/root',
    customType: 'mytype'
});

cplace.actions('cf.cplace.workflow').setTransitionTargetPage(newPage, true);
// Transition action script which updates the current page and then force the browser tab to be actually reloaded instead of
// just refreshing the attributes (needed e.g. when page layout is changed in script)
cplace.actions().updatePage(page, {
    // ... some options/changes which will only display when page is reloaded
});
// Force reload of current page in current tab
cplace.actions('cf.cplace.workflow').setTransitionTargetPage(page);

setTransitionTargetUrl(targetUrl, showInNewTabopt)

Set target URL to be displayed after manual transition. This method should be called only in transition action or entry action scripts, as it will not have any effect elsewhere.

Parameters:
Name Type Attributes Default Description
targetUrl string

Target URL to be displayed. Must be an absolute URL, must not be null, must have protocol http or https.

showInNewTab boolean <optional>
false

When set to true, a new browser tab is opened to display the given target URL

Example
// Transition action script which displays some kind of process manual page after executing transition
// ...
// Display page in new browser tab
cplace.actions('cf.cplace.workflow').setTransitionTargetUrl('https://jsdoc.cplace.io/', true);