Skip to content

Workflow Record Fields

Krish Majumdar edited this page Jan 6, 2023 · 5 revisions

Every workflow record in the database will always contain the fields described below. Unless otherwise indicated, all fields are automatically added and/or updated by the database when the workflow is created or edited, and/or when a workflow step is completed.

  • _id [string] : 24 alphanumeric characters, unique to each version of every workflow record
  • recordType: "workflow" [string] : indicates what type of record this is (fixed value)
  • workflowId [string] : 24 alphanumeric characters, identical across all versions of a single workflow record
  • typeFormId [string] : the type form ID, value dependent on which workflow type form is used to create the workflow
  • typeFormName [string] : the type form name, value dependent on the typeFormId above
  • status [string]: the current status of the workflow, either "In Progress" if at least one workflow step is still to be completed, or "Complete" if all steps have been completed
  • data [object] : this is not used by any current workflow types, but its presence is still required due to the way the database's code works
    • data.submit: true [bool] : a flag to confirm submission of the record to the database (fixed value)
  • path [array of objects] : the workflow steps, with each step being an object path[x] in this array
    • path[x].type [string] : the kind of entity associated with step x (either "component" if x = 0, or "action" for x > 0)
    • path[x].formName [string] : the name of the type form used by the component or action associated with step x
    • path[x].advice [string] : optional additional advice for completing step x (this is generally not necessary, and therefore this sub-field usually appears as an empty string)
    • path[x].result [string] : the result of completing step x (a component's full UUID if path[x].type = "component" or an action ID if path[x].type = "action")
  • insertion [object] :
    • insertion.insertDate [string] : the date and time when the workflow record was last edited
    • insertion.ip [string] : the IP address of the device from which the workflow record was last edited
    • user [object] :
      • user.user_id [string] : the Auth0 ID of the user who last edited the workflow record
      • user.displayName [string] : the Auth0 display name of the user who last edited the workflow record
      • user.emails [list of strings] : a list of all email addresses associated with the user who last edited the workflow record (from the user's Auth0 account)
  • validity [object] :
    • startDate [string] : the date and time when this version of the workflow record was created (i.e. when the workflow record was last edited)
    • version [integer] : the version number of this version of the workflow record
    • ancestor_id [string] : the _id string of the previous version of this workflow record (or null if this is the first version)
Clone this wiki locally