-5

I want to create a workflow automatic task (1. Send back to Author 2. Publish to Staging).

Can any one provided the code snippet to do this using SDL Tridion Core Service ?

Jey
  • 2,137
  • 4
  • 22
  • 40
  • 5
    I am quite sure SDL's professional services team or one of our partners would be happy to help you implement such a workflow activity. But here on Stack Overflow people are typically more inclined to help if you provide us with more than just the basic requirements of an assignment and instead show us what you've already done yourself. What did you do already? Where did you get stuck? What error message did you get or what code sample doesn't do what you expected? – Frank van Puffelen Jul 04 '12 at 13:22

1 Answers1

1

I don't have a Core Service version, but here is one I wrote using VBScript and TOM which might get you started in the right direction

Set objAIs = CurrentWorkItem.ActivityInstance.ProcessInstance.ActivityInstances
Set objAI= objAIs (objAIs.Count - 1)
strLastMessage= objAI.FinishMessage
Set objAI= objAIs(1)
uriFirstUser= objAI.Performer.ID
Set objAI= Nothing
Set objAIs = Nothing
FinishActivity cstr(strLastMessage), "" , uriFirstUser

Just paste that in the script box of your automated activity, and you should be good to go

Chris Summers
  • 10,153
  • 1
  • 21
  • 46