1

I have a requirement where I want to compare the latest version of an item with it's previous version and need to track the changes made in it in the External Activity of the workflow. An item can be a Component, Page or something else.

I tried to explore the TOM.NET API but didn't really get much info. Has anyone tried something similar or provide any pointer.

Thanks in advance.

3

As Robert points out, there is a compare option.

To see this for the component view (where it's most useful) a simple path

  • Select History of the item
  • Select two versions from the displayed list
  • Click the 'compare' icon - hover over each until you see the title for compare

See http://docs.sdl.com/LiveContent/content/en-US/SDL_Tridion_2011_SPONE/task_comp2ver2DDAFF2CF95E4430AA0F27AD7A91B5F8 for more details including the item types you can compare.

1

So it seems you're (now) asking if you can track the changes that may have happened to an item whilst in workflow?

If this is the case then it's probable that you actually require Workflow Auditing. Once workflow auditing has been enabled (you do this directly in the visio diagram) you can follow these steps to compare the item between different activities within the workflow.

One word of caution is to watch the additional processing and ensure it doesn't impact your overall process. The system will take a snapshot of each item in the workflow {bundle} as each activity is ended - this has an obvious overhead and should be quantified to understand any impact to editor/author usability working through workflow process(es).

  • Thanks Dylan, But I am more looking towards doing it through programatically, so currently using var versions = component.GetVersions(new VersionsFilter(subject.Session) { }); I can get the version list however when I am trying to compare the version say tcm:2-1234-64-v9 (old version) with tcm:2-1234-64 (checked out version) I am getting the same content. However, when I compare the 2 versions in UI, I can see the difference. Not sure why I can't see the same differences in code too? Thanks – Yash May 24 '16 at 12:37
  • Does the checked out version contain the changes? If you check it in can you then see the changes? ... it could be because the code isn't running as you and therefore doesn't have access to view the checked-out ( tcm:2-1234-64-v0) version. You may be able to use impersonation and get the dynamic version to compare to? – Dylan .. Mark Saunders May 24 '16 at 19:19
0

If you go to the Tridion CME, there's the versioning "compare" button which does exactly what you need

  • Thanks Robert & Dylan for your answers. Sorry but I think my question as not clear, I have edited the question now. Actually I need to track the changes made to an item inside the code. Can you provide any information about that using TOM.NET API? – Yash May 24 '16 at 8:14
  • Hi, Can anyone provide the pointer why am I not getting the exact differences between two versions of item ? Thanks – Yash May 24 '16 at 16:13
  • you should use CoreService instead of TOM.NET (legacy). – Robert Jin May 24 '16 at 17:27

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.