2

How can I get the next Workflow activity after I have gotten the processdefinition for the current instance id using the Core Service?

Below is the code which I have already:

ActivityInstanceData currentActivity = 
    (ActivityInstanceData)client.Read("tcm:222-122108-131104", null);
ActivityDefinitionData activitydefinition = 
    (ActivityDefinitionData)client.Read(currentActivity.ActivityDefinition.IdRef, null);

ProcessDefinitionData processdefinition = 
    (ProcessDefinitionData)client.Read(activitydefinition.ProcessDefinition.IdRef, null);
1

There's a few ways for this, but it depends on what exactly you intend to do. If you finish the current activity with CoreServiceClient.FinishActivity(ActivityInstance.Id, finishData, null); this method will return an Activity Instance Data object that represents the next Activity Instance, or null if this is the last activity.

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.