Last published at: May 14th, 2024

Microservices are becoming very popular these days, build a process definition, and turn it into a Microservice, its that simple.  It’s a very powerful concept, but very easy to implement using FlowWright. The following UI lets you manage Microservices: 

Microservices can be defined, updated, removed & copied using the above UI.  So how do you build a Microservice? Let’s build a Microservice that takes 2 numbers and returns the sum of the 2 numbers.

Build a workflow definition called “addTwoNumbers”, define 2 variables as shown below:

Drag an “evaluateexpression” step to the process designer and connect to the “Start” step:

Configure the “evaluateexpression” step with the following values: 

Once configured, save the process definition and navigate to the Microservices UI to create a new Microservice: 

Provide a name for the Microservice, select a workflow definition, map inputs, and outputs to workflow variables:

Once the Microservice is created, select “API -> Build” menu item:

Once the REST API is built, select the “API -> View API” to render the Microservice REST API:

Let’s select the Microservice and execute the Microservice, provide values for the 2 inputs:

The user now can view the ‘Build log’ directly, Statistics (By User and By Microservice) under the API menu.  User can also ‘View Call Logs’ under the API menu.

Click on API menu and observe ‘Build log’, ‘Statistics’ and ‘View Call Logs’:

All date/times are stored within the database as UTC and displayed based on local timezone of the user. 

Note: Engine runtime data are in ISO + UTC format.