REST API - completeWorkItem

The table summarizes the REST API - completeWorkItem.

Request

Format
PUT <baseurl>/workitem/presentation/complete/<id>/<userid>/<typeuid>/<typeversion>  
Path parameters
  • id: ID of the work item to be completed.
  • userid: GUID of the resource that wants to complete the work item.
  • typeuid: Unique ID of the work type from which the work item is derived.
  • typeversion: Version number of the work type from which the work item is derived.
Query parameters
  • channelid=string (optional, default=openspaceGWTPull_DefaultChannel): Identifier of the channel to which the requesting client application is bound.
  • channeltype=string (optional, default=openspaceChannel): Enumerated value defining the channel type (technology) associated with the specified channelid. For a list of available enumerations, see channeltype enumerations.

    See Identifying the Client Channel in a Service Call for more information.

  • version=long (optional, default = -1): Version number of the work item to be opened. If set to -1 or omitted, the latest version of the work item is used.
  • responsetype=string (optional, default = JSON): Enumerated value defining the format of the data payload to be used in the response message - either XML or JSON.
  • ispiled=Boolean (optional, default=false): Whether (if the current work item is piled) the next piled work item should be opened.
  • getGlobalValues=boolean (optional, default=false) If you require the values or just the goref itself.
Body payLoadDetails element (Required): Data payload for the specified work item.

See Valid Format for DataModel for information about the valid format of this data.

Response

JSON Returns a JSON representation of the contents of a workResponse element.
XML Returns a workResponse element (from the WorkPresentationService schema)

Example

Request
PUT https://easyas.insurance.com:1234/bpmrest/workitem/presentation/complete/58/tibco-admin/WT__oyg80GCwEeKQSvLdcLuD4A/1.0.0.201301171526
Request body
<payloadModel payloadMode="JSON">
   <serializedPayload>{items:[{"$param":"custRef","$value":["123"],"type":"String","mode":"IN"},{"$param":"name","$value":["Gerald Filson"],"type":"String","mode":"INOUT"}]}</serializedPayload>
   </payloadModel>
Response
{
    "xml-fragment": {
        "@isSuccessful": "true"
    }
}