Workflow engine is configured by zen. We do not support it and do not recommend to use it anymore. Please, use any other workflow engine e.g. Temporal .

Since the 2405 release, using Aidbox in FHIR schema validation engine is recommended, which is incompatible with zen or Entity/Attribute options.

Setup Aidbox with FHIR Schema validation engine

Workflow User API allows users to manually control Aidbox workflows by RPC methods.

awf.workflow/create-and-execute

Creates an instance of a defined workflow and makes it ready to be executed immediately or at a specified time.

Params:

ParameterTypeRequiredDescription
idstringfalseIdentifier of workflow (If not provided, will be auto-generated).
labelstringfalseHuman- or machine-readable description of workflow instance.
Example: Import Patient resources
definitionstringtrueDefinition of predefined workflow or
custom-defined workflow.
Example: aidbox.bulk/import-resources-workflow
paramsobjecttrueThe input parameters described in the workflow definition.
executeAtstringfalseTime at which the workflow will become ready. If not provided - workflow will become ready immediately.
Example: 2023-05-03T13:30:43

Result:

ParameterTypeDescription
resourcesobject[]Created AidboxWorkflow resources.
POST /rpc
content-type: text/yaml
accept: text/yaml

method: awf.workflow/create-and-execute
params:
  definition: aidbox.bulk/import-resources-workflow
  params:
    type: aidbox
    inputs:
      - url: https://storage.googleapis.com/aidbox-public/synthea/100/Organization.ndjson.gz
        resourceType: Organization

awf.workflow/cancel

Cancels a workflow that is not in status done, canceling recursively all activities started by that workflow.

ParameterTypeRequiredDescription
idstringtrueId of the workflow to be canceled.

Result:

ParameterTypeDescription
resourceobjectThe canceled AidboxWorkflow resource.
POST /rpc
content-type: text/yaml
accept: text/yaml

method: awf.workflow/cancel
params:
  id: af10a9cf-3313-45f0-bbf4-7d3bf3a4da37

awf.workflow/status

Returns the status of a workflow instance with the specified id.

Params:

ParameterTypeRequiredDescription
idstringtrueId of the workflow whose status will be returned.
include-activities?booleanfalseIf true , includes tasks and another workflows started by workflow.
Default: false
include-decisions?booleanfalseIf true, includes all workflow's decision tasks.
Default: false

Result:

ParameterTypeDescription
resourceobjectAidboxWorkflow resource.
activitiesobject[]Activities started by workflow.
decisionsobject[]Decision task resources of workflow.
POST /rpc
content-type: text/yaml
accept: text/yaml

method: awf.workflow/status
params:
  id: abbc317d-f9b0-415e-b5b5-df059e000060
  include-activities?: true
  include-decisions?: true

awf.workflow/list

Returns the list of all workflows.

Params:

ParameterTypeRequiredDescription
filterobjectfalse
filter.statusstringfalseInclude workflow with specified status.
Possible values: created, in-progress, done
filter.outcomestringfalseInclude workflow with status done and specified outcome.
Possible values: succeeded, failed
filter.ilikestringfalseilike search by resource content
sortobjectfalseMay contain either createdAt or lastUpdated.
sort.createdAtstringfalseSorts result by createdAt DateTime.
Possible values: asc, desc
sort.lastUpdatedstringfalseSorts result by lastUpdated DateTime.
Possible values: asc, desc

Result:

ParameterTypeDescription
resourcesobject[]AidboxWorkflow resources.
POST /rpc
content-type: text/yaml
accept: text/yaml

method: awf.workflow/list
params:
  filter: 
    ilike: import