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
| Argument | Type | Required | Description |
|---|---|---|---|
activity_id | String! | Yes | The ID of the activity |
careflow_id | String! | Yes | The 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
| Argument | Type | Required | Description |
|---|---|---|---|
careflow_id | String! | Yes | The ID of the care flow |
status | String | No | The 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
| Argument | Type | Required | Description |
|---|---|---|---|
input | ExpireTimerInput! | Yes | The 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>"
}
}