<img height="1" width="1" style="display:none;" alt="" src="https://dc.ads.linkedin.com/collect/?pid=287945&amp;fmt=gif">

Executing workflows in real-time using the FlowWright engine

Posted by Dileepa WIjayanayake on Nov 22, 2019 11:55:00 AM

The FlowWright low level API and engine API was built so that workflows can 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 in 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. Have questions? Let's Talk! 

New Call-to-action

Topics: workflow engine, workflow validation