Using the FWProcessDefinition API

Learn about the FWProcessDefinition API

Last published at: July 30th, 2024

FWProcessDefiniton API lets you manage all operations using a process definition.  A Process definition object is retrieved using the FWProcessDesign object.

 

Get Proces Definition properties

Hashtable oProps = oDef.GetProperties();

Returns all properties and all fields of the definition object.

 

Get specific Process Definition properties

Hashtable oProps = oDef.GetProperties(“defID”, “defName”);

Returns only the specified properties for the definition object.

 

Copy a Proces Definition

FWProcessDefinition oDef2 = oDef.CopyDefinition(“name of the new definition”);

FWProcessDefinition oDef2 = oDef.CopyDefinition(“name of the new definition”, “id of the new definition”);

Create a copy of the selected definition.

 

Create a new Proces Instance from a Proces Definition

FWProcessInstance oInst = oDef.CreateInstance(“instance name”);

FWProcessInstance oInst = oDef.CreateInstance(“instance name”, “instance ID”);

Create a new Proces Instance object based on a selected Proces Definition.

 

Generate a graphical representation of the definition

bool bFlag = oDef.GenerateModelGraphic(“image output file path”, “images file path”);

Generates a PNG file of the Proces Definition.

 

Create Snapshot

FWProcessDefinitionSnapshot oSnapShot = oDef.CreateSnapshot(“snapshot name”);

Creates a snapshot object from the selected Process Definition

 

Get a Snapshot

FWProcessDefinitionSnapshot oSnapShot = oDef.GetSnapShot(“snapshot id”);

Gets a specific snapshot using the snapshot ID

 

Get a list of snapshots for the definition

Dictionary<string, FWProcessDefinitionSnapshot > oList = oDef.GetSnapshots();

Gets a list of snapshots for the current definition using a Dictionary object.

 

Get a list of start variables for the definition

Hashtable oVars = oDef.GetStartVariables();

Returns a hash table of all variables for the Process Definition.

 

Get the UI model object for the Process Definition

FWProcessModel oModel = oDef.GetProcessModel();

Returns the UI model object to navigate the design of the Process Definition.

 

Remove all instances for a given Process Definition

Bool bFlag = oDef.RemoveAllInstances();

Removes all instances for the selected definition

 

Remove all snapshots for the given Process Definition

Bool bFlag = oDef.RemoveAllSnapshots();

Removes all snapshots for the selected definition

 

Update the XML for the Process Definition

Bool bFlag = oDef.UpdateDefinition(“xml definition”);

Updates the Definition object using the given XML string

 

Update definition properties

Hashtable oInParms = new Hashtable();

oInParms[“defName”] = “new definition name”;

bool bFlag = oDef.UpdateProperties(oInParms);

Updates the properties of the Definition object using the hashtable of fields and values