Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Excerpt
hiddentrue

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
languagetextthemeRDark
{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
languagetextthemeRDark
{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.(info) A page refresh is required after un-assigning to see the message update.

Code Block
languagetext
themeRDark
{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
languagetext
themeRDark
{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
languagetextthemeRDark
{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}

...