Overview
Excerpt |
---|
|
Workflow events associated with blog posts |
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.
Code Block |
---|
|
{workflow:name=News created}
{state:Test}
{state}
{trigger:newscreated}
{set-message:style=info}A blog post was created{set-message}
{trigger}
{workflow} |
Updated
Code Block |
---|
|
{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 on from a blogpostblog post, so metadata is used to help identify the news in the approvalunassigned
event. A page refresh is required after un-assigning to see the message update.
Code Block |
---|
|
{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
Code Block |
---|
|
{workflow:name=News approve and reject}
{state:Test|approved=Test|rejected=Test}
{approval:Test}
{state}
{trigger:newsapproved|approval=Test}
{set-message:style=info}A blog post was approved{set-message}
{trigger}
{trigger:newsrejected|approval=Test}
{set-message:style=info}A blog post was rejected{set-message}
{trigger}
{workflow} |
State changed
Code Block |
---|
|
{workflow:name=News state change}
{state:Test|submit=Another state}
{state}
{state:Another state}
{state}
{trigger:newsstatechanged}
{set-message:style=info}A blog post workflow state changed{set-message}
{trigger}
{workflow} |
...