REST API - completeWorkItem

The table summarizes the REST API - completeWorkItem (in ClientService).

Request

Format
PUT <baseurl>/clientservice/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
  • 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.
  • 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.

  • ispiled=Boolean (optional, default=false): Whether (if the current work item is piled) the next piled work item should be opened.
  • responsetype=string (optional, default = JSON): The only valid response type is JSON.
Body DataPayload 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.

Example

Headers used in example:

  • Content-Type: application/json
  • Accept: application/json
Request
PUT <baseurl>/clientservice/complete/36/8C8AD3FD-3600-4E7D-9DF4-0280F8506635/WT___uST8O5nEeCUrZpLKntDNw/1.0.0.20170823111324812
Request Body
{"payloadModel": {
"@payloadMode": "JSON",
"serializedPayload": "{\"items\":[{\"$param\":\"TextField\",\"$value\":[\"Need help with Model 9000.\"],\"type\":\"String\",\"mode\":\"INOUT\"},{\"$param\":\"ArrayTextField\",\"$value\":[],\"type\":\"String\",\"mode\":\"INOUT\"}]}"
}}
Response
{
        "xml-fragment":
        {
            "@isSuccessful": "true",
            "payloadModel":
            {
                "@payloadMode": "JSON",
                "serializedPayload": "{"items":[{"$param":"TextField","$value":["Need help with Model 9000."],"type":"String","mode":"INOUT"},{"$param":"ArrayTextField","$value":[],"type":"String","mode":"INOUT"}]}"
            },
            "workTypeDetail":
            {
                "@uid": "WT___uST8O5nEeCUrZpLKntDNw",
                "@version": "1.0.0.20170823111324812"
            },
            "presentation":
            {
                "@formIdenitifier": "http://10.129.40.599:8080/bpmresources/1.0.0.20170823111324812/openspaceGWTPull_DefaultChannel/PageflowProcess/PageflowProcessProcess2/Pageflow2/Pageflow2.gwt.json",
                "@type": "GWT_FORM"
            },
            "workItem":
            {
                "@id": "36",
                "@version": "-1"
            }
        }
    }