...
The HTTPRestHandler enables the user to send requests to a server and save the returned answer in a process-variable. The status ("success" or "error") of the call is written into the variable SYS.<name of the event>_statusHTTP Rest ActionHandler enables the user to send requests to a server and save the returned answer in a process-variable. The status ("success" or "error") of the call is written into the variable “SYS.<name of the event>_status
".
...
Class
Code Block |
---|
com.dooris.bpm.actionhandler.HttpRestHandler |
Parameter
Parameter name | Default value | Description | Valid examples |
---|---|---|---|
| This parameter contains the URL of the requested server. | ||
|
| This parameter determines which method will be remotely invoked. “Post” means that the server expects an input in XML-Format which he will process and return. “Get” on the other hand means that the Server will send data without requiring an input. |
|
| This parameter contains the file path to a JSON file that contains the input for the server. | ||
| This parameter contains the input for the server in JSON-Format. | ||
| This parameter contains the process variable into which the server response should be saved. | ||
| This parameter is only required if the server requires identification and contains the user name of the user. | ||
| This parameter is only needed if the server requires an identification and contains the user's password. | ||
| This parameter is only needed if the server requires identification and contains the encryption which should be applied. One possible encryption is base64, which will be applied by setting this parameter to “basic”. |
| |
| Required only if authMethod = "oauth" URL from where to retrieve the oauth token from. | ||
| adding additonal Headers to the Rest |
| |
|
| Here, the Json path for a specific part of the returned Json file and a variable name under which the specific part of the Json should be saved, are entered. The variable(s) are then saved in an array named 'result'. For better understanding see examples. |
|
|
| This parameter can be specified as either 0 or 1. It only makes a difference if an exception is thrown. If an exception is thrown, the process is stopped if the parameter is set to 0 and if it is set to 1 the exception message is saved in the responseVariable and the process can continue as usual. |
|
Example:
Eventtype | Node Leave |
---|---|
Actionname | com.dooris.bpm.actionhandler.HttpRestHandler |
Actionclass | com.dooris.bpm.actionhandler.HttpRestHandler |
Parameter | hostName=https://yourcompanyserver.com/rest/list/${customerList}; method=Post; postParameter={ "Company":"${customer_company}", "First Name":"${customer_firstname}", "Last Name":"${customer_lastname}", "Email":"${customer_email}",}; user=John.Doe; pass=specialPW; authMethod=basic; responseVariable=responseVar; faultTolerance=0; |
Example inputs for searchByJsonPath:
JSON Code example for what is returned with get method
...