0

I am writing eventhandler for determining the workflow activities. I am able to get the currrent activity assignee.

I need to get the next activity assignee(i.e to which group the activity is assigned to).

Inside the TridionActivityDefinitinData for NextActivityDefinitions i find only Title and Idref of the activities.

Please let me know how to find the next possible activities' assignee.

user1658567
  • 201
  • 1
  • 6
  • 11
  • 1
    Did you have a look at this question and the answers? http://stackoverflow.com/questions/12274816/how-to-get-the-next-activity-details-from-the-finishactivityevent-hanlder – Frank van Puffelen Sep 09 '12 at 21:05

2 Answers2

4

Have a look at this question How to get the Next Activity Details from the FinishActivityEvent Hanlder?, where user978511 answered it there better than I can.

From what I see there, you'll need something like this:

FinishActivityEventArgs.ActivityFinish.NextAssignee

If that is indeed the case, I marked your question as a duplicate from that one.

Community
  • 1
  • 1
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
0

Hope this helps someone...

Read the Process Definition for the full list of activities:

ProcessDefinitionData pdd = CoreServiceClient.Read(ProcessInstance.ProcessDefinition.IdRef, null) as ProcessDefinitionData;

then you can use your current posostion (not zero based) to index out from the Activitiy Definitions (zero based):

pdd.ActivityDefinitions[(int)ActivityInstance.Position].Assignee.Title

The above will get you the next activity information. If you want previous activities start by subtracting two from the current position and indexing from the Process Instance Activities:

ProcessInstance.Activities[(int)ActivityInstance.Position - 2].FinishMessage

Enjoy