SetWorkflowStatus versus WorkflowManager.MessageWorkflow

Posted by Community Admin on 04-Aug-2018 15:37

SetWorkflowStatus versus WorkflowManager.MessageWorkflow

All Replies

Posted by Community Admin on 09-Jun-2015 00:00

I am trying to grasp the concepts behind workflow and lifecycle in sitefinity, and am running into some issues concerning the difference between:


dynamicContent.SetWorkflowStatus(DynamicModuleManager.Provider.ApplicationName, "Published");


var bag = new Dictionary<string, string> "ContentType", Type.FullName ;
WorkflowManager.MessageWorkflow(dynamicContent.Id, Type, null, "Publish", false, bag);

It seems the first line creates 1 record in sf_dynamic_content and the second line will create 2.

 After some more testing, I found that youc an recreate the behavior of using the WorkflowManager by adding:


after SetWorkFlowStatus.

 what if you want to save as a draft programmatically? that only creates one record if you just use SetWorkFlowStatus, then save. However, if you do this through the backend, meaning create a content item and save as draft, you get 2 records.



Posted by Community Admin on 12-Jun-2015 00:00

Hello Merritt,

You can find more information about the Workflow statuses and the Content Lifecycle here:
Workflow statuses
Content lifecycle

Generally speaking - when you save the Item as draft you have one Master version. On publish you have two records - Master and Live (Master with visibility true) versions.

Svetoslav Manchev

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items

Posted by Community Admin on 23-Jan-2017 00:00

so am I correct in interpreting what you're saying here is that if you use MessageWorklfow, Sitefinity will create a snapshot of master, and set its status to live...

But if you use Lifecycle.Publish, the master item itself will be updated to be the live, so there is no master.

Is that correct? if there is no master, just live what happens if you edit it again, does it create a copy of live as a new master?

This thread is closed