Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

GetWorkflowState

Use this function to retrieve the current Workflow state for a specified Workflow process and step. The function will return an object with the following properties:

Property

Description

UserID

String indicating the username of the user who last changed the state

UserDescription

String indicating the user description of the user who last changed the state

Modified

String indicating the datetime stamp of the last state change

Comment

String indicating the comment for the last state change, if applicable

CurrentStatus

Number indicating the current status of the workflow step,

PreviousStatus

Number indicating the previous status of the workflow step,

The return values for the status properties CurrentStatus and PreviousStatus:

Property

Description

-1

Failed

Note: Failed indicates the Longview Application Framework function did not execute properly or encountered an issue.

0

Not Started

999

Rejected

1000

In Progress

2000

Submitted for Approval

3000

Approved

9999

No Previous Status Available

Copy

Syntax

GETWORKFLOWSTATE(Process, Step[,Symbol])        

where:

  • Process is the name of an active Workflow process. If the process name contains spaces, enclose it in double quotation marks (" ").
  • Step is the name of the Longview Workflow step within the process. If the step name contains spaces, enclose it in double quotation marks (" ").
  • Symbol is optional for hierarchical steps, and is the symbol for the hierarchical step. Symbol is not used for simple steps.
Copy

Syntax example

CREATE VARIABLE WFState[] AS Object
SET VARIABLE WFState = GETWORKFLOWSTATE(MonthEndProcess, "ABC Canada", E10000)        

Published:

GetWorkflowState

Use this function to retrieve the current Workflow state for a specified Workflow process and step. The function will return an object with the following properties:

Property

Description

UserID

String indicating the username of the user who last changed the state

UserDescription

String indicating the user description of the user who last changed the state

Modified

String indicating the datetime stamp of the last state change

Comment

String indicating the comment for the last state change, if applicable

CurrentStatus

Number indicating the current status of the workflow step,

PreviousStatus

Number indicating the previous status of the workflow step,

The return values for the status properties CurrentStatus and PreviousStatus:

Property

Description

-1

Failed

Note: Failed indicates the Longview Application Framework function did not execute properly or encountered an issue.

0

Not Started

999

Rejected

1000

In Progress

2000

Submitted for Approval

3000

Approved

9999

No Previous Status Available

Copy

Syntax

GETWORKFLOWSTATE(Process, Step[,Symbol])        

where:

  • Process is the name of an active Workflow process. If the process name contains spaces, enclose it in double quotation marks (" ").
  • Step is the name of the Longview Workflow step within the process. If the step name contains spaces, enclose it in double quotation marks (" ").
  • Symbol is optional for hierarchical steps, and is the symbol for the hierarchical step. Symbol is not used for simple steps.
Copy

Syntax example

CREATE VARIABLE WFState[] AS Object
SET VARIABLE WFState = GETWORKFLOWSTATE(MonthEndProcess, "ABC Canada", E10000)        

For an optimal Community experience, Please view on Desktop