2

I want to set approval status to page and component by eventsystem without Tridion workflow activity, for the purpose of integration with external system. But following property is read only,so I couldn't achieve that.

  • Tridion.ContentManager.ContentManagement.Component.ApprovalStatus

How can I set approval status by eventsystem? Is it possible?

Regrads,

  • What does the external system need to "know" about the items? If it's a status that editors could set, Metadata could work where a text field set to a Category could store a status. Otherwise Application Data acts as per-item data that external systems could read. – Alvin Reyes Feb 17 '15 at 1:33
  • Indeed, your requirement is unclear. Approval Status is integral part of the Tridion workflow engine. If you want to use it, it implies that you want to use workflow, but for sone reason you want to use the event system instead of (automated) workflow activities? Please clarify. – Rick Pannekoek Feb 17 '15 at 19:57
  • I want to prevent newly created page is published to live site before it's approved by workflow,but want to publish it to staging site.If workflow is associated to SG, newly created page go to workflow before it's checked in and it's impossible to publish it to staging site.So I try to use event system and give approval status that can only be published to staging site. – Hirokazu Shikata Feb 18 '15 at 8:53
4

Only a workflow activity can change the workflow status of an item. In 2013 SP1 we did add an event allowing to change the approval status of an item but only when you add an item to a Bundle that is already in workflow. We are considering changing this in an upcoming release, but currently this is not possible.

So, for now your only solution would be to programmatically add the item to a workflow, and "move it" to the activity that sets the workflow status you want. If you don't actually care about keeping the item in workflow and all you want is to have the approval status, you could create multiple workflow process definitions (with a single automatic activity that sets the status you wish) and then, whenever the external system changes the status, programmatically add the item to the workflow and start it. This would then execute the automatic activity, setting the status of the item, and finish the workflow.

1

The essence of Approval Status is that it's metadata about an item that can only be set by passing through a workflow. In other words, if you're not really interested in whether the item passed through a given workflow activity, you might be just as well-off using ordinary Metadata or (perhaps better) Application Data.

If you are hoping to use Approval Status to constrain the publication targets that your item can be published to, you should also be aware that this only works while your item is in a workflow.

So I'd suggest you start by looking at Application Data. (It's not really possible to give a more detailed answer unless you add some more information to your question. What are you trying to do, and why?)

  • 1
    As of 2013 SP1, approval status when publishing also applies to items that are not in Workflow. – Nuno Linhares Feb 17 '15 at 19:37
  • :-) Must try to keep up. Even so - I'm still not clear that this is the behaviour the questioner is trying to get. – Dominic Cronin Feb 17 '15 at 19:39

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.