REST API - completeWorkItem

The table summarizes the REST API - completeWorkItem.

Request

Format
PUT <baseurl>/workitem/complete/<id>/<version>/<nextpileditem>
Path parameters
  • id : ID of the work item that is to be completed.
  • version: Version of the work item. If not set, the latest version will be used.
  • nextpileditem: (boolean) If work items are piled, passing true causes this method to retrieve the ManagedObjectId for the next work item. You must then call allocateAndOpenWorkItem to open the work item. For information about piled work items, see the TIBCO Business Studio Process Modeling User's Guide.
Body completeWorkItem element (from the WorkItemManagementService schema).

Response

JSON Returns a JSON representation of the content of the completeWorkItemResponse element.
XML Returns the content of the completeWorkItemResponse element (from the WorkItemManagementService schema)

Example

Request
PUT <baseurl>/workItem/complete/59/2/true
Request body
{
        "workItemBody":
        {
            "dataModel":
            {
                "inputs":
                [
                    {
                        "@name": "IssueDetails",
                        "@type": "String",
                        "@array": "false",
                        "simpleSpec":
                        {
                            "value": "Model 8000"
                        }
                    },
                    {
                        "@name": "IssueDescription",
                        "@type": "String",
                        "@array": "false",
                        "simpleSpec":
                        {
                            "value": "Needs info"
                        }
                    },
                    {
                        "@name": "ContactPhone",
                        "@type": "String",
                        "@array": "false",
                        "simpleSpec":
                        {
                            "value": "889-344-2288"
                        }
                    },
                    {
                        "@name": "ContactName",
                        "@type": "String",
                        "@array": "false",
                        "simpleSpec":
                        {
                            "value": "Frank Smith"
                        }
                    }
                ],
                "inouts":
                [
                    {
                        "@name": "ResolutionDetails",
                        "@type": "String",
                        "@array": "false",
                        "simpleSpec": ""
                    },
                    {
                        "@name": "ResolutionDescription",
                        "@type": "String",
                        "@array": "false",
                        "simpleSpec": ""
                    }
                ]
            }
        }
    }
Response
{
        "nextWorkItem":
        {
            "@id": "60",
            "@version": "2"
        }
    }