Skip to main content


Hello - don't know if this is the right place for this question - but here goes:


 Update (I changed this post because I found some more info)


I have a workflow and a custom web page for user’s worklist and stuff. I want to create a separate list that shows processes that have already been completed. Now I can access the Process Instance Report like this


 


SmartObject smartObject = SmartObjectHelper.SoServer.GetSmartObject(Process_Instance);


                smartObject.MethodToExecute = "List";


                smartObject.Propertiess"ProcessName"].Value = strProcessName;


                smartObject.Properties "Status"].Value = "Completed";


 




However, to make the list useful I need access to some datafields associated with the completed processes.... I can't call OpenProcessInstance, because the processes aren't active - so what to do?


 


How can I access datafields of completed process?


 


Thank you.


Hi


You should be able to use the out of the box "Process Data" smartobject to specific process data.  You can pass in the process instance ID to limit it to an individual process instance.  Otherwise you might want to use the Process Set ID. 


If you don't want to make 2 separate SmartObject calls to get both the Process Instance data and the process data I was able to quickly build a composite SmartObject using the GetList method of  both the "Process Instance" and the "Process Data" out of the box Service Instances listed under Workflow Reporting Service.  The only trick I found was that if I tried to using the AutoLink it created links (like joins) between the Process ID (correct) and the Process Name (incorrect).  It should only be the Process ID since the Process Name has a different value in the Process Data property.


Here is a screenshot in the SmartObject Test tool retreiving all the completed instances by passing in the Process Set ID.



 


I've attached the composite SmartObject that I made if that's of interest.  Just remove the .txt extension.


http://www.k2underground.com/members/timkn/files/SmartObject/ProcInst-And-ProcessData.sodx.txt.aspx:550:0]


 


Thank you! Your first solution works perfectly for me - I´m going to go with that for now (maybe I´ll look into you second one later :))


 


Reply