6

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
1

This is a (well ?) known limitation of workflow which can be circumvented in Tridion 2013 using Bundles.

As you are on 2011 I can only advise either upgrading to 2013 and using bundle workflow or dropping the requirement altogether as a solution to "fix" this issue would be way too complex and expensive and quite possibly introduce more issues than it solves...

| improve this answer | |
0

We use Dreamweaver TBB template types with component presentations set to 'Publish Embedded on a Page'.

The only way I can manage to get this to work is by changing the Component Template to "Published as a Dynamic Component".

However, rather than just implementing that change you should see if there is a specific reason you're using embedded Component Presentations over dynamic CPs - e.g. site architecture, licensing or other implementation peculiarities.

| improve this answer | |
0

This may be the issue with the component being checked-in. when saving the component make sure it is checked-in else minor versions will be created and Tridion will not publish the minor versions instead it will publish the last major version.

Make sure the component is not check-out by the user and its checked-in(New version is created) before pushing into workflow.

| improve this answer | |
  • In 2011 at least, items are automatically placed in Workflow when saved. Attempting to do a manual or Workflow "automatic activity" check in will result in an error "The item is in Workflow". – Dave Forber Aug 5 '15 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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