Workflow System
Merobox's workflow system allows you to define complex, multi-step operations using YAML configuration files. Workflows can orchestrate node management, application deployment, context creation, identity management, and contract execution in a declarative way.
Overview
Workflows in Merobox provide:
- Declarative Configuration: Define complex operations in simple YAML files
- Dynamic Value Management: Capture and reuse values between steps
- Step Orchestration: Chain multiple operations together
- Error Handling: Built-in validation and error reporting
- Testing Integration: Perfect for automated testing scenarios
Workflow Structure
Basic Workflow Format
description: 'Workflow description'
name: 'Workflow Name'
# Node configuration
nodes:
chain_id: testnet-1
count: 2
image: ghcr.io/calimero-network/merod:edge
prefix: calimero-node
# Workflow steps
steps:
- name: 'Step Name'
type: step_type
# Step-specific parameters
outputs:
variable_name: field_name
# Global configuration
stop_all_nodes: false
restart: false
wait_timeout: 60
Node Configuration
Define the Calimero nodes for your workflow:
nodes:
chain_id: testnet-1 # Blockchain chain ID
count: 2 # Number of nodes to create
image: ghcr.io/calimero-network/merod:edge # Docker image
prefix: calimero-node # Node name prefix
base_port: 2428 # Base P2P port (optional)
base_rpc_port: 2528 # Base RPC port (optional)
Global Configuration
Control workflow behavior:
# Force pull Docker images even if they exist locally
force_pull_image: true
# Enable authentication service with Traefik proxy
auth_service: true
auth_image: ghcr.io/calimero-network/mero-auth:edge
# Stop all nodes at the end of workflow
stop_all_nodes: false
# Restart nodes at the beginning of workflow
restart: false
# Timeout for waiting operations
wait_timeout: 60
Step Types
Merobox supports various step types for different operations:
Application Management
install_application
Install WASM applications on Calimero nodes.
- name: Install Application
type: install_application
node: calimero-node-1
path: ./my-app.wasm # Local file path
# OR
url: https://example.com/app.wasm # Remote URL
dev: true # Development mode
outputs:
app_id: applicationId # Export application ID
create_context
Create blockchain contexts for applications.
- name: Create Context
type: create_context
node: calimero-node-1
application_id: '{{app_id}}' # Use captured value
params: # Optional context parameters
param1: value1
outputs:
context_id: contextId
member_public_key: memberPublicKey
Identity Management
create_identity
Generate cryptographic identities.
- name: Create Identity
type: create_identity
node: calimero-node-2
outputs:
public_key: publicKey
invite_identity
Invite identities to join contexts.
- name: Invite Identity
type: invite_identity
node: calimero-node-1
context_id: '{{context_id}}'
grantee_id: '{{public_key}}'
granter_id: '{{member_public_key}}'
capability: member
outputs:
invitation: invitation
join_context
Join contexts using invitations.
- name: Join Context
type: join_context
node: calimero-node-2
context_id: '{{context_id}}'
invitee_id: '{{public_key}}'
invitation: '{{invitation}}'