I need to get the next activity definitions on a
TridionActivityDefinitionData object using Core Service in Tridion 2011 SP1. My activity definition object represents an automatic activity with 2 next activities.
My problem is that using the code below, the property
NextActivityDefinitions is null:
TridionActivityDefinitionData tridionActivityDefinition = client.Read("tcm:21-443-131088", readOptions) as TridionActivityDefinitionData; Console.WriteLine(tridionActivityDefinition.NextActivityDefinitions);
I tried with simple readOptions:
ReadOptions readOptions = new ReadOptions()
but also with other flags. Still I get back null.
readOptions.LoadFlags = LoadFlags.Expanded | LoadFlags.IncludeAllowedActions | LoadFlags.KeywordXlinks | LoadFlags.WebDavUrls;
API doc says:
“Field Value: Will be null if the Activity Definition is read stand-alone. In the context of a Process Definition it will be set. The collection should be empty if this represents the last activity or it should contain exactly one activity, unless this represents a decision. Note that the next activity should be identified (linked) by title, not by Id.”
So my question is, how do I read the Activity Definition in context of a Process Definition using Core Service?