Related Topics
WorkflowStep Class
The Workflow object is the legacy process model used in early versions of Process Director. BP Logix recommends the use of the Process Timeline object, and not the Workflow object. The Workflow object remains in the product for backwards compatibility, but doesn't receive any new functionality updates, other than required bug fixes. No new features have been added to this object since Process Director v4.5. All new process-based functionality is solely added to the Process Timeline.
This object represents a Workflow Step.
This object is derived from the ProcessTask class. All properties and methods from the ProcessTask are supported for this object, plus the properties below.
When developing Form scripts (in the various callback methods such as BP_Event) or Workflow scripts, you are automatically given an instance of the “current” Workflow with the CurrentWorkflowStep variable.
Properties
PROPERTY NAME | DATA TYPE | DESCRIPTION |
---|---|---|
WFID | String | The ID of the Workflow definition |
STID | String | The ID of the Workflow Step |
StepName | String | The name of this step |
WFINSTID | String | The ID of the Workflow instance |
STINSTID | String | The ID of the Workflow Step instance |
WfInst | WorkflowInstance Object | The Workflow instance object that contains this step |
Message | String | The optional message if this step is complete |
Error | Boolean | Is the Workflow Step in an error state? |
Methods


This API will get a Workflow Step object from the specified Name.
Parameters
BP: The bp environment.
Workflow: The Workflow object.
StepName: The name of the step to get.
Returns
WorkflowStep: Will return null if Workflow Step isn't found.
Example
var var oWorkflow = Workflow.GetWorkflowByWFID(bp, "WFID");
var oWorkflowStep = WorkflowStep.GetWorkflowStepByName(bp,
oMyWorkflow, "StepName");


This API will get a Workflow Step definition object from the specified ID.
Parameters
BP: The bp environment.
STID: The ID of the Workflow Step to retrieve.
Returns
WorkflowStep: Will return null if Workflow Step isn't found.
Example
// Normally not used directly
var oWorkflowStepDef = WorkflowStep.GetWorkflowStepBySTID(bp, "STID");


This API will get a Workflow Step instance object from the specified ID.
Parameters
BP: The bp environment.
STINSTID: The ID of the Workflow Step instance to retrieve.
Returns
WorkflowStep: Will return null if Workflow Step isn't found.
Example
// Normally not used directly
var oWorkflowStepInst = WorkflowStep.GetWorkflowStepBySTINSTID(bp, "STINSTID");


This API will set the Workflow’s running step from the current (this) step to a different step. This is an overloaded method with the following possible declarations:
public bool JumpToStep(string pStepName)
public bool JumpToStep(string pStepName, string pAdminUID)
public bool JumpToStep(string pStepName, string pAdminUID, string pAdminComment)
Parameters
StepName: The name of the step to which to jump (the destination step).
AdminUID: Optional UID of the user which caused the step jump.
AdminComment: Optional remark on the reason for the jump.
Returns
Boolean: True if the operation succeeds.
Example
// Jump from the current step to the “Approve Request” step
CurrentWorkflowStep.JumpToStep("StepName");


This API will set the Workflow’s running step from the current (this) step to a different step. This is an overloaded method with the following possible declarations:
public bool JumpToStepID(string pSTID)
public bool JumpToStepID(string pSTID, string pAdminUID)
public bool JumpToStepID(string pSTID, string pAdminUID, string pAdminComment)
Parameters
pSTID: The ID of the step to which to jump (the destination step)
pAdminUID: Optional UID of the user which caused the step jump
pAdminComment: Optional remark on the reason for the jump
Returns
Boolean: True if the operation succeeds.
Example
// Jump from the current step a named step
var wfStep = WorkflowStep.GetWorkflowStepByName(bp,
CurrentWorkflow, "StepName");
CurrentWorkflowStep.JumpToStep(wfStep.STID);
Documentation Feedback and Questions
If you notice some way that this document can be improved, we're happy to hear your suggestions. Similarly, if you can't find an answer you're looking for, ask it via feedback. Simply click on the button below to provide us with your feedback or ask a question. Please remember, though, that not every issue can be addressed through documentation. So, if you have a specific technical issue with Process Director, please open a support ticket.