Work Item Service API Specification

What Is the Work Item Service?

The work item service provides a standard way for services to present work items to users. The work item service:

The work item service does not:

Typical Use Cases

Using the work item service:

Key Concepts

Work Item

A work item represents a piece of work that must be carried out by an end user. Examples of work items are:

Many services can have requirements to generate work items. These work items may mean different things, but at their core, they:

While each application in the suite could implement its own work item functionality, this would:

Services and Service Types

This specification refers to services and service types in the context of work item types and refers to another software component. These should NOT be interpreted to be services in the Service Catalog sense of the word.

UI Elements and Use Cases

The UI enables the following functionality.

View a List of Work Items

The UI displays a list of work items that are:

It displays all types of work item in a single list, and supports filtering work items by:

Cancelled work items do not appear in this list.

View/Edit a Specific Work Item

The UI for viewing/editing a work item:

Extension Point

The work item detail page can host an extension point into which integrators may render context specific data in support of the work item. Qualifying extensions must be of type csp.placesand declare their hostExtensionId as being cafe.inbox.detail.

For example, the following snippet shows what the vTravel application might declare to embed a seating chart in the manual seat assignment task of a travel request.

"extensions": [
{
"pointId": "csp.places",
"extensionId": "travel.inbox.seatingTask",
"hostExtensionId": "cafe.inbox.detail",
"description": "Seating chart for a travel destination",
...
}
]

Work Item Portlet

The work item portlet shows a list of work items assigned or delegated to the current use. The number of work items shown is configurable (the default is 10 work items). Functionally, it is the same as the work item list.

Model

This section describes the model for the work item service.

Work Item Type

Note the following points about a work item type:

Work Item

A work item:

A recipient may be a user or a group.

When assigned to a group:

Once a single member of the group updates the work item, no other members may do so.

Work Item States

A work item can exist in the following states:

Work Item Data

A work item presents two sets of data:

While the work item presents both of these sets of data, it does not own the form data. The form is a resource provided by some client application and provides a view of the data in that client application. The client application remains the owner of that data. For example, the approval service owns approval requests and does not relinquish this ownership to the work item service. Therefore:

To implement form data:

As a result:

It is not possible to show form data in work item lists.

Assignment

A work item must be assigned to one or more assignees. This is enforced when the work item is created. An assignee may be:

All assignees have access to the same work item:

If a use case demands that a work item is assigned to a group AND that each member of the group receive a unique work item, then it is the responsibility of the caller to expand the group and to create and assign one work item per group member.

For example, if an approval policy specified that all members of a group must approve an approval, the approval service would expand the group's membership and create one work item per member of the group.

It is also the responsibility of the client application to close/reject/abort any work items that may no longer be applicable. For example, if one user rejects an approval, the approval service is responsible for aborting the outstanding work items (if required).

Forms

A work item must specify a form. The form is used to:

A work item's form is:

Work Item History

Each work item has a history of events related to that work item. Events include:

The work item history must capture the following:

Action

For example, when an approval work item is approved, the action id "approved" would be sent back to the approval service. The approval service can then update the approval as required.

Summary of Operations

Create Work Item Type

Create Work Item Type:

Create Work Item

Create Work Item is initiated by a provider application, for example, by the approval service creating an approval.

Update Work Item

A work item may be updated by:

In addition:

Reassign Work Item

Taking Ownership of a Work Item

Taking ownership of a work item:

Complete Work Item

A work item may only be completed by:

Note also that:

Cancel Work Item

Canceling a work item prevents a work item from being updated or completed The work item enters the cancelled state.

A work item:

This would be determined by the client application based on its rules. For example, the approval service may cancel any outstanding "Approval" work items once one of the approvers has rejected the approval.

Work items may not be cancelled by non-solution users.

Once aborted a work item may not be:

Note also that:

If an application wished to offer a "Cancel" action for a work item, it would need to:

User Roles

Normal users can:

Tenant administrators can:

Notifications

Outbound Notifications
Specifically, the work item service will not: #### Events
Event Name Fired When Notification Sent To
assigned Work item is assigned Assignee of the work item:
  • If a group, this will be sent to every member of the group
  • If an individual, it will be sent only to the user
updated Work item is updated If updated by the assignee, AND:
  • The assignee was an individual, no notification is sent
  • The assignee was a group, notification is sent to the other group members
If updated by someone other than the assignee:
  • Notification is sent to the assignee
completed The work item is completed If completed by the assignee, AND:
  • The assignee was an individual, no notification is sent
  • The assignee was a group, notification is sent to the other group members
If completed by someone other than the assignee:
  • Notification is sent to the assignee

Inbound Notifications

The work item service supports completing work items via inbound notifications, for example, email:

Delegation

Delegation allows specific people to complete a task on behalf of the assignee:

Configuration

There may be multiple delegation configurations per user. Each configuration specifies: