get process guid from management api?


Badge +3
Is there any way to get process GUID from management API?

3 replies

Badge +8

Hi, are you looking for the Process GUID or the Process Instance GUID?


To get the Process GUID:


 


WorkflowManagementServer wfms;


wfms = new WorkflowManagementServer(txtK2Server.Text, Convert.ToUInt32(txtK2Port.Text));


wfms.Open();


ProcessInstances procInsts = wfms.GetProcessInstancesAll(@"gtrcK2HRSeparation", "", "");


foreach (ProcessInstance procInst in procInsts)


{


     lbGuids.Items.Add(procInst.ProcGuid.ToString() + "|" + procInst.Folio);


}


wfms.Connection.Close;


 


There doesn’t seem to be a way to get the Process Instace GUID from Management API, but you can get it with the ProcessInstance Object of SourceCode.Workflow.Client


 


HTH


 

Badge +3

Hi,

thanks for your answer, my question was misleading: I'm searching for the process instance GUID.

So it seems that I need to rely on the ID and find the GUID on my own from that with client API.

Badge +3

Update: Jan from K2 gave me a workarround to search for process instance object by it's folio,

the same search by ID doesn't seems to function right now, but would be the preferable solution once fixed (because folio is not mean't to be a technical identifier)

Reply