We are having issues with our tridion workflow built using VB script in tridion 2011 SP1. It contains stages to auto publish to our preview environments as well as to our production environment on the final stage.
While the process works fine for changes to most components or pages, we have come across problems when editing components used as linked components by a component on the page.
The linked component is picked up by workflow and when auto-published to preview attempts to resolve the component – which, from viewing the content of the publishing queue is publishing a page, as expected. But the changes to the component are not being reflected.
We are using 'activateWorkflow is set to true' in the publish call, as I mentioned the process works fine on components that are properly in a component presentation on a page, but not component linked components outputted onto a page.
set userItem = TDSE.GetObject(item.ID, 1) Call userItem.Publish("tcm:0-1-65538", True, True, True, 0, 0, 0, True, 2)
I can only assume the process only uses the workflow tag on the first layer of publishing so when it outputs the link component it is still using the last checked in version of the file.
We use Dreamweaver TBB template types with component presentations set to 'publish embedded into pages'.
In hindsight we should have used more embedded schemas than relying on component linking as it has caused a huge amount of issues, but the amount of rework now to switch would be staggering. Does anyone have any clues as to how we can update our workflow code to publish workflow changes to component links not actively within a component presentation but still outputted within a page.
Here is our script in all its glory.
' Script for Automatic Activity Content Manager Workflow Dim item Set item = CurrentWorkItem.GetItem() Dim logger Set logger = TDSE.GetLogging() Dim currentInstance, activityInstance Set currentInstance = CurrentWorkItem.ActivityInstance.ProcessInstance Set activityInstance = CurrentWorkItem.ActivityInstance Dim activityInstances Set activityInstances = currentInstance.ActivityInstances Dim initialInstance Set initialInstance = activityInstances(1) Dim initialAssignee Set initialAssignee = initialInstance.Performer 'Call item.Publish("tcm:0-1-65538", True, True, True) ' IMPERSONATION STUFF BELOW!, FUN FUN FUN!!! if IsNull(initialAssignee) Then Call Logger.LogEvent("Initial assignee is null", 4, 22) Call item.Publish("tcm:0-1-65538", True, True, False, 0, 0, 0, True, 2) Else Set user = TDSE.GetObject(initialAssignee.ID, 1) TDSE.Impersonate(user.Name) TDSE.Initialize() set userItem = TDSE.GetObject(item.ID, 1) Call userItem.Publish("tcm:0-1-65538", True, True, False, 0, 0, 0, True, 2) End If FinishActivity "Published to preview" Set item = Nothing Set logger = Nothing Set currentInstance = Nothing Set activityInstance = Nothing Set activityInstances = Nothing Set initialInstance = Nothing Set initialAssignee = Nothing