Write a Workflow
Workflows in Paradym are not too different from typical workflows: a workflow is created to reach a goal that requires specific steps that need to be completed.
- Workflows are defined using a YAML based structure, inspired by Github Actions (opens in a new tab).
- The workflow input is validated through a JSONSchema (opens in a new tab).
- Values in a workflow can be referenced using JSONPath (opens in a new tab) syntax.
- Paradym is built on (and for) the use of verifiable credentials.
Paradym workflows are specifically suited for use cases that involve verifiable credential exchanges and interaction between or with self-sovereign identity agents. It enables your solution to verify a users identity using the latest developments in digital identity technology.
Examples of workflows could be creating and issuing a diploma, loyalty card or employee badge. Or you could create workflows to verify information like a driving license, home address or login information. Anything you need in your application in terms of user information interaction.
Workflow Components
There are specific components that make up a workflow which is created, edited and published through the Paradym builder.
These are the Paradym components are required in order for your workflow to run:
Name
The name of your workflow.
Triggers
The ways to start your workflow.
Actions
A list of actions you want the workflow to execute. The list of available actions can be found here.
Workflow example
The following example contains the required name, triggers and actions:
name: Receive invitation and send two basic messages
trigger:
type: api
input:
type: 'object'
properties:
invitationUrl:
type: string
welcomeMessage:
type: string
required:
- invitationUrl
- welcomeMessage
actions:
- id: receiveInvitation
name: didcomm/receiveInvitation@v1
attributes:
invitationUrl: $.input.invitationUrl
- id: issueDOBCredential
name: didcomm/issueCredential@v1
attributes:
connectionId: $.actions.receiveInvitation.output.connection.connectionId
anoncreds:
# from credential definition action
credentialDefinitionId: 'did:cheqd:mainnet:d76283f5-943f-4f4b-b5ae-9bd6794b6dcf/resources/9703ceb3-cda2-4315-8f7e-ebceaf351aa7'
attributes:
name: 'Alice'
dateOfBirth: 19901010
See our Tutorials, like How to Issue an Employee Badge for more examples.