Workflows Overview
Workflows are a set of activities that are executed in a specific order. Workflows can be triggered by events or manually. Workflows can be used to automate business processes and integrate with external systems.
Example of YAML manifest file:
workflow:
workflowId: "2e28201d-704e-40b1-8568-7a87d198e255"
name: "Send Order Confirmation Email" # required
description: "Send Order Confirmation Email to the customer" # optional
isActive: true # optional, default is true
version: "1.0" # version of the workflow definition file (not the workflow)
logLevel: "Debug" # default is None
executionMode: "Async" # or 'Sync' (optional, default is Async)
enableActionEvents: true # optional, default is false
actionEvent: # workflow action event. optional, default is empty
name: "workflow.execute"
eventData:
workflowName: "{{workflow.name}}"
enableAudit: true # optional, default is false
runAs: "userName" # optional, default is current user
tags:
- "purchaseOrder"
- "parcel"
concurrency:
group: "email-service" # optional, default is workflow.id
waitTime: 30 # wait time to acquire a lock on the workflow in seconds. Break the workflow if the lock is not acquired.
triggers:
- type: "Entity" # optional, default is Entity
entityName: "Order" # Entity Name
eventType: "Added" # Added, Modified, Deleted
position: "After" # Before, After
displayName: "Order Created"
conditions: # optional
- expression: "[Order.Status] = 'Pick Up'"
- type: "Manual" # optional, default is Manual
displayName: "Manual Trigger" # optional
entityName: "Order" # Action will be available on the Order entity
inputs: # workflow inputs
- name: "emailAddress"
type: "text"
props:
multiple: true # optional, default is false
displayName: "Email Address" # optional (used in the UI)
description: "Email address to send the email to"
required: true # optional, default is false
- name: "orderId"
type: "Order" # type of the input
props:
multiple: false # optional, default is false
description: "Order to process"
required: true # optional, default is false
- name: "Documents"
type: "Document"
props:
displayName: "Documents to email" # optional, default is the name of the input
description: "Select documents to email"
multiple: true # optional, default is false
required: true
mapping: "documents"
filter: "Document.OrderId: {{orderId}}"
visible: false # optional, default is true (used in the UI)
schedules:
- cron: "0 0 * * 1" # every Monday at midnight
displayName: "Every Monday" # optional
outputs: # workflow outputs
- name: "response"
mapping: "sendEmail.response"
- name: "statusCode"
mapping: "sendEmail.statusCode"
activities:
- name: "sendEmail" # name of the activity
conditions: # optional
- expression: "[Order.Status] = 'Pick Up'"
description: "Send Email to the customer"
steps: # actions to execute. execution order is the same as the order of the steps
- task: "Utility/SendEmail" # task name
dependsOn: "Send Order to ERP"
conditions: "[Order.Status] = 'Pick Up'"
runAs: "userName" # optional, default is current user
inputs:
to: "{{Order.Customer.Email}}"
templateName: "OrderConfirmation"
data: '{"order": "{{Order}}"}'
outputs:
- name: "response"
- name: "statusCode"