REST interface for BPD-related resources - Process Instance Variable Resource - PUT Method

Use this method to update the value of one variable in a business process definition (BPD) instance. Only the system or process application administrator can run this method.

Sample method invocation

PUT /rest/bpm/wle/v1/process/{instanceId}/variable/{name}

Parameters

None

Request content

The variable value in JSON format.

The default content type is application/json.

MIME type: application/json


+ View schema
{  "description": "The variable value in JSON format.",
   "type": "object"
}
+ View example content
{
	"name": "Tester1",
	"address": {
		"street": "aaa",
		"city": "bbb",
		"@metadata": {
			"objectID": "b7acfa93-b2f9-49db-b115-e5f559555ab8",
			"dirty": false,
			"shared": false,
			"rootVersionContextID": "2064.24b617ae-13c5-4cdd-9072-a1622fedb66dT",
			"className": "Address"
		}
	},
	"@metadata": {
		"objectID": "766cfedb-21ae-493b-a5a9-43302a0e040b",
		"dirty": false,
		"shared": false,
		"rootVersionContextID": "2064.24b617ae-13c5-4cdd-9072-a1622fedb66dT",
		"className": "Person"
	}
}

Response content

The execution status of the REST API.

The default content type is application/json.

MIME type: application/json


+ View schema
{
	"description": "The execution status of the REST API",
	"type": "object",
	"properties": {
		"status": "200",
		"data": {
			"type": Object,
			"properties": {
				"message": {
					"type": "string",
					"description": "Indicates that the API has been sucessfully completed."
				}
			}
		}
	}
}
+ View example content
{
   "status": "200",
   "data":    {
      "message": "Successfully updated."
   }
}

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>

            <element name="errorData" type="tns:ErrorData" minOccurs="0" />
	</sequence>
    </complexType>

    <complexType name="ErrorData">
        <sequence>
            <element name="code" type="string" />
            <element name="data" type="string" minOccurs="0" />
        </sequence>
    </complexType>
    
</schema>

MIME type: application/x-javascript

Status codes

The method returns one of the following status codes:
CodeDescription
200 OK
The request was successfully completed.
400 Bad Request
The instanceId or name parameters are missing or not valid, or the body of the request is not a JSON object or does not comply to the schema of the business object.
401 Unauthorized
The caller is not authorized for this request.
404 Not Found
The instanceId does not exist on server.
406 Not AcceptableThe requested content type or content encoding is not supported.
409 Conflict
The status of the business process definition (BPD) instance is not Active, Suspended or Failed. You can use this API only to update variables of an active, suspended, or failed BPD instance.
415 Unsupported Media TypeThe content type or content encoding of the request is not supported.
500 Internal Server Error
A severe problem has occurred.

Available since

8.5.6

Parent Topic: Process Instance Variable Resource