Skip to content

You can query document and object workflow instances in the following ways:

  • Query for in-progress (still running) workflow instances: active
  • Query for completed or cancelled workflow instances: inactive

Workflow and workflow task definitions are not queryable.

The following workflow objects are available for query on document workflows in v21.2+ and object workflows in v22.2+. You must have the Application: Workflow: Query or Application: Workflow: Participate permission to query these objects.

NameDescription
active_workflow__sysEach record represents a single in-progress workflow instance.
inactive_workflow__sysEach record represents a single completed or cancelled workflow instance.
active_workflow_item__sysEach record represents a single document or object record associated with an in-progress workflow instance.
inactive_workflow_item__sysEach record represents a single document or object record associated with a cancelled or completed workflow instance.
active_workflow_task__sysEach record represents a user task instance of an in-progress workflow.
inactive_workflow_task__sysEach record represents a user task instance of a cancelled or completed workflow.
active_workflow_task_item__sysEach record represents an item of a workflow task of an in-progress workflow instance.
inactive_workflow_task_item__sysEach record represents an item of a workflow task of an in-progress workflow instance.

The active_workflow__sys and inactive_workflow__sys objects contain workflow-level information about each workflow instance. A single workflow can have multiple instances, so each record for these objects represents a unique instance of a workflow.

The active_workflow__sys and inactive_workflow__sys objects expose the following relationships:

NameDescription
owner__sysrAn outbound reference to this workflow instance owner user (user__sys).
{in}active_workflow_tasks_sysrAn inbound reference to this workflow’s task instances.
{in}active_workflow_task_items_sysrAn inbound reference to this workflow’s task item instances.

The active_workflow__sys and inactive_workflow__sys objects allow queries on the following fields:

NameDescription
idThe workflow instance ID.
label__sysThe workflow label visible to Admins in the Vault UI.
name__sysThe name of this workflow.
owner__sysAn object reference to the user__sys record in the workflow owner role.
cardinality__sysIndicates how many items can be included in this workflow.
type__sysThe workflow type, which is either document__sys or object__sys.
status__sysThe workflow status, which is either active__v, cancelled__v, or completed__v.
workflow_definition_version__sysThe workflow configuration version.
due_date__sysThe date by which this workflow must be completed.
cancelled_date__sysThe date this workflow was cancelled.
cancellation_comment__sysIf configured, the comment added by a user when cancelling the workflow.
completed_date__sysThe date this workflow was completed.
created_by__sysAn object reference to the user__sys record which created this workflow instance.
created_date__sysThe date this workflow was created.
modified_by__sysAn object reference to the user__sys record which last modified this workflow instance.
modified_date__sysThe date this workflow was last modified.
class__sysIf this is a Read & Understood workflow, this value is read_and_understood__sys.

The active_workflow_item__sys and inactive_workflow_item__sys objects contain item-level information about each document or object record associated with a workflow.

The active_workflow_item__sys and inactive_workflow_item__sys objects expose the following relationships:

NameDescription
{in}active_workflow__sysrAn outbound reference to the parent workflow instance.

The active_workflow_item__sys and inactive_workflow_item__sys objects allow querying the following fields:

NameDescription
idThe workflow instance ID.
workflow__sysAn object reference to the parent workflow__sys.
type__sysThe type of workflow item, either document__sys, document_version__sys, or object__sys.
document__sysThe document ID if type__sys is document__sys.
document_version__sysThe document ID if type__sys is document_version__sys.
object_name__sysThe object record name if type__sys is object__sys.
object_record_id__sysThe object record ID if type__sys is object__sys.

The active_workflow_task__sys and inactive_workflow_task__sys objects contain task-level information about each user task associated with a workflow.

The active_workflow_task__sys and inactive_workflow_task__sys objects expose the following relationships:

NameDescription
{in}active_workflow__sysrAn outbound reference to the parent workflow instance.
owner__sysrAn outbound reference to the workflow task instance owner user (user__sys).
{in}active_workflow_task_items__sysrAn inbound reference to the workflow task’s item instances.

The active_workflow_task__sys and inactive_workflow_task__sys allow querying the following fields:

