Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Comala workflow trigger to set page restriction not working when using a linked workflow

David Pressley March 3, 2021

I have a few workflows which are applied by setting a space category, and further applied by page label.

In order to link the workflow to a space, I use the 'link workflow' function in the Global Workflow template area. The workflow is applied, however, I also need to set a page restriction once the workflow is applied to limit access to another plugin on the page for a certain user group. This page restriction isn't being set once the workflow is linked, so I must manually go to the document management section of the space tools in order to initialize the first state and set the page restriction. Is this the intended behavior, or do I have my workflow configured incorrectly?

I would be surprised if this is the intended behavior since it takes roughly as much manual intervention as simply setting up the workflow manually from the page menu. in either case I'm clicking space tools, document management, initialize states vs clicking on the page menu and applying the workflow. Granted this isn't a 1:1 example, since i have many pages with the same workflow, so at scale the manual intervention is less, but the requirement to remember to execute a manual step might arguably be the purpose for creating the linked workflow functionality

Just curious to know if this is the intended functionality, or if I'm missing something in the configuration

{trigger:statechanged|state=Draft|initial=true}
    {add-restriction:type=edit|group=admins}
{trigger}

 

version 6.13.2

1 answer

0 votes
James Conway
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 5, 2021

Hello @David Pressley,

Welcome to the community. Your workflow trigger is fine, the behaviour you describe is expected. The statechanged event only occurs when a state is entered into, in the case of the initial state this is when a page is created. The statechanged event will not occur when a workflow is applied to an existing page. For more details see our documentation about 'unprocessed' pages.

If this is something that you expect to do often, could you reach out to our support team at https://support.comalatech.com with details of your use case and current workflow markup.

All the best

James
Senior Product Manager

David Pressley March 5, 2021

Hi James, 

Thanks for the response

Does a Comala Publishing Copy to a space count as a page creation? If so, does it follow that I should set my target space up first, set a space category, link the space from the global template before executing the Copy to a space from Comala publishing?

James Conway
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 8, 2021

Hi @David Pressley 

A Comala Publishing space copy in to a clean space counts as a page creation. The simplest workflow to set restrictions on page creation looks like:

{workflow:name=Restrictions}
{state:Test}
{state}
{trigger:pagecreated}
{set-restrictions:type=view|user=james}
{trigger}
{workflow}

For full details of the set restrictions macro, see https://wiki.comalatech.com/display/CDML/set-restrictions+macro 

One thing to take care of before making your space copy with Comala Publishing, please ensure that you untick the 'Copy page restrictions' advanced option.

Kind regards

James
Senior Product Manager

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events