IBM Business Process Manager, Version 8.5.5

REST interface for BPD-related resources - Activity Instance (Ad Hoc) Resource - PUT Method

Use this method to perform actions on the activity.

Sample method invocation

PUT /rest/bpm/wle/v1/activity/{instanceId}?action={string}

Parameters

Required parameters
NameValue TypeDescription
action string
The action that will be performed on the activity instance. Execute v1/activity/{instanceId}/availableActions to retrieve a list of parameter values that are currently valid.

Request content

None

Response content

Ad hoc activity details (ActivityDetails complexType).

The default content type is application/json.

MIME type: application/json

+ View example content
{
   "status": "200",
   "data":    {
      "dueDate": null,
      "taskId": null,
      "taskOwnerUserId": null,
      "taskOwnerGroupId": null,
      "narrative": "my narrative",
      "id": "2118.367fc27d-6bd1-4749-ab07-16703c72e641",
      "name": "Sample Activity",
      "executionState": "WORKING",
      "activityType": "USER_TASK",
      "executionType": "AUTOMATIC",
      "optionType": "REQUIRED",
      "required": true,
      "repeatable": false,
      "startTime": "2014-02-05T11:56:06Z",
      "endTime": null,
      "hidden": false
   }
}

MIME type: application/xml


+ View schema
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://rest.bpm.ibm.com/v1/data/activity"
        elementFormDefault="unqualified" xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:tns="http://rest.bpm.ibm.com/v1/data/activity"
        xmlns:pref="http://rest.bpm.ibm.com/v1/data/root"
        xmlns:common="http://rest.bpm.ibm.com/v1/data/common"
        xmlns:execution="http://rest.bpm.ibm.com/v1/data/execution"
        xmlns:task="http://rest.bpm.ibm.com/v1/data/task">

    <import schemaLocation="BPMRestData.xsd" namespace="http://rest.bpm.ibm.com/v1/data/root" />
    <import schemaLocation="Common.xsd" namespace="http://rest.bpm.ibm.com/v1/data/common"/>
    <import schemaLocation="Task.xsd" namespace="http://rest.bpm.ibm.com/v1/data/task"/>


    <!--
        This type contains details related to a activity instance.
    -->
    <complexType name="Activity">
        <complexContent>
            <extension base="pref:Data">
                <sequence>

                    <!-- The activity instance ID -->
                    <element name="id" type="string" />

                    <!-- The name of the activity -->
                    <element name="name" type="string" />

                    <!-- The current status of the activity instance 
                         Valid values are:
                          "READY",
                          "WORKING",
                          "WAITING",
                          "DISABLED",
                          "LAUNCHING",
                          "DISABLED",
                          "COMPLETED",
                          "FAILED",
                          "NOT_USED" -->
                    <element name="executionState" type="string" />

                    <!-- The task type of the activity instance 
                         Valid values are:
                          "USER_TASK",
                          "CALLED_PROCESS",
                          "SUB_PROCESS" -->
                    <element name="activityType" type="string" />

                    <!-- The execution type of the activity instance 
                         Valid values are:
                          "AUTOMATIC",
                          "MANUAL",
                          "NONE" -->
                    <element name="executionType" type="string" />

                    <!-- The option type of the activity instance 
                         Valid values are:
                          "REQUIRED",
                          "OPTIONAL" -->
                    <element name="optionType" type="string" />

                    <!-- Indicates if the activity is required for completion. -->
                    <element name="required" type="boolean" />

                    <!-- Indicates if the activity is repeatable. -->
                    <element name="repeatable" type="boolean" />

                    <!-- The timestamp when the activity instance was started. -->
                    <element name="startTime" type="dateTime" nillable="true" />
                    
                    <!-- The timestamp when the activity instance reached an end state. -->
                    <element name="endTime" type="dateTime" nillable="true" />

                    <!-- Indicates if the activity is hidden. -->
                    <element name="hidden" type="boolean" />
                    
                    <!-- The ID of the document that enabled this activity, if any. -->
                    <element name="enablingDocumentID" type="string" nillable="true" />
                    
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <!--
        This type contains details related to a activity instance.
    -->
    <complexType name="ActivityDetails">
        <complexContent>
            <extension base="tns:Activity">
                <sequence>

                    <!-- The due date associated with the activity -->
                    <element name="dueDate" type="dateTime" nillable="true" />
                    
                    <!-- The id of the related task (only with user task implementation) -->
                    <element name="taskId" type="string" nillable="true" />
                    
                    <!-- The owner's user id of the related task (only with user task implementation) -->
                    <element name="taskOwnerUserId" type="string" nillable="true" />
                    
                    <!-- The owner's group id of the related task (only with user task implementation) -->
                    <element name="taskOwnerGroupId" type="string" nillable="true" />

                    <!-- The narrative of the activity -->
                    <element name="narrative" type="string" nillable="true" />
                    
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <!-- A list of action names. -->
    <complexType name="AvailableActions">
        <complexContent>
            <extension base="pref:Data">
                <sequence>
                    <element name="actions" type="string" minOccurs="0" maxOccurs="unbounded"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    
    <!-- A list of current tasks. -->
    <complexType name="CurrentTasks">
        <complexContent>
            <extension base="pref:Data">
                <sequence>
                    <element name="tasks" type="task:TaskDetails" minOccurs="0" maxOccurs="unbounded"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    
