Process Designer
External Call

Forming Requests for External System Calls

To invoke external systems (REST, RPC, SOAP), you need to add a Service Task cube. After that, configure it for the required service type. On the "General" tab, in the "Implementation" field, select "Connector" from the dropdown menu. Then, configure it for the desired integration type on the "Connector" tab.

empty

You can download an example diagram with all the listed integrations from the link below.

Download Diagram Example

Configuration Parameters for Connectors

REST

REST Diasoft Archetype Call

empty

To configure the REST connector on the "Connector" tab, you need to specify the following:

  1. Connector identifier - rest connector
  2. Input parameters:
    • service - the name of the called service;
    • resource - the link to call the service method;
    • method - API method (POST, GET, PUT, DELETE);
    • payload - the request body in JSON format.
  3. Output parameters (depending on what needs to be obtained/processed):
    • getting a message parameter.
      Example: "variable name" - ${response.get("content").get(0).get("clientCode")}
    • getting the message body (the message body will be automatically parsed, and body parameters will be placed in the process context).
      Example: "variable name" - ${response}
    • response code.
      Example: "variable name" - ${statusCode}

For most input and output parameters, "Variable Type" = "String or Expression" is used. To obtain a specific parameter from the message body or manually create an input parameter, fill in the fields as follows:

  1. Variable type - script;
  2. Script format - Groovy;
  3. Script example:
$(response).get("message").stringValue()

REST not Diasoft Archetype

empty

To configure an external REST on the "Connector" tab, specify the following:

  1. Connector identifier - http connector
  2. Input parameters:
    • url - the link to the called source;
    • method - API method (POST, GET, PUT, DELETE);
    • payload - the request body in JSON format.
  3. Output parameters (depending on what needs to be obtained/processed):
🚫

The message body is not automatically parsed; this parameter will have a string type.

  • getting the message body, string type.
    Example: "variable name" - ${response}
  • getting the message body, Groovy Script type.
    Example: "variable name" - connector.getVariable("response")
  • response code, string type.
    Example: "variable name" - ${statusCode}

JSON RPC

empty

It is formed similarly to external REST (not Diasoft Archetype).

  1. Connector identifier - http connector
  2. Input parameters:
    • url - the link to the called source;
    • method - API method (POST, GET, PUT, DELETE);
    • payload - the request body according to the JSON-RPC specification. Example (variable type: string or expression):
    {
        "jsonrpc": "2.0",
        "method": "my-method",
        "params": [
            42,
            23
        ],
        "id": 100
    }
  3. Output parameters (depending on what needs to be obtained/processed):
🚫

The message body is not automatically parsed; this parameter will have a string type.

  • getting the message body, string type.
    Example: "variable name" - "#{response}"
  • getting the message body, Groovy Script type.
    Example: "variable name" - "connector.getVariable("response")"
  • response code.
    Example: "variable name" - "#{statusCode}"

XML RPC

empty

It is formed similarly to external JSON RPC.

  1. Connector identifier - http connector
  2. Input parameters:
    • url - the link to the called source;
    • method - API method (POST, GET, PUT, DELETE);
    • payload - the request body according to the XML-RPC specification. Example (variable type: string or expression):
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <methodCall>
        <methodName>my.xml.method</methodName>
        <params>
            <param>
                <value><int>17</int></value>
            </param>	 
            <param>
                <value><int>13</int></value>
            </param>
        </params>
    </methodCall>
  3. Output parameters (depending on what needs to be obtained/processed):
    • getting the message parameter. Example (Groovy Script format):
    import static org.camunda.spin.Spin.*; 
     
    XML(response).xPath("/methodResponse/params/*[1]/message/string").string();

SOAP

empty

It is formed similarly to XML RPC.

  1. Connector identifier - http connector
  2. Input parameters:
    • url - the link to the called source;
    • method - API method (POST, GET, PUT, DELETE);
    • payload - the request body according to the XML-RPC specification. Example (variable type: string or expression):
    <?xml version = "1.0"?>
    <SOAP-ENV:Envelope
        xmlns:SOAP-ENV = "http://www.w3.org/2001/12/soap-envelope"
        SOAP-ENV:encodingStyle = "http://www.w3.org/2001/12/soap-encoding">
        <SOAP-ENV:Body xmlns:m = "http://www.xyz.org/messages">
            <m:GetMessage>
                <m:MessageName>asdfasdfasdf</m:MessageName>
            </m:GetMessage>
        </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
  3. Output parameters (depending on what needs to be obtained/processed):
    • getting the message parameter. Example (Groovy Script format):
    S(response)
        .childElement("Body")
        .childElement("http://www.xyz.org/message", "MessageResponse")
        .childElement("Message")
        .textContent()