Using the FWProcessRuntime API

Last published at: June 21st, 2023

The FWProcessRuntime API manages all runtime operations such as managing process instances.

Creating the FWProcessRuntime Object

FWProcessRuntime oRuntime = new FWProcessRuntime(“connection string”, “external user name”);

Creates the FWProcessRuntime object 


Get a Workflow Instance

FWProcessInstance oInst = oRuntime.GetInstance(“id of the instance”); 

FWProcessInstance oInst = oRuntime.GetInstanceUsingName(“name of the instance”);

Gets the Workflow Instance object using the id or the name 


Abort a Workflow Instance

Bool bFlag = oRuntime.AbortInstance(“id of the instance”);

Aborts the selected Workflow Instance 


Complete a selected task

Bool bFlag = oRuntime.CompleteTask(“id of the task”, “task return value”, “task comment”);

Completes a given task programmatically 


Extend a selected task

Bool bFlag = oRuntime.ExtendTask(“id of the task”, “number of days to extend by”); Insert your text here

Extends the expiration of a task by a given number of days 


Get a list of Process Instances

Dictionary oList = oRuntime.GetInstances(“created by user id”)

Dictionary oList = oRuntime.GetInstances(“”, “tenant ID”)

Hashtable oList = oRuntime.GetInstances(“execution status”);

Gets all Workflow Instances created by a certain user

Gets all Workflow Instances for a given tenant

Gets all instances based on a selected execution status 


Get the status of the license file

licenseStatus oStatus = oRuntime.GetLicenseStatus(ref “error message string”, ref “license properties”);

Gets the status of the license and the licensing information 


Get all open tasks for Users

Datatable oTasks = oRuntime.GetOpenTasks(); 

Datatable oTasks = oRuntime.GetOpenTasks(“string user id”);

Gets all open tasks for the current user 

Gets all open tasks for a selected user 


Get a selected task

Datatable oTask = oRuntime.GetTask(“task id”);

Gets a selected task using a task ID 


Get task choices Info

List oList = oRuntime.GetTaskChoices(“task ID”);

Gets a list of task choices for a selected task 


Reassign all tasks

Bool bFlag = oRuntime.ReAssignAllTasks(“old user id”, “new user id”);

Reassigns all tasks from one user to another 


Reassign tasks

Bool bFlag = oRuntime.ReAssignTask(“id of the task”, “new user ID to reassign”);

Reassigns a selected task to another user 


Remove a Workflow Instance

Bool bFlag = oRuntime.RemoveInstance(“id of the instance”);

Removes a selected Workflow Instance 


Run the engine manually


Tells the engine to process the next item on the workflow queue