REST interface for BPEL-related process resources - Process Resource - POST (Send Message) Method

Use this method to send a message to a process instance. This message might cause a new process instance to be created or be directed to an existing instance of a long-running process, identified using WS-BPEL correlation sets defined in the process definition.

Sample method invocation

POST /rest/bpm/bfm/v1/process?action={string}&processTemplateName={string}&portType={string}&operation={string}

Parameters

Required Parameters
NameValue TypeDescription
action string
Action to be performed for the process instance.
ValueDescription
sendMessage
Send a message to a process instance.
processTemplateName string
Process template name for the process instance the message is sent to.
portType string
WSDL port type containing the operation that receives the message. The parameter is a QName specified as "{namespace}localname"
operation string
WSDL operation that receives the message. The parameter is an NCName.

Request Content

Operation input.

The default content-type is application/xml.

MIME Type: application/xml

The XML Schema type/element is defined as part of the custom process definition.

MIME Type: application/json

The JSON Schema can be derived from the XML Schema type/element definition (see [JSON Format]).

Response Content

Process instance details.

The default content-type is application/json.

MIME Type: application/json


Schema
{  "description": "Process", 
   "type": "object",
   "properties":
   {  "adminTaskID": {"type": "string",
         "description": "ID of the associated administration task."
      },
      "completionTime": {"type": "string", "format": "date-time",
         "description": "Completion time of the process instance."
      },
      "creationTime": {"type": "string", "format": "date-time",
         "description": "Creation time of the process instance."
      },
      "customProperties" : {"type": "object", "additionalProperties": {"type": "string"},
         "description": "List of custom property names and values."
      },
      "customText1": {"type": "string",
         "description": "Inline custom property 1."
      },
      "customText2": {"type": "string",
         "description": "Inline custom property 2."
      },
      "customText3": {"type": "string",
         "description": "Inline custom property 3."
      },
      "customText4": {"type": "string",
         "description": "Inline custom property 4."
      },
      "customText5": {"type": "string",
         "description": "Inline custom property 5."
      },
      "customText6": {"type": "string",
         "description": "Inline custom property 6."
      },
      "customText7": {"type": "string",
         "description": "Inline custom property 7."
      },
      "customText8": {"type": "string",
         "description": "Inline custom property 8."
      },
      "description": {"type": "string",
         "description": "Description of the process instance."
      },
      "displayName": {"type": "string",
         "description": "Display name of the associated process template."
      },
      "executionState": {"type": "string", 
         "description": "Execution state of the process instance.",
         "enum":
         [
            "STATE_COMPENSATED",
            "STATE_COMPENSATION_FAILED",
            "STATE_COMPENSATING",
            "STATE_DELETED",
            "STATE_FAILED",
            "STATE_FAILING",
            "STATE_FINISHED",
            "STATE_INDOUBT",
            "STATE_READY",
            "STATE_RUNNING",
            "STATE_SUSPENDED",
            "STATE_TERMINATED",
            "STATE_TERMINATING" 
         ]
      },
      "faultName": {"type": "string", 
         "description": "Name of the fault if the process instance ended with an unhandled fault. The value has the format {namespace}localname."
      },
      "isBusinessRelevant": {"type": "boolean",
         "description": "States whether the process instance is a business relevant or an 'auxiliary' step."
      },
      "isContinueOnError": {"type": "boolean",
         "description": "States whether the process instance stops in case of an unhandled error or not."
      },
      "isMigrated": {"type": "boolean",
         "description": "States whether the process instance has been migrated."
      },
      "lastModificationTime": {"type": "string", "format": "date-time",
         "description": "Last time a property of the process instance changed."
      },
      "lastStateChangeTime": {"type": "string", "format": "date-time",
         "description": "Last time the execution state of the process instance changed."
      },
      "name": {"type": "string",
         "description": "Name of the process instance."
      },
      "parentProcessInstanceName": {"type": "string",
         "description": "Name of the parent process instance."
      },
      "parentProcessInstanceID": {"type": "string",
         "description": "ID of the parent process instance."
      },
      "piid": {"type": "string",
         "description": "ID of the process instance."
      },
      "processTemplateID": {"type": "string",
         "description": "ID of the process template this instance is derived from."
      },
      "processTemplateName": {"type": "string",
         "description": "Name of the process template this instance is derived from."
      },
      "resumptionTime": {"type": "string", "format": "date-time",
         "description": "Resumption time of the process instance if the process instance is suspended and is to be resumed automatically."
      },
      "startTime": {"type": "string", "format": "date-time",
         "description": "Start time of the process instance."
      },
      "starter": {"type": "string",
         "description": "Starter of the process instance."
      },
      "topLevelProcessInstanceID": {"type": "string",
         "description": "ID of the topmost process instance in a hierarchy of processes."
      },
      "topLevelProcessInstanceName": {"type": "string",
         "description": "Name of the topmost process instance in a hierarchy of processes."
      }
   }
}

Error Response Content

Detailed error information.

The default content-type is application/json.

MIME Type: application/json


Schema
{  "description": "Error Response", 
   "type": "object",
   "properties":
   {  "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."
      }
   }
} 

Status codes

The method returns one of the following status codes:
CodeDescription
200 OK
The message has been delivered to the process instance described by the returned process instance detail information.
400 Bad RequestThe parameters are not valid or they are missing.
401 UnauthorizedThe caller is not authorized for this request.
404 Not Found
The process template does not exist.
406 Not AcceptableThe requested content type or content encoding is not supported.
409 Conflict
The specified process template might be in a stopped state, or a process instance with the same correlation set already exists such that a new instance cannot be created.
415 Unsupported Media TypeThe content type or content encoding of the request is not supported.
500 Internal Server ErrorA severe problem has occurred. Programmer's details are provided.

Change history

The following changes have been applied to this method:
ReleaseDescription
7.0
The returned process instance entry contains a new property:
  • "isMigrated"
7.5.1
The returned process instance object contains new properties:
  • "customText1" ... "customText8"

Available since

6.2

Parent topic: Process Resource