# Class: WorkListService

## tibco.objectapi.service.WorkListService

#### new WorkListService()

### Methods

#### addCurrentResourceToView(request, callback)

Adds the current resource to a Work List View

The work view must be specified as public, either when it is created (using the createWorkListView function) or by editing it (using the editWorkListView function).

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.AddCurrentResourceToViewRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `AddCurrentResourceToViewResponseType`.

#### createWorkListView(request, callback)

Creates a new work view.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.CreateWorkListViewRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `CreateWorkListViewResponseType`.

#### deleteCurrentResourceFromView(request, callback)

Removes a public work view from the work view list for the calling resource.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.DeleteCurrentResourceFromViewRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `DeleteCurrentResourceFromViewResponseType`.

#### deleteWorkListView(request, callback)

Deletes an existing work list view. The calling resource must be the Owner or an Author of the work view to be able to delete it.

The work view must be locked using the getWorkListViewDetails function before it can be deleted.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.DeleteWorkListViewRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `DeleteWorkListViewResponseType`.

#### editWorkListView(request, callback)

Edits an existing work view.

A work view must be locked using the getWorkListViewDetails function (using the lockView parameter) before you can edit the view with this function.

The request must specify the name and the unique ID of the work view to be edited. It can also optionally specify the details of the work view that you want to edit. For example, its description, any sort/filter criteria or the organizational model entities that can access the work view. If any of the optional elements are specified, they overwrite the existing attributes specified for this view.

You only need to pass the data you want to change. Parameters that are not passed are unchanged.

The owner of a view needs the viewWorkList system action for the target. Also, any GROUP, POSITION or ORG-UNIT that is added to the "Users" set also needs the viewWorkList system action.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.EditWorkListViewRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `EditWorkListViewResponseType`.

#### getAllocatedWorkListItems(request, callback)

Returns an allocated work list for an organization model entity.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetAllocatedWorkListItemsRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `GetWorkListItemsResponseType`.

#### getEditableWorkListViews(request, callback)

Retrieves a list of work views that the calling resource can edit.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetEditableWorkListViewsRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `GetEditableWorkListViewsResponseType`.

#### getPublicWorkListViews(request, callback)

Retrieves a list of all public work views.

Work views are specified as public, either when they are created (using the createWorkListView function) or edited (using the editWorkListView function.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetPublicWorkListViewsRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `GetPublicWorkListViewsResponseType`.

#### getResourceOrderFilterCriteria(request, callback)

Returns the order and filter criteria for a particular resource.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetResourceOrderFilterCriteriaRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `GetResourceOrderFilterCriteriaResponseType`.

#### getViewsForResource(request, callback)

Retrieves a list of work views to which the calling resource has access. In other words, a list of work views to which the calling resource is either an Owner or an Author.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetViewsForResourceRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `GetViewsForResourceResponseType`.

#### getWorkItemOrderFilter(request, callback)

Returns the fields defined by BRM that can be used to define sort/filter criteria for a work item list.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetWorkItemOrderFilterRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `GetWorkItemOrderFilterResponseType`.

#### getWorkItemOrderFilterNoLimit(request, callback)

Returns all fields defined by BRM that can be used to define sort/filter criteria for a work item list; takes an optional limitColumns, rather than mandatory.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetWorkItemOrderFilterNoLimitRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `GetWorkItemOrderFilterResponseType`.

#### getWorkListItems(request, callback)

Returns a work list for an organization model entity.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetWorkListItemsRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `GetWorkListItemsResponseType`.

#### getWorkListItemsAllResources(request, callback)

Returns a list of work items for all resources (similar to getWorkListItems, but will return all work items, not just those for a specific entity. Note that counts are not supported when getting all work items.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetWorkListItemsAllResourcesRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `GetWorkListItemsResponseType`.

#### getWorkListItemsForGlobalData(request, callback)

Returns a list of work items associated with a global data reference.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetWorkListItemsForGlobalDataRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `GetWorkListItemsForGlobalDataResponseType`.

#### getWorkListItemsForView(request, callback)

Retrieves the work item list for a specific work view.

This must be executed as a resource who has access to the work view.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetWorkListItemsForViewRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `GetWorkListItemsForViewResponseType`.

#### getWorkListViewDetails(request, callback)

Retrieves the details of a specific work view. For example, its description, creation date, whether or not it is public and its owner. It can also be used to optionally lock a work view for editing.

If you want to edit a work view using the editWorkListView function, you must lock it first using this function.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.GetWorkListViewDetailsRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `WorkListView`.

#### previewWorkItemFromList(request, callback)

Previews one or more work items (to get the associated input and output data without opening the work items).

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.PreviewWorkItemFromListRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `PreviewWorkItemFromListResponseType`.

#### setResourceOrderFilterCriteria(request, callback)

Sets the order and filter criteria for a particular resource.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.SetResourceOrderFilterCriteriaRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `SetResourceOrderFilterCriteriaResponseType`.

#### unlockWorkListView(request, callback)

Unlocks a locked work list view.

Use this to unlock a view that has been locked using the getWorkListViewDetails function.

##### Parameters:

Name | Type | Description
--- | --- | ---
`request` | tibco.objectapi.service.request.UnlockWorkListViewRequest | A request set with data for this service call.
`callback` | tibco.objectapi.service.Callback | A callback to handle the service response of type `UnlockWorkListViewResponseType`.