Tuesday, September 18, 2012

WCM: Scheduled Move Action for Publish is irrelevent at the entry stage of Published workflow stage

Recently I came across a problem with regard to having "Schedule move action on Publish date". The scenario is this. For a Workflow Stage: Published, if "scheduled move action on publish date" is added in entry stage, we observed the content never stays in PUBLISHED status and moves to EXPIRED status.The reason for the behavior is explain in this article.

What is Scheduled move action?

This is the workflow action which pushes the content to next workflow stage upon satisfying some condition. This some condition is on the date field we select while creating the schedule move action. It could be on Live date(Publish date), Expiry date, General date or Selected date.

In our case we opted on Live date(Publish date) and created a workflow action called "To publish". This workflow action has been added in the entry action list for Workflow Stage "PublishedStage".

Now lets observe what happens in the content creation scenario alone. When content is created by default it pics the publish date as "current date". The moment content is created, published date will have value in past for sure. So "To publish" is going to be valid action for sure in this case. It is going to triggered whenever content enters "PublishedStage" Workflow stage. So after content leaves "DraftStage" and enters "PublishedStage", "To publish" is also triggered. The "To publish" going to just trigger "Next Stage" action, so naturally content has to land in "Expired" Stage.

Hope the explanation is logical. Through this exercise I learned precise behavior of "Scheduled Move action" and "Default publish date assignment in content creation process".

Now this pushes me to analyze why WPS is designed to populate "Current date" in the "Publish date" field by default in the content creation process?