Workflows
Overview
A Workflow
is a prototype collection of stepwise Workstep
prototypes corresponding to a real-world business process. Workflows provide a means of defining the relationships, rulesets and order of execution to be implemented in a baseline business process.
While the baseline protocol standard defines a WorkflowInstance
, the provisioning and management of these instances is left to the implementation provider. Provide Baseline introduces a Workflow
staging layer that enables drafting, templating, deployment and automatic real-time generation of workflow instances. Once deployed, a Workflow
is referenced as a prototype for the spawning of WorkflowInstance
executions as qualifying trigger events occur.
Application
Workflows are useful for designing end-to-end baseline processes as they pertain to a specific use case. Composed of Workstep
objects containing zero-knowledge proofs, a Workflow
can be used to verifiably synchronize the entire lifecycle of any shared business process without exposing any sensitive data.
Fundamentals
Proof
Refers to the output of a zero-knowledge prover; the result of a successfully executed Workstep
. In a baseline context, the proof resulting from a completed workflow instance provides verifiable proof that the data shared by participants in the workflow remained synchronized throughout the entire process.
Workflows are composed of individual stepwise processes called worksteps. A workstep is characterized by input, the deterministic application of a set of logic rules and data to that input, and the generation of a verifiably deterministic and verifiably correct output. Worksteps output a proof
by way of a prover
.
A workflow instance is a real-time execution of a deployed workflow. Workflow instances are spawned when conditions specified in the prime-workstep trigger are met. A Workflow
is capable of spawning n number of workflow instances. A WorkflowInstance
is distinguishable from a Workflow
by the presence of a value in the workflow_id
field.
Workflow Lifecycle
Status
is used to define the stages in a workflow lifecycle.
Status | Description |
---|---|
| inactive; is not being referenced by any workflow instances or spawning new workflow instances. |
| deployment initialized. Included worksteps provisioning. |
| active; able to spawn a |
| inactive; has been replaced by a new version or removed from use |
Versioning
When updates are needed for a deployed Workflow
, versioning is required to avoid conflicts with previously deployed iterations and related workflow instances. A Workflow
is required to have a version in order to be deployed.
Using Workflows
Prerequisites
The Workflow API is intended to function within the context of an Organization
acting as a participant in a Workgroup
.
Within this context, it is assumed that:
an
Organization
scoped JWT is available for useOrganization
is a participant in aWorkgroup
Workflow Schema
Field | Type | Description |
---|---|---|
| date/time | timestamp of |
| date/time | timestamp of |
| uuid |
|
| object | arbitrary data pertaining to |
| array | list of |
| string | address of |
| string | current |
| string | current |
| uuid |
|
| uuid | when |
| array | list of |
API Requests
List Workflows
Returns a list of Workflow
objects
List Workflows
GET
https://baseline.provide.services/api/v1/workflows
Returns a list of workflows and workflow instances
Query Parameters
Name | Type | Description |
---|---|---|
filter_prototypes | boolean | when true, only workflow instances will be returned |
filter_instances | boolean | when true, only |
page | int | limits response to the page number specified |
rpp | int | sets the number of results included per page |
Headers
Name | Type | Description |
---|---|---|
authorization* | string | bearer <JWT> scoped for an |
Create Workflow
Creates a Workflow
Create Workflow
POST
https://baseline.provide.services/api/v1/workflows
Creates a Workflow
.
A Workflow
is a prototype of a baseline business process, typically shared amongst two or more participants and composed of one or more stepwise worksteps. Once deployed, a Workflow
is referenced as the template for real-time WorkflowInstance
generation as conditions defined in the prime-workstep occur.
Headers
Name | Type | Description |
---|---|---|
authorization* | string | bearer <JWT> scoped for an |
Request Body
Name | Type | Description |
---|---|---|
name* | string | name of |
description | string | descriptor of |
workgroup_id* | uuid | id of intended |
status* | string | current status of |
version | string | current |
Get Workflow Details
Retrieves details for a specified Workflow
Get Workflow Details
GET
https://baseline.provide.services/api/v1/workflows/:id
Retrieves detailed information for a specified Workflow
. ID path parameter can optionally be replaced with a WorkflowInstance
id
to obtain information about a specified WorkflowInstance
.
Path Parameters
Name | Type | Description |
---|---|---|
id* | uuid |
|
Headers
Name | Type | Description |
---|---|---|
authorization* | string | bearer <JWT> scoped for an |
Delete Workflow
Deletes a specified Workflow
; Workflows with a status of pending_deployment
, deployed
or deprecated
cannot be deleted.
Delete a Workflow
DELETE
https://baseline.provide.services/api/v1/workflows/:id
Deletes the specified Workflow
Path Parameters
Name | Type | Description |
---|---|---|
id* | uuid |
|
Headers
Name | Type | Description |
---|---|---|
authorization* | string | bearer <JWT> scoped for an |
Deploy Workflow
Deploying a workflow provisions it for use amongst the participants in the associated workgroup within the defined parameters.
Once deployed, a workflow begins actively listening for workstep trigger events, spawning new workflow instance executions each time the prime-workstep is triggered. A deployed Workflow
cannot be updated and must be versioned and redeployed to introduce changes.
Deploy a Workflow
POST
https://baseline.provide.services/api/v1/workflows/:id/deploy
Deploys a specified Workflow.
Workflow
must be assigned a version
in order to be deployed.
Path Parameters
Name | Type | Description |
---|---|---|
id* | uuid |
|
Headers
Name | Type | Description |
---|---|---|
authorization* | string | bearer <JWT> scoped for an |
Update Workflow
Updating a Workflow
is useful for versioning and updating status. Workflows with a status of pending_deployment
, deployed
or deprecated
cannot be updated.
Update a Workflow
PUT
https://baseline.provide.services/api/v1/workflows/:id
Updates a specified Workflow
. Useful for versioning and updating status.
Path Parameters
Name | Type | Description |
---|---|---|
id* | uuid |
|
Headers
Name | Type | Description |
---|---|---|
authorization* | string | bearer <JWT> scoped for an |
Request Body
Name | Type | Description |
---|---|---|
version | string | current |
status* | string | current status of |
name* | string | workflow name |
description | string | brief description of |
List Workflow Worksteps
Returns a list of Workstep
objects in a specified Workflow
List Worksteps in a Workflow
PUT
https://baseline.provide.services/api/v1/workflows/:id/worksteps
Returns a list of Workstep
objects for a specified Workflow
Path Parameters
Name | Type | Description |
---|---|---|
id* | uuid |
|
Headers
Name | Type | Description |
---|---|---|
authorization* | string | bearer <JWT> scoped for an |
Last updated