ReferenceFor engineers

Timers

Query and expire the timers that delay steps in a care flow.

Query and expire the timers that delay steps in a care flow.

Queries

activityTimer

Returns the timer for a given activity in a care flow.

Arguments

ArgumentTypeRequiredDescription
activity_idString!YesThe ID of the activity
careflow_idString!YesThe ID of the care flow

Returns: ActivityTimerPayload!

Example

query ActivityTimer($activity_id: String!, $careflow_id: String!) {
  activityTimer(activity_id: $activity_id, careflow_id: $careflow_id) {
    code
    success
    timer {
      activity_id
      careflow_id
      completion_reason
      created_at
      id
      job_id
      name
      readable_explanation
      resource_id
      scheduled_date
      status
      type
      updated_at
    }
  }
}

Variables:

{
  "activity_id": "<string>",
  "careflow_id": "<string>"
}

careflowTimers

Returns the timers for a care flow, optionally filtered by status.

Arguments

ArgumentTypeRequiredDescription
careflow_idString!YesThe ID of the care flow
statusStringNoThe timer status to filter by

Returns: CareflowTimersPayload!

Example

query CareflowTimers($careflow_id: String!, $status: String) {
  careflowTimers(careflow_id: $careflow_id, status: $status) {
    code
    success
    timers {
      activity_id
      careflow_id
      completion_reason
      created_at
      id
      job_id
      name
      readable_explanation
      resource_id
      scheduled_date
      status
      type
      updated_at
    }
  }
}

Variables:

{
  "careflow_id": "<string>",
  "status": "<string>"
}

Mutations

expireTimer

Expires a timer, allowing the step it delays to proceed.

Arguments

ArgumentTypeRequiredDescription
inputExpireTimerInput!YesThe input specifying the timer to expire

Returns: EmptyPayload!

Example

mutation ExpireTimer($input: ExpireTimerInput!) {
  expireTimer(input: $input) {
    code
    success
  }
}

Variables:

{
  "input": {
    "activity_id": "<string>",
    "user_name": "<string>"
  }
}

On this page