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.
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
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
Headers
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
Request Body
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
Headers
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
Headers
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
Headers
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
Headers
Request Body
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
Headers
Last updated