NameDescription
idThe workflow task instance ID.
workflow__sysAn object reference to the parent workflow__sys.
label__sysThe workflow task label visible to users in the Vault UI.
name__sysThe name of this workflow task.
owner__sysAn object reference to the user__sys record assigned to this task.
participant_group__sysThe participant groups assigned to this workflow task.
status__sysThe status of this workflow task.
assigned_date__sysThe date this workflow task was assigned.
cancelled_date__sysThe date this workflow task was cancelled.
completed_by__sysAn object reference to the user__sys record which completed this workflow task instance.
created_date__sysThe date this workflow task instance was created.
due_date__sysThe date by which this task must be completed.
modified_date__sysThe date this workflow task was last modified.
iteration__sysThe number of times this task instance has iterated.
instructions__sysThe written instructions for this workflow task.
group_instructions__sysThe written instructions for this workflow task, sent when a task is made available to multiple participants.

The active_workflow_task_item__sys and inactive_workflow_task_item__sys objects contain item-level information about each user task associated with a workflow.

The active_workflow_task_item__sys and inactive_workflow_task_item__sys objects expose the following relationships:

NameDescription
{in}active_workflow__sysrAn outbound reference to the parent workflow instance.
{in}active_workflow_task__sysrAn outbound reference to the parent task instance.

Workflow Task Item Queryable Fields

Section link for Workflow Task Item Queryable Fields

The active_workflow_task_item__sys and inactive_workflow_task_item__sys allow queries on the following fields:

NameDescription
idThe workflow task item instance ID.
task__sysAn object reference to the parent task record.
task_comment__sysIf configured, task items may require a comment.
workflow__sysAn object reference to the parent workflow record.
status__sysThe status of this workflow task item.
capacity__sysIf configured, task verdicts may require a capacity.
verdict__sysIf configured, task items may require a verdict.
verdict_reason__sysIf configured, task verdicts may require a reason.
verdict_comment__sysIf configured, task verdicts may require a comment.
type__sysThe type of workflow task item.
document_id__sysThe document ID for this task item.
verdict_document_major_version_number__sysIf this task item has a verdict, this field value is the major version of the document.
verdict_document_minor_version_number__sysIf this task item has a verdict, this field value is the minor version of the document.
verdict_document_version_id__sysIf this task item has a verdict, this field value contains the ID, major version, and minor version.
object__sysThe object record name if the workflow item is an object record.
object_record_id__sysThe object record ID if the workflow item is an object record.

The active_workflow_job_step__sys and inactive_workflow_job_step__sys objects return Job step data for active and inactive Job step instances. Available in v25.3+.

Learn more about Workflow Job steps in Vault Help.

Workflow Job Step Queryable Fields

Section link for Workflow Job Step Queryable Fields

The active_workflow_job_step__sys and inactive_workflow_job_step__sys allow queries on the following fields:

NameDescription
idThe workflow Job step instance ID.
workflow__sysThe workflow process instance ID.
job__sysThe Job ID.
name__sysThe Job step public key.
label__sysThe Job step UI label.
status__sysThe completion status verdict public key.
cancelled_date__sysThe Job step cancellation date.
completed_date__sysThe Job step completion date.
complete_by__sysThe ID of the user who completed the Job step.
modified_date__sysThe date the Job step was last modified.
iteration__sysThe Job step iteration count.
job_name__sysThe public key of the Vault job.

The following query retrieves the due dates for all currently unassigned tasks.

SELECT label__sys, due_date__sys FROM active_workflow_task__sys WHERE status__sys = 'available__sys'

The following query retrieves the documents associated with a specified active workflow:

SELECT id, workflow__sys, type__sys FROM active_workflow_item__sys WHERE workflow__sys = 123

The following query retrieves the open tasks for a given user:

SELECT label__sys, workflow__sys, owner__sys, due_date__sys, active_workflow__sysr.owner__sys FROM active_workflow_task__sys WHERE owner__sysr.username__sys = 'olivia@veepharm.com' AND status__sys = 'active__v'

The following query retrieves the task details of a specified completed workflow:

SELECT id, owner__sys, name__sys, iteration__sys, inactive_workflow__sysr.owner__sys, inactive_workflow__sysr.name__sys, inactive_workflow__sysr.type__sys, (SELECT verdict__sys, verdict_reason__sys, capacity__sys FROM inactive_workflow_task_items__sysr) FROM inactive_workflow_task__sys WHERE workflow__sys = 123

The following query retrieves the Job ID and Job step instance ID for active Job step instances:

SELECT id, job__sys FROM active_workflow_job__sys

The workflows object allows queries on legacy workflows. Learn more about legacy workflows in Vault Help.