Publishing Triggers

bwmyers's Avatar

bwmyers

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

    Hi,

    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-->
        <triggers>
                    <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">
        <actions>
            <action identifier="finalize" move="forward" type="auto">
                <trigger name="merge"/>
                <trigger name="version"/>
                <trigger name="publish"/>
                <trigger name="PublishSetTrigger">
    <parameter>
    <name>name</name>
    <value>/Articles</value>
    </parameter>
    </trigger> </action> </actions> </step>
    Let me know if this information helps at all.

    Thanks

  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.

    Thanks!

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

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts

Generic

? 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

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM