Whats New in 20D : Perform web service calls within an interview and more

Amongst the new features that made it into the last of the releases for 2020 (and what a year it has been) was a concept that was teased in the Product Strategy meeting in November : Web Service (REST) calls in the interview. For example, you have data that has been captured in the Interview and you want to send it for some processing to an external service. One area that is immediately interesting is, for example, asking a citizen to upload a document and then using an external service to verify its contents. A simpler but still very interesting example would be the verification of an ID number or company registration number using the government-provided online checking services. There are a myriad of other use cases. Essentially this 20D New Feature cleans up some of the messy JavaScript code we used to have to do, by managing it and making it more secure.

This 20D New Feature of JavaScript extensions therefore allows the developer to perform these tasks without having to resort to some of the current workarounds. One side-effect of the technique being used is that the outcome will not show in Internet Explorer 11 nor will it work in the Mobile App.

Anyway, the best part of the process is that the storage of the connection details happens in the Hub – so it is much easier to manage access to it. Here is an example showing the Hub, and the new (secure!) options that include custom root certificate (which you would need to have in the Hub certificate list, or client certificate. We can also use Basic Authentication.

20D New Feature - Connection Example

Notice the Health Check URL above, which is not required but is used to provide a ping address if your service supports it. If it does not, you will see this warning everywhere:

Another side effect of this 20D New Feature, with it’s Hub-managed world is that you will need to Deploy the Interview to be able to test it properly. Once the Connection is set up, the extension code can call the external service, using the new fetch() method on the interview object. After that, it’s up to the developer to decide what to do with it.

For example, here is some code to call a Covid 19 database using this 20D New Feature:

20D New Feature - Code Example

Note in the example above, the Connection on the Hub is referenced in the options object which also contains other information about how to call your Service, including relativeUri which is useful to append to the root Uri of the Connection. Be aware that should you make mistakes in this, they will appear in the Hub Message Log:

Finally, if you have deployed the Interview, you can expect to see the results in the browser instance :

The code is tidier, the management of the connection is better, in fact this is an all-round improvement from the hackathon techniques used previously. Good Job team!

Also in this release 20D:

The Deployment REST API includes the ability to retrieve object mapping data from the deployment.

Deployment statistics – charts now show the combined data for all versions of the deployment by default, instead of only showing the data for the active version. This improves the default experience – see view deployment-specific statistics

Finally through a new configuration parameter db_message_log_filter (on premise) or a new SR to request a change (cloud) you can get rid of all those validation warnings (OPA-VAL-001) from the Message Log that are caused by minor irritations such as missing field data in a Connector exchange. You can find out more here.

Richard Napier

Author: Richard Napier

After 8 years in case management and ERP software roles, Richard Napier joined Siebel Systems in 1999 and took up the role of managing the nascent Siebel University in Southern Europe. He subsequently was Director of Business Development and Education for InFact Group (now part of Business & Decisions) for 8 years. He now runs Intelligent Advisor IT Consulting OÜ. Owner of intelligent-advisor.com, he also is Co-Founder of the Siebel Hub.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Intelligent Advisor IT Consulting Serving Customers Worldwide
Hide picture