Skip to main content

Hi,

 

I am using the SourceCode.Workflow.Management API (as well as others: Workflow.Client, HostClientAPI) v4.14010.14105.2 in order to interact with K2 workflows. I have figured out how to do everything I need to do with one exception. This last piece of the puzzle is how to retrieve the history of a process instance. That is, given an instance of a workflow, I can't work out how to retrieve the list of activities that have been performed since that instance was created. I have found the document that dome with K2 Blackpearl worse than useless: methods with no explanation of purpose or action, no details on the meaning of parameters etc. etc. I am pulling my hair out. I did find one promising question and answer, from 2007, but a Kb article that was referenced simply gives a 403 error. Please help. I can retrieve a worklist, but this only gives the current state of affairs for participants. Imagining the process instance as a tree, this is just the leaves. I need the whole thing.

 

Thanks in advance

Use the Activity Instance Destination SmartObject to access activity history from a particular process instance.


Thanks for the response @sbrownhuntoilco. Unfortunately, I am a complete K2 newbie who has been dropped in at the deep end - it keeps things interesting, I suppose. How do I follow your suggestion? A C# (or VB if that's what you use) code sample would be ideal. I understand the concept of a SmartObject and have used them within workflows in the Visual Studio designer, but I have no idea how to engage with them in code.

 

Thanks


http://help.k2.com/onlinehelp/k2blackpearl/devref/current/webframe.html#Working_with_a_SmartObject.html

 

The name of the SmartObject you are interested in is Activty_Instance_Destination.  Use the SmartObject Service Tester tool to examine this SmartObject and the results it produces.


Excellent and thanks again. I will take a look!


Reply