Using the deWorkflowDefinition API

Last published at: May 2nd, 2023

deDefiniton API lets you manage all operations on a Workflow definition.  A Workflow Definition object is retrieved using the deDesign object.

Get Workflow Definition properties

Hashtable oProps = oDef.getProperties();

 Returns all properties, all fields of the definition object.


Get a specific Workflow Definition properties

IHashtable oProps = oDef.getProperties(“defID”, “defName”);

Returns only the specified properties for the definition object.


Copy a Workflow Definition

deWorkflowDefinition oDef2 = oDef.copyDefinition(“name of the new definition”);

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

Create a copy of the selected definition.


Create a new Workflow Instance from a Workflow Definition

deWorkflowInstance oInst = oDef.createInstance(“instance name”);

deWorkflowInstance oInst = oDef.createInstance(“instance name”, “instance ID”);

Create a new Workflow Instance object based on a selected Workflow 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 Workflow Definition.


Create Snapshot

deSnapShot oSnapShot = oDef.createSnapshot(“snapshot name”);

Creates a snapshot object from the selected Workflow Definition


Get a Snapshot

deSnapShot oSnapShot = oDef.getSnapShot(“snapshot id”);

Gets a specific snapshot using the snapshot ID


Get a list of snapshots for the definition

Dictionary<string, deSnapshot> 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();

Retuns a hastable of all variables for the Workflow Definition.


Get the UI model object for the Workflow Definition

clsUIModel oModel = oDef.getUIModel();

Returns the UI model object for navigating the design of the Workflow Definition.


Remove all instances for a given Workflow Definition

Bool bFlag = oDef.removeAllInstances();

Removes all instances for the selected definition


Remove all snapshots for the given Workflow Definition

Bool bFlag = oDef.removeAllSnapshots();

Removes all snapshots for the selected definition


Update the XML for the Workflow 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