Work Items List Control
- Last UpdatedJun 10, 2024
- 14 minute read
The Work items list allows the workflow actors to view and respond to the work items assigned to them in a user interface that is similar to Outlook. Work items are delivered to the actor's Inbox with a detailed view available on selection of the item.
To add Work items list Control using a panel
-
Before adding the Work Items List control in a panel, create an ASP.NET project in Visual Studio .NET 2012.
-
Open WorkItemList.aspx.cs page.
-
Ensure that you have created the User Context object as per the steps described in Creating User Context.
-
In the underlying code, create a new instance of control and add the instance to the panel in the OnInit, as shown in the example below:
Skelta.Core.ApplicationObject application = new Skelta.Core.ApplicationObject("ListRepo");//Repository name
object loggedinUserId = "4952ffff-e0db-401b-bb7d-70a0fec1df07";
Skelta.Entity.UserContext userContext = new Skelta.Entity.UserContext(loggedinUserId, application, "skeltalist");
Skelta.HWS.WorkListChannel.Web.WorkItemListControl.WorkItemControl wi = new Skelta.HWS.WorkListChannel.Web.WorkItemListControl.WorkItemControl();
wi.ID = "WorkItemControl"; // This is mandatory.
wi.ApplicationName = userContext.Repository.ApplicationName; //Provide Application or Repository name. This is mandatory.
wi.UserIdString = userContext.LoggedInUserId; //Provide user ID string. This is mandatory.
wi.Height = Unit.Percentage(100);
wi.Width = Unit.Percentage(100);
wi.ReadingPaneInPopupWindow = true;
Panel1.Controls.Add(wi);
-
Call the following function within the <body> tag.
<body onload="ResizeGrid();">
Different properties that can be set for Work items list
The properties for the AVEVA Work Tasks Work items list Web Part are categorized as:
Actions:
-
Allow AutoOwnership on row click: Selecting this option allows you to take ownership of the work items by clicking on the row.
-
Enable hold: Selecting this option allows you to put work items on hold. The Hold button would be visible for the work item, only if hold is enabled.
-
Enable Export: Selecting this option allows you to control the visibility of the export icon in the Work Item details grid status bar.
Display:
-
Show Inbox Details without Left Grid view: On selecting this option, only the Inbox view without the folder list to the left tree menu will be displayed.
-
Show Manager View: On selecting this option, only the Manager View for the list will be displayed.
-
Show Filter Bar Always: Selecting this option enables you to either show or hide the filter bar.
-
Display left tree menu without workflow(s) grouping: On selecting this option, you can view the Work items list page without grouping the workflow(s).
-
Show Queues: Selecting this option displays a folder for the Queues that you are participating in.
-
Show Work Item Fields: Selecting this option displays work item fields.
-
Record Size: The number of messages displayed in the work item is based on the property specified here. For example, suppose, there are totally 35 messages and this property is set as 20, then 20 messages out of 35 will be displayed in the work items.
-
Retain the Sort Column: To retain the selection of recently sorted column after submitting the work item and also while expanding the left tree menu view items. If this is set to true, then selection of the recently sorted column is retained. If set to false, then the selection of the recently sorted column is not retained.
-
Queue Name: Enter the Queue name to be displayed in the left tree menu of the Work Items Web Part. If the Queue name is not specified, all the available queues will be displayed in the left tree menu.
Multiple Queue names can be specified separated by a semicolon. For example: Manager;Support -
Layout View Name: This property loads a specific layout.
-
Show CustomLink in Left Grid Menu: Selecting this option enables you to display a custom link in the left pane of Work Items Web Part.
-
Show Queues in the LHS grid view menu only if they have work items: On selecting this option, the queues in the left hand side grid view menu will be displayed only if they have work items.
-
Display the count in the Left Hand Side Grid View: Enabling this option will display the work items count in the left hand side grid view.
-
Display Classic Paging: Enabling this option will allow you to display the Classic Paging properties. The navigation feature of Work item Control is not supported with Classic Paging enabled.
-
Show Standard Columns: This property displays the work item field columns based on the Workflow Name property of Workitemcontrol.
-
Display the columns with auto fit: If you have less number of columns to be displayed, enable or check this option. If you have more number f columns to be displayed, disable or uncheck this option. Then you can use the scroll bar to view all the columns.
Multi Select:
-
Enable Multi Select: Selecting this option enables you to select multiple work items.
-
Show multi select window in center: This option will display a multi select window in the center of the page.
-
Show detail view with multi select option enabled: Selecting this option will display the detail view with the multi select option enabled by default.
-
Display multi select option by default for queue items: Selecting this option will display the queue items with the multi select option by default.
Item Details:
-
Show Reading pane in popup window: If this option is selected, the work item details will be displayed in a separate window and not in the Reading Pane below the Inbox.
-
ShowDetailsonRowDoubleClick: Selecting this option enables you to open the Work Item Details page (Custom ASPX page) on double-click.
-
Display Navigation buttons Next and Previous in the Work Item detailed view: Selecting this option enables you to navigate to the next or previous work item from the Work Item Details view page.
-
Enable Move to the next work item after submitting the work item from the detailed view: Enabling this option will take you to the next work item when a work item is submitted from the detailed view.
-
Show Queue Detailed View Without Picking: Selecting this option allows you to act on a work item without picking it.
Filter and Group:
-
Workflow Name: Enter the workflow name to be displayed in the left tree menu of the Work items Web Part. If the workflow name is not specified, all the available workflows will be displayed in the left tree menu. Multiple workflow names can be specified with semicolon. Example:Leave Application;HRProcess
-
Group Total Columns: This property is used to calculate the total of the column(s) name when the grouping operation is performed on columns. Multiple column names can be specified with semicolon. Example:Expense Amount,true;Leave Days,false
-
Group Count Columns: This property is used to calculate the count of the columns when the grouping operation is performed on columns. Multiple column names can be specified with semicolon. Example:Leave Days;Expense Type
-
Group Average Columns: This property is used to calculate the average of the columns when the grouping operation is performed on columns. Multiple column names can be specified with semicolon. Example:Expense Amount,true;Leave Days,false
DisplayGroupUI
If the DisplayGroupUI property is set to 'false', the option to enable and disable the Multi-select option icon will not be displayed in the Work Item List Control.
If multiple work items related to approval activities get displayed in the Work items list, you can select all the check boxes related to the approval activity and then act on all the work items from the GroupUI window.
DisplayLeftTreeMenuAtApplicationLevel
If the DisplayLeftTreeMenuAtApplicationLevel property is set to 'true', then the work items of all the workflows will be displayed at Application Level and there will not be workflow segregation displayed in the Left Tree menu view of Work Item control.
DisplayManagerView
If the DisplayManagerView property is set to 'false', the Manager View will not be displayed. Using this property, the manager can see all the tasks assigned to his/her subordinates (peers) who report to him/her. The Manager can perform the following operations from the Manager view:
-
Reassign a work item to another user.
-
Delegate a work item to another user.
-
Set the priority for the work items assigned to his subordinates (peers).
The Manager View will be displayed only for managers. For this property to function correctly, it is mandatory to have the purpose="manager" attribute set in the entity data source provider as well as at the Entity Level.
Set RecordSize
Using this property, we can control the number of work items that will be displayed per page.
Show Queue
If the ShowQueues property is set to 'true', only the "Queue" icon and the Queue will be displayed in the Left Tree menu view.
If the ShowQueues property is set to 'false', the Queue icon and the Queue will not displayed in the Left Tree menu view.
Work item Fields
If the ShowWorkItemFields property is set to 'true', the work item fields will be displayed in the work items details grid. However, this property will be effective only if you are loading the Work items list control with the Detail view and you have not customized the view by creating Global Layout or Workflow level Layout.
If the ShowWorkItemFields property is set to 'false' then the work item fields will be displayed in the work item details grid.
ShowInboxViewOnly
If the ShowInboxViewOnly property is set to 'true', only the work item details grid will be displayed and the Left Tree menu view showing the workflow segregation will not be displayed.
If the ShowInboxViewOnly property is set to 'false', the work items details grid as well as the Left Tree menu view showing the workflow segregation will be displayed.
ShowManagerViewOnly
If the ShowManagerViewOnly property is set to 'true' then the Manager can see all the tasks assigned to the subordinates (peers) who report to him/her without the Left Tree menu view of workflow segregation display. The Manager can perform the following operations from the Manager View:
Reassign a work item to another user
Delegate a work item to another user
Set the priority for the work items assigned to his subordinates (peers)
UserIdString
Provides the UserIdString of the Actor who will act on the activity.
Different UserIdString formats
-
If the repository is mapped to AVEVA Work Tasks List user provider, the UserIdString will be skeltalist::[GUID]. Here, the GUID is taken from the SKEUsers table present in the Repository DB.
For example: skeltalist:: C99B4110-C8CC-410B-BF70-93F3A7E34EDF -
If the repository is mapped to Active Directory user provider, the UserIdString will be activedirectory::[samAccountName]. Here, samAccountName is an active directory property value.
For example: activedirectory::stephen -
If the repository is mapped to Forms user provider, the UserIdString will be sqlprovider::[UniqueIdentifier]. Here, the UniqueIdentifier is the unique identifier ID for the resource.
For example: sqlprovider::6fb03011-68b7-437e-972e-21c67e4e2fe7 -
If the repository is mapped to ASP.NET Membership user provider, the UserIdString will be membershipprovider::[UniqueIdentifier]. Here, the UniqueIdentifier is the unique identifier ID for the resource.
For example: membershipprovider::a9bfc969-cc82-4c4b-99b9-50d9e1a91c01
EnableHold
If the EnableHold property is set to 'true' then in the Manage Work Item drop-down list, "Hold" will be displayed so that the Actor can put the work item on hold.
The Hold option will be available only if the activity is assigned to a single user. If the activity is assigned to multiple users, the Hold option will not be displayed in the Manage Work Item drop down.
ShowFilterBarAlways
This property can be set for displaying or hiding the filter bar. For example, if the ShowFilterBarAlways property is set to false, the filter bar will not be displayed.
If the ShowFilterBarAlways property is set to true, the filter bar will be displayed.
Application Name
Provides the Application or Repository Name.
Workflow Names
Based on the Workflow Names property specified, the Left Tree menu view shows the workflows.
EnableExport
Based on this property, you can control the visibility of the Export icon in the work item details grid status bar. If the EnableExport property is set to 'true', the "EnableExport" icon will be displayed.
If the EnableExport property is set to 'false', the "EnableExport" icon will not be displayed.
QueueDisplayOrder
The QueueDisplayOrder property is used to display the queues in a specific order in which you want them to appear in the Left Tree menu view.
Create a SortedDictionary<int,string> that specifies the Order and the QueueName. Assign the SortedDictionary to the QueueDisplayOrder Property of the Workitemcontrol.
For example, if the Queue Names are A,B,C and if you want to display them in "C,A,B" order, the following code can be used:
Skelta.Entity.UserContext uContext = new Skelta.Entity.UserContext();
Skelta.HWS.WorkListChannel.Web.WorkItemListControl.WorkItemControl wi = new Skelta.HWS.WorkListChannel.Web.WorkItemListControl.WorkItemControl();
wi.ID = "WorkItemControl"; // This is mandatory.
wi.ApplicationName = uContext.Repository.ApplicationName; //Provide Application or Repository name. This is mandatory.
wi.UserIdString =uContext.LoggedInUserId ; //Provide user id string. This is mandatory.
System.Collections.Generic.SortedDictionary<int, string> Qdisplay = new System.Collections.Generic.SortedDictionary<int, string>();
Qdisplay.Add(1,"C");
Qdisplay.Add(2,"A");
Qdisplay.Add(3,"B");
wi.QueueDisplayOrder = Qdisplay;//Assign the SortedDictionary to the QueueDisplayOrder Property of the Workitemcontrol
Panel1.Controls.Add(wi);
ShowStandardColumns
If the ShowStandardColumns property is set to True then the standard columns will be displayed. If the ShowStandardColumns property is set to 'false', then the specific work item fields related to the workflow along with the Subject column will be displayed.
The columns (fields) will get displayed based on the Workflow Name property specified. If the property is not set, then the work item fields for all the workflows of the repository will be displayed.
GroupTotalColumns
The Group Total Columns property is used to calculate the total of the column(s) name when the grouping operation is performed on columns.
For example, consider a scenario where the 'Leave Days' and 'LeaveReason' are added as work item fields for the workflow 'Employee Leave Details'. To calculate the total number of leaves taken by the employee:
-
Set the GroupTotalColumns property for the columns for which the total has to be calculated when the grouping operation is performed on other columns.
-
The following code snippet shows how to use GroupTotalColumns property:
Skelta.Entity.UserContext uContext = new Skelta.Entity.UserContext();
Skelta.HWS.WorkListChannel.Web.WorkItemListControl.WorkItemControl wi = new Skelta.HWS.WorkListChannel.Web.WorkItemListControl.WorkItemControl();
wi.ID = "WorkItemControl"; // This is mandatory.
wi.ApplicationName = uContext.Repository.ApplicationName; //Provide Application or Repository name. This is mandatory.
wi.UserIdString =uContext.LoggedInUserId; //Provide user id string. This is mandatory.
//The bool parameter in the SortedDictionary is to specify whether the currency symbol should appear before the column values are not.
System.Collections.Generic.SortedDictionary<string, bool> groupcolumns = new System.Collections.Generic.SortedDictionary<string, bool>();
groupcolumns.Add("LeaveDays", false);
wi.GroupTotalColumns = groupcolumns;
Panel1.Controls.Add(wi);
-
Go to Inbox. The total number of leaves are displayed as shown below when the grouping is done on any column. In this case, it is the Activity Display Name column.
GroupCountColumns
The GroupCountColumns property is used to calculate the count of the columns when the grouping operation is performed on columns.
For example: Consider a scenario where the 'Leave Days' and 'LeaveReason' are added as work item fields for the workflow 'Employee Leave Details'. To calculate the number of rows based on LeaveReason column:
-
Set the GroupCountColumns property for the column for which the count is to be calculated.
-
The following code snippet shows how to use the GroupCountColumns property.
Skelta.Entity.UserContext uContext = new Skelta.Entity.UserContext();
Skelta.HWS.WorkListChannel.Web.WorkItemListControl.WorkItemControl wi = new Skelta.HWS.WorkListChannel.Web.WorkItemListControl.WorkItemControl();
wi.ID = "WorkItemControl"; // This is mandatory.
wi.ApplicationName = uContext.Repository.ApplicationName; //Provide Application or Repository name. This is mandatory.
wi.UserIdString =uContext.LoggedInUserId; //Provide user id string. This is mandatory.
System.Collections.Generic.SortedDictionary<string, string> groupcntcolumns = new System.Collections.Generic.SortedDictionary<string, string>();
groupcntcolumns.Add("LeaveReason", "LeaveReason");
wi.GroupCountColumns = groupcntcolumns;
Panel1.Controls.Add(wi);
-
Go to Inbox. The total count is displayed when we group the Activity Display Name.
GroupAverageColumns
The GroupAverageColumns property is used to calculate the average of the columns when the grouping operation performed on a column. The user can also display the currency symbol ($) for numeric fields.
This property is of type SortedDictionary<string,bool> where key<string> specifies the column name and value<bool> specifies whether the currency symbol needs to be displayed or not.
For example: Suppose that the 'Expense Amount' and 'Expense Type' work item fields are added to the 'Expense Approval' workflow and you want to calculate the average of the 'Expense Amount' column.
-
Set the GroupAverageColumns property with the column name for which the total is to be calculated.
Skelta.Entity.UserContext uContext = new Skelta.Entity.UserContext();
Skelta.HWS.WorkListChannel.Web.WorkItemListControl.WorkItemControl wi = new Skelta.HWS.WorkListChannel.Web.WorkItemListControl.WorkItemControl();
wi.ID = "WorkItemControl"; // This is mandatory.
wi.ApplicationName = uContext.Repository.ApplicationName; //Provide Application or Repository name. This is mandatory.
wi.UserIdString =uContext.LoggedInUserId; //Provide user id string. This is mandatory.
System.Collections.Generic.SortedDictionary<string, string> groupavgcolumns = new System.Collections.Generic.SortedDictionary<string, string>();
groupavgcolumns.Add("Expense Amount", "Expense Amount");
wi.GroupAverageColumns = groupavgcolumns;
Panel1.Controls.Add(wi);
-
Go to Inbox. The average of 'Expense Amount' will be displayed.
WorkflowDisplayOrder
The WorkflowDisplayOrder property is used to display the workflows in a specified order.
Create a SortedDictionary<int,string> variable, which specifies the Order and the Workflow Name. Assign the SortedDictionary to the WorkflowDisplayOrder Property of the Workitemcontrol.
For example, if the Workflow Names are Employee Leave Details, Expense Approval, and Purchase Order and if you want to display them as Expense Approval, Purchase Order, and Employee Leave Details, then use the following code.
Skelta.Entity.UserContext uContext = new Skelta.Entity.UserContext();
Skelta.HWS.WorkListChannel.Web.WorkItemListControl.WorkItemControl wi = new Skelta.HWS.WorkListChannel.Web.WorkItemListControl.WorkItemControl();
wi.ID = "WorkItemControl"; // This is mandatory.
wi.ApplicationName = uContext.Repository.ApplicationName; //Provide Application or Repository name. This is mandatory.
wi.UserIdString =uContext.LoggedInUserId; //Provide user id string. This is mandatory.
System.Collections.Generic.SortedDictionary<int, string> Qdisplay = new System.Collections.Generic.SortedDictionary<int, string>();
wDisplayOrder.Add(3, "Employee Leave Details");
wDisplayOrder.Add(1, "Expense Approval");
wDisplayOrder.Add(2, "Purchase Order");
wi.WorkflowDisplayOrder = wDisplayOrder;
Panel1.Controls.Add(wi);
LayoutViewName
This property is used to load a specific view when we load a Work items list control.
ShowCounter
This property is used to show or hide the counters for the work items Inbox. When this property is set to False, you will not be able to see the number of items count under each section in the Left tree menu view in the work item Inbox.
ShowCounter = true;
If this property is set to False, you will not be able to see how many items there are in the work item Inbox.
Sample Code
Skelta.Entity.UserContext usrcn = new Skelta.Entity.UserContext("John", new Skelta.Core.ApplicationObject("Telematics"), "activedirectory", "", "", false);
Skelta.HWS.WorkListChannel.Web.WorkItemListControl.WorkItemControl wi = new Skelta.HWS.WorkListChannel.Web.WorkItemListControl.WorkItemControl();
wi.ID = "WorkItemControl";
wi.ShowCounter = false;
wi.ApplicationName = uContext.Repository.ApplicationName; //Provide Application or Repository name. This is mandatory.
wi.UserIdString =uContext.LoggedInUserId; //Provide user id string. This is mandatory.
Panel1.Controls.Add(wi);
ShowDetailsOnRowDoubleClick
This property enables you to open the Work Item Detail view on double-click of the row in the Work Item details grid.
Sort on the subject column in Work Item Inbox has been enabled. Also, the sort order in Work Item Inbox will be retained after submitting a work item.
ShowQueuesWithWorkitems
Showing the queues with work items under the left hand side workflow grouping of the Work items list control is controlled by the Workitemlist Control Property - ShowQueuesWithWorkitems. Based on this property, you can control the behavior of showing only the queues with work items under the workflows even though you may be a participant of those queues.
ShowDetailViewWithMultiSelect
Showing the work items detailed view with the Multi Select option is controlled by
the Workitemlist Control property (ShowDetailViewWithMultiSelect). Based on this property,
you can control the behavior of showing the Work Item Detail view with the Multi Select
window enabled.
Showing the Work Item Detail view with the Multi Select option also depends on the
ShowDetailsonRowDoubleClick property.
If the ShowDetailsonRowDoubleClick is set as 'true', the Work Item Detail view will open on double-clicking the row with the Multi Select option enabled.
If ShowDetailsonRowDoubleClick is set as 'false', then the Work Item Detail view will open on selecting the row with Multi Select option enabled.
You can select all the work items within a group and act on it with the help of Selectallwithingroup option available as context menu with the Multi Select mode.
ShowMultiSelectWindowInCenter
The Multi Select window displayed in the center of the screen is controlled by the Workitemlist Control Property - ShowMultiSelectWindowInCenter. Based on this property, you can control the behavior of showing the Multi Select window.
QueueDetailViewWithoutPicking
Showing the Queue Detail view without picking the item from the Queue is controlled by the Work items list control property - QueueDetailViewWithoutPicking. Based on this property, you can enable or disable this feature in the Work items list control. By default, this feature is disabled.
Viewing the Queue Detail View page is possible in two ways.
-
Double-click the item from the grid to get the Detail view.
-
Through the context menu
The Queue Detail View page can be seen from the context menu option available from the Queue Work Item. Select Form Instances > Main Form to view the work items in detail.
EnableMoveNextPreviousWorkitem
This property enables you to navigate between different work items from the Work Item Detail view. This prevents the need to go back to the main details grid which shows the list of work items. You can also sort the Work Item Detail grid in some particular order and then navigate through the work items in that order.
EnableAutoMoveNextWorkitem
This feature enables you to view the Work Item Details for the next work item after submitting a work item. Moving to the next work item on submission of the work item from the detailed view is controlled by the WorkItemlist control property - EnableAutoMoveNextWorkitem.
A check box Show next work item on submission is available on the Work Item Detail view.
If selected, details of the next work item are shown after submission of the current work item.
If de-selected, the Work Item Detail view window will get closed without navigating to the next work item.
Split Bar in the Work Item List control
Split bar has been implemented in the Work Item List control. It can be used to adjust the width of the Work Item List control, if the workflow name or the Queue name is very long.