By using the K2 out-of-box worklist App or K2 SmartForm worklist control we generally can’t display K2 data fields and database column values in the K2 worklist, but we can develop a custom worklist to achieve this requirement. This is useful when wanting to display additional context when the user view the K2 worklist.
K2 Automated Testing Software
BenchQA allows full test automation of K2, including fully automated K2 SmartForms and K2 Workflow testing. It promotes test driven development for K2 and ensures continued quality assurance for K2 solutions. Easily apply changes to test cases to accommodate changes to K2 apps and ensure all apps are regression tested to avoid defects and assure continuous quality.
If the K2 worklist is simple and you have a requirement of displaying one or two workflows then you can achieve this by using composite K2 SmartObjects.
Here are the steps –
- Creation of composite K2 SmartObject –
- Using K2 studio, create a new SmartObject method
- Add an activity instance destination service method (under the Workflow reports category) and List process instance method of your workflow SmartObject (under workflow solutions)
- Map the properties for both K2 SmartObject methods
- Create a new service method link with link type as “matching values in both objects” and join both the objects on process instance id.
- If you would like to display your table columns then add one more service method and create an additional service method link.
- Create List view
- Generate a list view from the composite smart object and select the properties you wish to display in the list view.
- On view executed initialize rule, Pass input parameters to destination and status as “current logged-in user” and “Active” respectively.
Now, the logged in user can see their available active tasks worklist with data fields and database columns.
Points to remember:
Composite Smartobjects will have an impact on performance, so this approach is recommended only if you want to create worklist for one or two workflows.
Users must have view permission rights on that specific workflow process.