We have a program which automatically creates Tridion component We are adding that component to a component presentation using Static Component template and publishing the page.

When there are updates to the component even though component is getting published t preview stage, changes are not getting reflected as always considered major version.

Is there a way to publish changes of Component minor version from workflow?

Thanks, Prasanna


1 Answer 1


In order to use the right item that is changed in the workflow you need to extract it from ActivityInstance of the Workflow. This way you get the minor version of the item in the workflow. In the documentation for the WorkItem it states:

Represents a Work Item: the association between an item participating in workflow and an Activity

Use something like this if you have only one item in the workflow:

WorkItem currentWorkItem = new WorkItem(new TcmUri(ActivityInstance.WorkItems[0].Id), new Session());

Then you need to covert the item to VersionedItem and extract TcmUri from it. In the documentation it states for VersionedItem's:

Instances of this class represent a specific version of a Versioned Item. This version is either explicitly stated in the TCM URI (e.g. tcm:1-2-v3) or is implicitly the latest version.

VersionedItem versionedItem = (VersionedItem)CurrentWorkItem.Subject;
TcmUri tcmUri = versionedItem.Id;

Then add the component presentation to the page using static CT and minor version of the component. You can find the code for that on post how-to-add-component-presentations-to-a-page-during-creation-using-core-service

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.