</schema>
+ View example content
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bpm:ResponseData xmlns:bpm="http://rest.bpm.ibm.com/v1/data">
    <status>200</status>
    <data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns8="http://rest.bpm.ibm.com/v1/data/activity" xsi:type="ns8:ActivityDetails">
        <id>2118.367fc27d-6bd1-4749-ab07-16703c72e641</id>
        <name>Sample Activity</name>
        <executionState>WORKING</executionState>
        <activityType>USER_TASK</activityType>
        <executionType>AUTOMATIC</executionType>
        <optionType>REQUIRED</optionType>
        <required>true</required>
        <repeatable>false</repeatable>
        <startTime>2014-02-05T11:56:06Z</startTime>
        <endTime xsi:nil="true"/>
        <hidden>false</hidden>
        <dueDate xsi:nil="true"/>
        <taskId xsi:nil="true"/>
        <taskOwnerUserId xsi:nil="true"/>
        <taskOwnerGroupId xsi:nil="true"/>
        <narrative>my narrative</narrative>
    </data>
</bpm:ResponseData>

MIME type: application/x-javascript

Error Response content

Detailed error information.

The default content type is application/json.

MIME type: application/json


+ View schema
{  "description": "WLE Error Response", 
   "type": "object",
   "properties":
   {  "status": {"type": "string",
         "description": "The status of the previous API call."
      },
      "exceptionType": {"type": "string",
         "description": "The classname associated with the exception."
      },
      "errorNumber": {"type": "string",
         "description": "Message ID of the exception."
      },
      "errorMessage": {"type": "string",
         "description": "Message text of the exception."
      },
      "errorMessageParameters": {"type": ["string"], "optional": true,
         "description":"Message text parameters of the exception."
      },
      "programmersDetails": {"type": "object", "optional": true,
         "description":"Additional exception details, for example, a stack trace."
      }
   }
} 

MIME type: application/xml


+ View schema
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://rest.bpm.ibm.com/v1/data/exception"
	elementFormDefault="unqualified" xmlns="http://www.w3.org/2001/XMLSchema"
	xmlns:tns="http://rest.bpm.ibm.com/v1/data/exception"
	xmlns:dat="http://rest.bpm.ibm.com/v1/data/root">

    <import schemaLocation="BPMRestData.xsd" namespace="http://rest.bpm.ibm.com/v1/data/root" />
    
    <!--
	This type represents an error response.
    -->    
    <element name="RestRuntimeException">
	<complexType>
	    <sequence>
		<element name="status" type="string"/>
		<element name="Data" type="tns:ExceptionData">
    		</element>
	    </sequence>
	</complexType>
    </element>

    <!-- 
	 This type contains detailed error information associated with an exception.
    -->
    <complexType name="ExceptionData">
	<sequence>
	    <element name="status" type="string"/>

	    <!-- This specifies the java class name of the exception -->
	    <element name="exceptionType" type="string"/>

	    <!-- The message ID of the error message -->
	    <element name="errorNumber" type="string" minOccurs="0"/>

	    <!-- The complete error message -->
	    <element name="errorMessage" type="string"/>

	    <!-- The list of strings inserted into the error message -->
	    <element name="errorMessageParameters" type="string" minOccurs="0" maxOccurs="unbounded"/>

	    <!-- 
		 The stacktrace associated with the exception.
		 Note that this will be omitted unless the "server-stacktrace-enabled" property
		 is enabled in the server's 100Custom.xml file.
	    -->     
	    <element name="programmersDetails" type="string"></element>
	    
	    <!-- Prior responses.  Set if a bulk command was used -->
	    <element name="responses" type="dat:BulkCommandResponses" minOccurs="0"></element>
	</sequence>
    </complexType>
</schema>

MIME type: application/x-javascript

Status codes

The method returns one of the following status codes:
CodeDescription
200 OKSuccess completion.
400 Bad RequestThe parameters are not valid or they are missing.
401 UnauthorizedThe caller is not authorized for this request.
404 Not Found
The activity instance does not exist.
406 Not AcceptableThe requested content type or content encoding is not supported.
500 Internal Server ErrorA severe problem has occurred, programmer's details are provided.

Available since

8.5.5

Parent Topic: Activity Instance (Ad Hoc) Resource