/rest/bpm/wle/v1/process/{instanceId}/relationship?type={string}&targetId={string}[&description={string}]
Name | Value Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
type | string | The type of relationship to create.
|
||||||
targetId | string | The process instance identifier of the instance to which a relationship is added.
|
Name | Value Type | Description |
---|---|---|
description | string | A string that describes the relationship.
|
None
The default content type is application/json.
{ "description":"RelationshipDetails", "type":"object", "properties":{ "id":{ "type":"string", "description":"The Relationship identifier." }, "sourceId":{ "type":"string", "description":"The externalized form of the instance ID of the source, consisting of a type identifier and the instance ID." }, "targetId":{ "type":"string", "description":"The externalized form of the instance ID of the target, consisting of a type identifier and the instance ID." }, "type":{ "type":"string", "description":"The type of the relationship.", "enum":[ "INDEPENDENT", "DEPENDENT" ] }, "creator":{ "type":"object", "description":"The user who created the relationship.", "properties":{ "userID":{ "type":"integer", "description":"The user ID of the user that is described by this object." }, "userName":{ "type":"string", "description":"The user name of the user that is described by this object." }, "fullName":{ "type":"string", "description":"The full name of the user that is described by this object." }, "isDisabled":{ "type":"boolean", "description":"States whether this user is disabled. This field is set to false and cannot be changed." }, "primaryGroup":{ "type":"string", "description":"The primary group associated with this user." }, "emailAddress":{ "type":"string", "description":"The email address associated with this user." }, "userPreferences":[ { "key":{ "type":"string", "description":"The key associated with the user preference." }, "value":{ "type":"string", "description":"They value associated with the user preference." } } ], "memberships":{ "type":"[string]", "description":"List of groups in which the user is a member." } } }, "creationDate":{ "type":"string", "format":"date-time", "description":"The date when the relationship was created." }, "lastModified":{ "type":"string", "format":"date-time", "description":"The date when the relationship was last modified." }, "description":{ "type":"string", "description":"The description of the relationship." } } }
{ "status": "201", "data": { "id": "2124.1a561d39-12aa-4df0-826c-e9a27f5de55f", "sourceId": "2072.3", "targetId": "2072.5", "type": "INDEPENDENT", "creator": { "userID": 1, "userName": "celladmin", "fullName": "celladmin", "isDisabled": false, "primaryGroup": null, "emailAddress": null, "userPreferences": {}, "tasksCollaboration": null, "memberships": null }, "creationDate": "2014-10-30T21:19:35Z", "lastModified": "2014-10-30T21:19:35Z", "description": "Some other description here" } }
<?xml version="1.0" encoding="UTF-8"?> <schema targetNamespace="http://rest.bpm.ibm.com/v1/data/relationship" elementFormDefault="unqualified" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://rest.bpm.ibm.com/v1/data/relationship" xmlns:pref="http://rest.bpm.ibm.com/v1/data/root" xmlns:userg="http://rest.bpm.ibm.com/v1/data/usergroup"> <import schemaLocation="BPMRestData.xsd" namespace="http://rest.bpm.ibm.com/v1/data/root"/> <import schemaLocation="UserGroup.xsd" namespace="http://rest.bpm.ibm.com/v1/data/usergroup"/> <simpleType name="RelationshipType"> <restriction base="NCName"> <enumeration value="INDEPENDENT"/> <enumeration value="DEPENDENT"/> </restriction> </simpleType> <!-- This type represents a single relationship. --> <complexType name="RelationshipDetails"> <annotation> <documentation>Describes a relationship between two instances.</documentation> </annotation> <complexContent> <extension base="pref:Data"> <sequence> <!-- The ID of the relationship --> <element name="id" type="string"/> <!-- The externalized form of the instance ID of the source --> <element name="sourceId" type="string"/> <!-- The externalized form of the instance ID of the target --> <element name="targetId" type="string"/> <!-- The type of the relationship. Valid values are: "INDEPENDENT" "DEPENDENT" --> <element name="type" type="tns:RelationshipType"/> <!-- The user who created the relationship --> <element name="creator" type="userg:User"></element> <!-- The date when the relationship was created --> <element name="creationDate" type="dateTime"/> <!-- The date when the relationship was last modified --> <element name="lastModified" type="dateTime"/> <!-- The description of the relationship --> <element name="description" type="string"/> </sequence> </extension> </complexContent> </complexType> <!-- This type is used to return a list of relationship details. --> <complexType name="RelationshipDetailsList"> <complexContent> <extension base="pref:Data"> <sequence> <!-- This is a list of zero or more relationship details. --> <element name="relationship" type="tns:RelationshipDetails" minOccurs="0" maxOccurs="unbounded" /> </sequence> </extension> </complexContent> </complexType> </schema>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <bpm:ResponseData xmlns:bpm='http://rest.bpm.ibm.com/v1/data'> <status>201</status> <data xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='rel:RelationshipDetails' xmlns:rel='http://rest.bpm.ibm.com/v1/data/relationship'> <id>2124.4fb626e4-f558-433d-a263-e86b56c9c9d9</id> <sourceId>2072.3</sourceId> <targetId>2072.4</targetId> <type>INDEPENDENT</type> <creator> <userID>1</userID> <userName>celladmin</userName> <fullName>celladmin</fullName> <isDisabled>false</isDisabled> <userPreferences/> </creator> <creationDate>2014-10-30T21:15:35Z</creationDate> <lastModified>2014-10-30T21:15:35Z</lastModified> <description>Some description here</description> </data> </bpm:ResponseData>
The default content type is application/json.
{ "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." } } }
<?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>
Code | Description |
---|---|
201 Created | Successful completion, new relationship created.
|
400 Bad Request | Bad Request
|
401 Unauthorized | The caller is not authorized for this request.
|
403 Forbidden | The caller is not authorized to perform this operation.
|
406 Not Acceptable | The requested content type or content encoding is not supported. |
500 Internal Server Error | Internal Server Error. See the details provided.
|
8.5.6.0
Parent Topic: Process Instance Relationship Resource