Using call template processes for custom processing of calls and responses

If you already have experience with using M7899, M10074 or M10075 you know how to successfully execute a call within Novulo.
Otherwise, check out at least this post Which components for calling REST endpoints in application

It is possible to execute a custom process before/after building/processing a call. This is handy if you want to do any of the following:

  • Modify the call dynamically before sending it, in a way that is not yet possible with the current call templates.
  • Depending on the response, execute a custom process for storing/processing the response.

Building a custom process

If you want to modify the call before sending it, make sure that your custom process has a N_Call record as parameter. If you then choose the trigger moment “Before building call” or “After building call” you can set it with a simple “this” expression.

If you want to execute a process based on the response with the trigger moment “Before processing” or “After processing”, make sure to add a parameter to your process for a N_Response record. When defining your call template process parameter, you can pass the current response to your process with a simple “this” expression

Adding a call template process

Make sure that the latest CTP version of “M10388 - Novulo Call template processes” is part of your application.

  1. Go to all settings > Process action definitions.
  2. Add a new process action definition for your custom process, like so:
    image
    (1) Choose a proper description for your custom process
    (2) Link your custom process
    (3) Click this button to ensure that the parameters of your process are loaded
    (4) Double check that the parameters are there, as you defined them in your component.
  3. Open your call template
  4. Navigate to the grid “Call template processes”
  5. Add a new call template process:

(1) Choose the trigger moment.

  • “Before building call” if you want to execute a process before the URL, body, header etc. of the call have been determined
  • “After building call” if you want to modify the call in any way. You can overwrite/extend its URL or the body for example.
  • “Before processing” the default processing includes importing the response body with a sequential import. You can execute a process before this happens, like ensuring that a specific record exists, for example.
  • “After processing” When the importing has been executed, you could then start a process for translating the imported records into actions, like changing a status somewhere.

(2) Chose the process action definition that we defined in the previous step
(3) Change “true” to a custom expression if there are situations when you want to skip the execution of a call template process. For example, if the status code of a response was higher than 400 you might not want to execute a process for processing the response.l

  1. Open the call template process parameters, and define their values with an expression. The context of the expression changes with the trigger moment.
2 Likes

Just implemented the call template processes as part of a link I am setting up with another system and it works like a charm!

Thanks @j.batzke, great explanation!

1 Like