Skip to main content
Expert
August 27, 2026
Solved

StatusValue

  • August 27, 2026
  • 4 replies
  • 69 views

Hi,

Does anyone know where the StatusValue shown in the WorkflowStatus method is actually stored?

I'm trying to locate the source of the workflow status data. I'd expect there to be a table in the Application tables that contains this column. Does anyone know which one it is?

Best answer by RomanBannyy

Oh, I see.
Try TaskflowStepInstances
Something like this for pure workflows:

SELECT H.ProfileName as [WF Name], M.Name as [Scenario], T.Wtk as [TimeId], T.InstanceStatus
FROM TaskflowStepInstances T
LEFT JOIN WorkflowProfileHierarchy H
ON T.Wfk = H.ProfileKey
LEFT JOIN Member M
ON T.Wsk = M.MemberId

upd: Step keys are in SharedConstants.WorkflowKeys.Steps

4 replies

Member
August 28, 2026

Hello Andrea,

I believe you mean public enum WorkflowStatusTypes, which you can access directly in your code and is likely not stored in App tables.
 

var sb = new StringBuilder();
foreach (var status in Enum.GetValues<WorkflowStatusTypes>())
sb.AppendLine($"{status} - {(int)status}");

throw new Exception(sb.ToString());

 

Output:


NotExecuted - 0
InProcess - 1
Completed - 2
HasError - 10
NoStatus - 20
Unknown - -1
 

AndreaFAuthor
Expert
August 28, 2026

Hi ​@RomanBannyy , just to clarify I'm not looking for the list of possible status values, but for a table that stores each workflow/workflow step along with its current status. I'd expect something like: workflow_id=xxx, status=0; workflow_id=yyy, status=2; etc.

Member
August 28, 2026

Oh, I see.
Try TaskflowStepInstances
Something like this for pure workflows:

SELECT H.ProfileName as [WF Name], M.Name as [Scenario], T.Wtk as [TimeId], T.InstanceStatus
FROM TaskflowStepInstances T
LEFT JOIN WorkflowProfileHierarchy H
ON T.Wfk = H.ProfileKey
LEFT JOIN Member M
ON T.Wsk = M.MemberId

upd: Step keys are in SharedConstants.WorkflowKeys.Steps

Member
August 28, 2026

Hi Andrea,

There's no table with a StatusValue column — it's not stored anywhere; it's computed live by the Workflow Engine.

That value only exists as output of the WorkflowStatus Method Query itself — it's generated at runtime by combining lock state + running task state + step completion, not read from a column.

This matches OneStream's own docs: for an open workflow, hierarchy/status info is read from memory (cache), not the database.

Note: use the WorkflowStatus Method Query or BRApi.Workflow.Status.GetWorkflowStatus() — that's the only way to get it, since it does not persist

Thanks!
Haritha