participants name on activity

  • 26 October 2010
  • 6 replies
  • 8 views

Badge +2

Hi,


How can I do the following by code using K2 blackpearl API's and namespaces:


1. Get the name of the owner(actioner, destination) of an activity.


2. Get list of participant(s) for an activity, in case of multiple assignment i need list of all their name before one take the ownership of it.


thank you in advance


6 replies

Badge +2

Hi,


 


Thank you for your replay


 


I wrote the following code:


 


       using SourceCode.Workflow.Management;


 


        WorkflowManagementServer wms = new WorkflowManagementServer("myHost","myPortal");


        wms.Open();


        SourceCode.Workflow.Management.WorklistItems = wms.GetWorklistItems(....)


 


I don’t know how to use the filter to get the ProcActivities I need my code to be based on unique ID’s not process instance name and activity name, let’s say that I have the Activity ID and workflow instance ID and I want to get the participants on this Activity


All participants before any one take the ownership and the user who is the owner of the task in case no multiple participants assign in the same activity.


 


Thank you

Badge +10

Depending on exactly what you want to do the out of the box Activity Instance Destination SmartObject might give you the information you want.  Its probably worth it to just do a quick SmartObject Tester query to check it out.

Badge +2

Hi,


Thank you for your reply


I have looked into most of SourceCode.SmartObjects namespaces and I could not find the one you are referring to,


can you please advice ...


thank you in advance


 

Badge +10

The SmartObject is already built.  Either you can call the smartobject through code using the SourceCode.SmartObject.Client namespace or else you might be able to use the K2 ADO.net DataProvider to call it within your asp.net form.


Try running the SmartObject Tester tool under neath the program filesK2 blackpearlBin folder where you have K2 Studio installed (assuming 4.5) and then in the SmartObject explorer expand Workflow Reports/Workflow General and choose to execute the Activity Instance Destination smartObject.  Using the tool is a great way to see if it'll meet your needs without doing a bunch of coding first.

Badge +2

thank you for your reply this is what exactly I was looking for.


I have another question which I posted from few days and I did not get any reply for it :


Are there APIs in K2 blackpearl that I can use to get the predeccor, successor, siblings, children, next and previous Activity/Activities ... etc using the current activity ID? 


http://www.k2underground.com/forums/p/12947/37964.aspx#37964


 


Thank you

Badge +2

Hello,


I am working on the implementation of two related methods one is called AddParticipants and the other is called RemoveParticipants


The Smart Object I used it to get participants “Activity Instance Destination” can only be used to get list of participants on specific task but not for add or remove them, so can you please advice?


Thank you

Reply