Executing workflows in real-time using the FlowWright engine

Learn about FlowWright Microservice feature

Last published at: April 19th, 2024

The FlowWright low-level API and engine API were built so that workflows could be executed in real-time with high performance.  Although this API has existed in previous versions, FlowWright v9.6 introduced Microservices, making it possible to call a workflow definition via FlowWright's REST API.  Under the hood of the Microservice, the low-level API is used to execute workflows in real-time, or memory. 

The following video shows how a workflow is designed to add 2 numbers, and how the definition is then used within a Microservice.

See how our team takes the same workflow definition and then executes it in real-time using the low-level API.

The video below highlights code from the above example:

string connStr = ConfigurationManager.ConnectionStrings["connectString"].ConnectionString;
deDesign oDesign = new deDesign(connStr, "admin");
deWorkflowDefinition oDef = oDesign.getDefinitionUsingName("AddTwoNumbersForm");
clsUIModel oModel = oDef.getUIModel();
clsEngine oEngine = new clsEngine(oModel, "", oDesign.oErrorProvider);
oEngine.executionMode = executionMode.realtimeMode;
Hashtable oVars = new Hashtable();
oVars["num1"] = 56;
oVars["num2"] = 45;
bool bStatus = oEngine.processFromStart(oVars, null);
executionStatus oStatus = oEngine.status;
oModel = oEngine.getUIModel();
clsVariable oVar = oModel.getMasterVariable("sum");
string varValue = oVar.varValue
As you can see from the videos above, it's simple for users to execute a workflow using the engine in real-time mode.  We hope this example suggests other use cases that lend themselves to using the powerful FlowWright engine. All dates/times are stored within the database as UTC and displayed based on the local timezone of the user. 

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