Use blog post events in a workflow trigger
Overview
The following examples illustrate the various events associated with blog posts.
Created
The newscreated
event only works in space mode - when a workflow is applied as a space workflow.
{workflow:name=News created}
{state:Test}
{state}
{trigger:newscreated}
{set-message:style=info}A blog post was created{set-message}
{trigger}
{workflow}
Updated
{workflow:name=News updated}
{state:Test}
{state}
{trigger:newsupdated}
{set-message:style=info}A blog post was updated{set-message}
{trigger}
{workflow}
Reviewer assignments
There isn't a specific event for removing a reviewer from a blog post, so metadata is used to help identify the news in the approvalunassigned
event.
{workflow:name=News assignees}
{state:Test|approved=Test|rejected=Test}
{approval:Test|assignable=true}
{state}
{trigger:newsapprovalassigned|approval=Test}
{set-message:style=info}A blog post reviewer was assigned{set-message}
{set-metadata:isNews}true{set-metadata}
{trigger}
{trigger:approvalunassigned|approval=Test|@isNews@=true}
{set-message:style=info}A blog post reviewer was unassigned{set-message}
{trigger}
{workflow}
A page refresh is required after unassigning to see the message update.
Approvals and rejections
State changed