Real-Time Process Execution

Last published at: August 8th, 2023

Typically, when a process instance is created and executed, its processed in the background by the process engine.  When that process instance may get executed is based on several factors, priority, when to execute, and how busy the process engine is.

FlowWright's process engine can be used to execute a process instance in real-time (completely in memory) and get a result back - similar to how a FlowWright Microservice works.  

There are many uses cases where you might want to perform real-time execution of a process, for example, the process might take some inputs and make some decisions and computations in real-time and return the output as the result.

Here's the example API code to perform real-time process execution using the FlowWright API:

//API entry point, using a user session
FWProcessDesign oDesign = new FWProcessDesign(oUserSession);

//get a process definition from database
FWProcessDefinition oDef = oDesign.GetDefinitionUsingName("ComputeNums10");

//get the process model 
FWProcessModel oModel = oDef.GetProcessModel(true);

//create a real-time execution object 
FWProcessRealTime oRT = new FWProcessRealTime(oUserSession);

//have the real-time execution object execute the process in real-time 
FWExecutionResult oResult = oRT.ExecuteInRealTime(oProcModel);