I want to bulk change running workflow instances and jump to a specific activity by using the Workflow Management APIs GotoActivity method. But before just ending the workflow instance, I want to make sure that the currently loaded instance is at the expected Activity and that activity is in Status=Active.
How/where do I get the currently active activity for the workflow instance and see its status is Active?
When I examine the Activity class there is no Status property.
I use something like this:
WorkflowManagementServer wfmServer = new WorkflowManagementServer();
Activities acts = wfmServer.GetProcInstActivities(12345);
Best regards, Peter
I have solved my problem for now by verifying Activity Instance Status through the SmartObject Client framework.
I used K2 SmartObject Tester to create C# class for the Activity Intance SMO.
After that I can do something like this:
Activity_Instance ai = new Activity_Instance(ConfigurationManager.ConnectionStrings["k2db"].ToString());
ai.ProcessInstanceID = procInstance;
ai.Status = "Active";
ai.ActivityName = "Activity name of where I expect this process instance to be situated at";
DataTable dt = ai.List();
if (dt.Rows.Count == 1)