Skip to main content

Hi all,

 

Is there any way of displaying the TASK LIST for a Process in a Smartform..... basically without having to use the clunky Management URL?

 

In the management URL, you have to manually navigate to a process instance, then click the task list to see the active tasks.

 

Is there a way to see these tasks in a Smartform instead and have a button on the form to redirect the task for example... (i can see the tasks if i give the user admin process rights)

 

Must be a way, come on K2ers....

Hi Sharpharp1,

 

There is a worklist control in smartform toolbar. You can also setup a filters in control properties.

 

 


Hi,


 


You have 3 options:


 



  1. Use a worklist control. This is an actual control that can be added to your form in Designer.

  2. Use the Worklist Service Broker found on community. This works pretty well if you want to create your own task list using a list view. The downside to this is that this is not covered by K2 Support. If you have any issues with it, you can either modify it yourself (the source code should be included), or contact the person who develop it.

  3. The Management page is basically a couple of different SmartForms. This means the actions you trigger in the Management page is also triggering some SmartObjects. You can enable SmartObject logging, then play around with your Management page, and check the servicepackagein.log and brokerpackagein.log to get an idea which SmartObjects are being called, and what are the inputs being passed in. With this, you should be able something similar to what you use in Management.


 


Edit: Added 3rd option


For this scenario, I want to use it to redirect tasks which are NOT assigned to the User...

 

The worklist control will only show tasks assigned to you....

 

Hence the Task List in management console which shows the Processes the user has Admin Process rights too.

 

Can the Worklist control show tasks you have Admin rights too, but not tasks that are assigned to you.


I have a environment with the Worklist Service Broker setup, so I decided to play around with it. It does not fit your requirement.


 


You will have to consider option 3 then. With the introduction of Management page, there should be a system SmartObject called 'Task' that is being deployed along with your Management.


 


If you execute that SmartObject in SMO Tester, you should find a method called 'RedirectWorklistItem'. That should be the method that is executed when you perform the redirect on Management. That method will take in the following inputs:


 


ActionerName - This should be the current user the task is assigned to (eg. K2:DOMAINUserA)


Destination - This should be the user you want to redirect to (eg. K2:DENALLIXUserB)


ProcInstID - The process instance ID of the task


ActInstID - The activity instance destination iD of the task


ID - The ID of the task


 


You can also use the GetWorklistItems method to retrieve all the worklist items. There is only 1 input for this method, which allows you to filter the worklist items. You will have to enable SmartObject logging, go to Management page, retrieve the worklist items, then check the brokerpackagein.log to determine the format of the input.


 


Here is a simple filter used for the GetWorklistItems method:


 


[{"ColumnName":"Process Full Name","Condition":"AND","Comparison":"LIKE","ParameterValue":"K2Project1Process"}]


 


Yoh Boringnerd,

 

Thanks for the info, made some progress...

 

1) Used the Activity Instance Destination SMO in a  view and filtered by Active instances of my Process Name to display a specific list for that Form (Yippee)

2) Changed the layout fields, so the Supervisors only see what they need to.

 

So that's Part 1 complete, the Management Page isn't needed to see the TASK LIST

 

Now Part 2, the redirection..... To work out how to REDIRECT the Task, when a Supervisor double-clicks one of the Tasks in the List.

 

As you suggested, i loaded up the Task SMO in the Tester Tool and picked Method RedirectWorklistItem.

I used the getworkitems method to get the various item numbers and it works manually via the tester tool

 

Gonna add 2 filters 1) procname and 2) processinstancestatus = Active (is this right? should only give me current LIVE instances awaiting an action)

 

Now, i'm gonna throw all of this into a form with 2 views and see if i can get it working through a smartform... fingers crossed


Got it working.... Thanks for your help with this BoringNerd.

 

All possible to select new destination user and redirect the  task via Smartforms.... just one issue which i'll post a new thread on


 

@BoringNerd

WOW. This is so timely. This is exactly what I was looking for. Thank you!!


Reply