IBM Business Process Manager, Version 8.5.5

REST interface for BPD-related resources - Show Process Instance Ad Hoc Activities Resource - GET Method

Use this method to retrieve a list of ad hoc activities that are available to the current user for the specified process instance.

Sample method invocation

GET /rest/bpm/wle/v1/process/{instanceId}/adHocActivities

Parameters

None

Request content

None

Response content

A list of actions available to the current user for the given process (Activity complexType).

The default content type is application/json.

MIME type: application/json

+ View example content
{
   "status": "200",
   "data": {"activities": [{
         "id": "2118.7cd26750-613a-4c0e-9f8b-7826e5b53233",
         "name": "AdHocActivity 1",
         "executionState": "WORKING",
         "activityType": "USER_TASK",
         "executionType": "AUTOMATIC",
         "optionType": "REQUIRED",
         "required": true,
         "repeatable": false,
         "startTime": "2014-02-03T15:37:47Z",
         "endTime": null,
         "hidden": false
      },{
         "id": "2118.1ce314cf-2b5d-4291-a073-fb87f7d8ddf0",
         "name": "AdHocActivity 2",
         "executionState": "READY",
         "activityType": "USER_TASK",
         "executionType": "MANUAL",
         "optionType": "OPTIONAL",
         "required": false,
         "repeatable": false,
         "startTime": null,
         "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:prc="http://rest.bpm.ibm.com/v1/data/process" xsi:type="prc:adHocActivities">
        <activities>
            <id>2118.367fc27d-6bd1-4749-ab07-16703c72e641</id>
            <name>AdHocActivity 1</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>
        </activities>
        <activities>
            <id>2118.5918b95b-6d8a-45f8-b663-baa27fe42910</id>
            <name>AdHocActivity 2</name>
            <executionState>READY</executionState>
            <activityType>USER_TASK</activityType>
            <executionType>MANUAL</executionType>
            <optionType>OPTIONAL</optionType>
            <required>false</required>
            <repeatable>false</repeatable>
            <startTime xsi:nil="true"/>
            <endTime xsi:nil="true"/>
            <hidden>false</hidden>
        </activities>
        <activities>
            <id>2118.311ab412-5cbd-4d9f-817d-9e2c45200cfb</id>
            <name>Repeatable Activity1</name>
            <executionState>WORKING</executionState>
            <activityType>USER_TASK</activityType>
            <executionType>AUTOMATIC</executionType>
            <optionType>REQUIRED</optionType>
            <required>true</required>
            <repeatable>true</repeatable>
            <startTime>2014-02-05T11:56:08Z</startTime>
            <endTime xsi:nil="true"/>
            <hidden>false</hidden>
        </activities>
    </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 OK
Successful completion - requested data returned. Note that the list may be empty.
400 Bad RequestThe parameters are not valid or they are missing.
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: Show Process Instance Ad Hoc Activities Resource