Publishing Triggers

bwmyers's Avatar


23 Mar, 2016 08:48 PM

I was fooling around with the publishing trigger feature and I am not sure how to do what I am wanting to do but then again I have never used the work flow builder or the publishing trigger before so maybe I am in the wrong place.

Is there a way to trigger a task that whenever a child folder is published cascade also publishes an additional list of folders/pages/assets? Another option would be that when a child folder is published its parent folder and all its contents gets published. Which would include the child folder by default. Make sense?

Thanks for your help.

  1. 1 Posted by bwmyers on 23 Mar, 2016 10:51 PM

    bwmyers's Avatar

    I ask because I am trying to make this as simple as possible for the end user. Its a blog set up that has two modes. Category and all. A list of articles makes up the home page which also feeds the categories view. So if someone adds an article I want to be able to have them publish their page and it triggers the other views to publish also.

  2. Support Staff 2 Posted by Tim on 24 Mar, 2016 01:37 PM

    Tim's Avatar


    Yes, you should be able to do this via Workflow. You would basically do the following:

    • Create a new Publish Set that contains the group of assets you are looking to publish along with any of the items in a certain section of your Site
    • Create a Workflow Definition that has no approval steps and simply publishes the asset in question along with the Publish Set you generated in the step above

    To publish the asset in question via Workflow, you would use the Publish Trigger. Then, the Publish Set would be included by adding a Publish Set Trigger that specifies the Publish Set you want to fire at the time that the asset goes through Workflow.

    To help get you started, I'm attaching a sample 'No approval' Workflow from our default database. This Workflow basically makes it so that when a User edits and submits an asset, that asset is published automatically without approval from any other Users:

    <?xml version="1.0" encoding="UTF-8"?>
    <system-workflow-definition initial-step="first-step" name="No Approval">
        <!--triggers that will be available to actions in the workflow-->
                    <trigger class="com.cms.workflow.function.PublishSetTrigger" name="PublishSetTrigger"/>
    <trigger class="com.cms.workflow.function.EmailProvider" name="email"/> <trigger class="com.cms.workflow.function.Publisher" name="publish"/> <trigger class="com.cms.workflow.function.Merge" name="merge"/> <trigger class="com.cms.workflow.function.Version" name="version"/> </triggers> <!--steps that should happen in order--> <steps> <!--system step to start things up--> <step identifier="first-step" label="Initializing" type="system"> <actions> <action identifier="initialize" move="forward" type="auto"> <!--notify the user they are the owner of the current workflow step--> <trigger name="email"> <parameter> <name>mode</name> <value>notify</value> </parameter> </trigger> </action> </actions> </step> <!--system steps to merge and publish content--> <step identifier="finalize-edit" label="Merging and Publishing" type="system"> <actions> <action identifier="finalize" move="forward" type="auto"> <trigger name="merge"/> <trigger name="version"/> <trigger name="publish"/> </action> </actions> </step> <!--we need this step to have the actions from the previous step executed--> <step identifier="Finished" label="Finished" type="system"/> </steps> </system-workflow-definition>
    To add the ability you mentioned (to publish a group of other files), you would simply add a Publish Set Trigger right after the Publish Trigger. So, for example, if your Publish Set was named 'Articles', the last step of this Workflow might look like:
    <step identifier="finalize-edit" label="Merging and Publishing" type="system">
            <action identifier="finalize" move="forward" type="auto">
                <trigger name="merge"/>
                <trigger name="version"/>
                <trigger name="publish"/>
                <trigger name="PublishSetTrigger">
    </trigger> </action> </actions> </step>
    Let me know if this information helps at all.


  3. 3 Posted by bwmyers on 24 Mar, 2016 05:22 PM

    bwmyers's Avatar

    Thank you sir. I will give this a try and see what happens. May not be until tomorrow though before I get to it.

  4. Support Staff 4 Posted by Tim on 24 Mar, 2016 06:00 PM

    Tim's Avatar

    No worries. We'll wait to hear back from you.


  5. Ryan Griffith closed this discussion on 14 Apr, 2016 07:39 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac