EnterWorks - ETT 108 - How to execute SQL queries in custom widgets and using the REST API

EnterWorks - ETT 108 - How to execute SQL queries in custom widgets and using the REST API

Business Rules, Widget

rate limit

Code not recognized.

About this course

EnterWorks provides the ability to define custom widgets that allow implementation-specific HTML pages to be defined to display desired information.  These HTML pages can access the EnterWorks REST API in Javascript using AJAX calls, but they cannot execute SQL against the EPIM and EPX databases.  The REST API also does not provide a mechanism to execute SQL against the EPIM and EPX databases.  Both limitations can be overcome by implementing a micro-service that receives and processes REST calls for executing SQL queries.  This session shows how that can be accomplished through additions to the EnterWorks Services Micro-Service (ESMS), which was created for Brown Bag Session 020 - Creating a Java MicroService.  This new functionality uses a SQL_Registry repository to define the SQL to be executed (so it can be secured) and the REST call from the widget HTML or REST application can specify which query to execute (and pass in parameters) and receive the results in JSON Format.  The example includes a custom widget that presents the query results in tabular form.

The example micro-service used for this session has been modified significantly as it is used for other related Tech Talks.  Please download and deploy the set of files bundled with ETT 125 – How to Create a Simplified REST API Layer Using a Micro-Service to utilize the functionality covered in this Tech Talk.

Prerequisites - ETT 020

About this course

EnterWorks provides the ability to define custom widgets that allow implementation-specific HTML pages to be defined to display desired information.  These HTML pages can access the EnterWorks REST API in Javascript using AJAX calls, but they cannot execute SQL against the EPIM and EPX databases.  The REST API also does not provide a mechanism to execute SQL against the EPIM and EPX databases.  Both limitations can be overcome by implementing a micro-service that receives and processes REST calls for executing SQL queries.  This session shows how that can be accomplished through additions to the EnterWorks Services Micro-Service (ESMS), which was created for Brown Bag Session 020 - Creating a Java MicroService.  This new functionality uses a SQL_Registry repository to define the SQL to be executed (so it can be secured) and the REST call from the widget HTML or REST application can specify which query to execute (and pass in parameters) and receive the results in JSON Format.  The example includes a custom widget that presents the query results in tabular form.

The example micro-service used for this session has been modified significantly as it is used for other related Tech Talks.  Please download and deploy the set of files bundled with ETT 125 – How to Create a Simplified REST API Layer Using a Micro-Service to utilize the functionality covered in this Tech Talk.

Prerequisites - ETT 020