Skip to main content

Process Design with SoftyFlow

SoftyFlow's Process Modeler provides powerful tools to design, build, and test business workflows using BPMN 2.0 standards. This guide covers everything you need to create effective process flows.

Before you begin, ensure you've completed your project setup and created your web interfaces that will connect to your processes.

Overview

Process design in SoftyFlow involves creating workflows that combine activities, gateways, and events to automate business logic. Each process consists of interconnected process components that define the execution path and business rules.

Key Components

  • Activities: Tasks that perform work (User Tasks, Send Tasks, Normal Tasks, Sub Processes)
  • Gateways: Decision points that control process flow
  • Events: Triggers and endpoints (Start, End, Timer, Error events)
  • Sequence Flow: Connections that define execution order

Activities & Components

User Tasks (Manual Tasks)

Human-performed tasks that appear in user baskets.

Configuration:

  • Assignment: Users, roles, or dynamic assignment using variables
  • Interface: Select UI screen for task execution
  • Notifications: Email notifications with customizable templates
  • Due Dates: Task deadlines and priority levels
  • Observers: Read-only access for specific users/roles
User Tasks

Send Tasks (Email Tasks)

Automated email sending without human interaction.

Configuration:

  • Recipients: Users, roles, or variable-based targeting
  • Templates: Visual email editor with variable support
  • Providers: Multiple email service providers
  • Attachments: File attachments from project resources
Send Tasks

Normal Tasks

Normal Tasks

Sub Processes

Execute other processes within the current workflow.

Key Features:

  • Process Selection: Choose any process from your project
  • Variable Passing: Automatic variable inheritance
  • Parallel Execution: Multi-instance support with arrays
  • Result Collection: Aggregated results from parallel instances
Sub Processes

Gateways & Flow Control

Exclusive Gateway (XOR)

Creates decision points where only one path is taken.

Exclusive Gateway

Parallel Gateway

Splits execution into multiple parallel paths or joins them back together.

Use Cases:

  • Simultaneous task execution
  • Parallel approvals
  • Multi-step processing
Parallel Gateway

Input/Output Parameters

Configure data transformation before and after task execution. Available for User Tasks, Send Tasks, and Sub Processes. For detailed configuration, see our Input/Output Parameters guide.

Input Output Parameters

Parameter Types

Scripts (JavaScript)

Complex server-side logic with full SoftyFlow SDK access.

Scripts

Available SDK Functions:

Scripts

Learn more about the complete SDK in our Node.js SDK reference.

Expressions

Simple variable assignments and string operations.

Expressions

Actions

Visual function builder for UI operations and database queries.

Available Actions:

  • Database operations (Find, Insert, Update, Delete)
  • Process management (Launch, Validate, Get tasks)
  • User management (Find users, Update metadata)
  • Utilities (Generate PDF, Send email, API calls)
Action

For detailed Input/Output configuration, see the Input/Output Parameters guide.

Scheduled Tasks & Timers

Scheduled Tasks

The Scheduled Tasks interface allows you to automate the execution of processes within your projects. You can configure processes to run periodically in different environments: TEST, UAT (Acceptance), and PROD (Production).

On the Scheduled Tasks page, you will find a table listing all configured scheduled executions.

Creating a New Scheduled Task

Click on the red Create Scheduling Tasks button to open the scheduling configuration modal.

Fields in the Form:

FieldDescription
ModeEnvironment in which the process should run: TEST, ACCEPTANCE, or PRODUCTION.
ProjectSelect the project that contains the process to schedule.
ProcessChoose the specific process to run.
Start Date and TimeDefine when the task should start.
Delay Between RepetitionsConfigure the time gap between executions: in days, hours, minutes, or using a cron expression.
Repeat EveryDefine how frequently the task should repeat.

Delay Options

You can define how often the process should repeat by selecting one of the delay types:

  • Days
  • Hours
  • Minutes
  • Cron (advanced scheduling pattern)
Scheduled Tasks

Timer Events

Attached to activities for timeout handling.

  • Start in: Delay before triggering (minutes)
  • Action: Interrupts main activity and follows alternative path
Timer Events

Email Notifications

Configured through Send Tasks and User Task notifications.

Email Features:

  • Variable Integration: Dynamic content using process variables
  • Template Editor: Visual email design with drag-and-drop
  • Multi-Provider: Support for different email services
  • Attachment Support: Include files from project resources

Notification Strategies

  • Task Assignment: Notify users of new tasks
  • Status Updates: Inform stakeholders of progress
  • Error Alerts: Automatic error notifications
  • Escalation: Time-based escalation emails
Timer Events

Measures & KPIs

Process measures enable real-time tracking and reporting by calculating KPIs during process execution.

Measure Configuration

Each measure requires:

  • Label: Descriptive name for reports
  • Type: String, Number, Boolean, Date, or Any
  • Field: JavaScript expression for calculation

Calculation Examples

Measures

System Measures

Automatically provided for every process:

  • SF_last_activity_name: Current activity name
  • SF_involved_users: Participating users
  • SF_status: Process status
  • SF_createdAt: Process start time

For comprehensive measure configuration, see the Measures documentation.

Error Handling

Error Boundary Events

Catch and handle errors from attached activities.

Configuration:

  • Attach to Activities: User tasks, Normal Tasks, sub-processes
  • Error Types: Specific error handling or catch-all
  • Recovery Actions: Alternative execution paths

Error Handling Strategies

Error Handling

Best Practices:

  • Always provide fallback paths for critical processes
  • Log errors for debugging and monitoring
  • Implement retry mechanisms for transient failures
  • Use timeout events for long-running operations

Security & Access Control

Task-Level Security

  • User Assignment: Direct user or role-based assignment
  • Observers: Read-only access control
  • reCAPTCHA: Prevent spam in public tasks
  • Dynamic Assignment: Variable-based security rules

Process-Level Security

  • Role Restrictions: Control who can access processes using role management
  • View Permissions: Separate viewing and execution rights
  • Variable Security: Protect sensitive data in process variables

Security Best Practices

  • Use principle of least privilege
  • Implement proper role hierarchies
  • Audit process access and modifications
  • Secure sensitive variables and API credentials
  • Validate all user inputs in scripts and expressions

Best Practices

Process Design

  1. Modularity: Use sub-processes for reusable components
  2. Error Handling: Always provide error paths and timeouts
  3. Performance: Minimize complex calculations in critical paths
  4. Documentation: Use descriptive names and comments

Variable Management

  1. Naming Conventions: Use consistent, descriptive variable names
  2. Type Safety: Ensure expressions match expected data types
  3. Null Checking: Always validate variable existence
  4. Security: Protect sensitive data from exposure

Testing & Validation

  1. Unit Testing: Test individual components before integration
  2. End-to-End Testing: Validate complete process flows
  3. Performance Testing: Monitor execution times and resource usage
  4. User Acceptance: Involve business users in testing

Getting Started

  1. Start Simple: Begin with basic user tasks and gateways
  2. Add Complexity Gradually: Introduce advanced features step by step
  3. Test Frequently: Validate each component as you build
  4. Monitor Performance: Track measures and optimize as needed
  5. Document Processes: Maintain clear documentation for maintenance

This foundation will enable you to build robust, scalable business processes that effectively automate your organization's workflows while maintaining security and performance standards.


Next Steps

Now that you understand process design, continue building your application:

For hands-on experience, try our step-by-step tutorials or watch our process and reports video tutorials.

For advanced features, explore our Process Components, Input/Output Parameters, Measures, and Sub Processes documentation.