Softyflow BPMN Process Components
This guide provides comprehensive documentation for all available BPMN components in Softyflow's Process Modeler and their configuration options.

1. Task Componentsβ
1.1. Empty Task (Normal Task)β
Element Type: bpmn:Task
An Empty Task, also called a Normal Task, represents a generic unit of work within the process that doesnβt have a predefined behavior. It can execute custom scripts, perform calculations, or serve as a placeholder for automation logic defined via Input/Output variables.

1.2. User Task (Manual Task)β
Element Type: bpmn:UserTask
User Tasks represent manual work that needs to be done by a human user. These tasks appear in user task baskets and can be assigned to specific users or roles.

1.2.1. Configuration Optionsβ
1.2.1.1. Users and Rolesβ
Users: Assign tasks to specific users by email
- Supports dynamic assignment using variables:
{{ userEmails }} - Can assign to multiple users with comma-separated emails
- Special variables:
{{SF_initiator}},{{SF_latestValidator}}
- Supports dynamic assignment using variables:
Roles: Assign tasks to user groups/roles
- Supports dynamic assignment using variables:
{{ roleId }} - Can assign to multiple roles with comma-separated IDs
- Special role:
public(accessible to all users)
- Supports dynamic assignment using variables:
reCAPTCHA: Enable for public tasks to prevent spam and fraudulent activities
Observers: Users/roles that can view the task in read-only mode

1.2.1.2. Interface Configurationβ
- Interface: Select a web interface (UI) for task execution
- Screen: Choose specific screen within the selected interface

1.2.1.3. Task Priorityβ
- Due in: Set task due date in minutes
- Priority: Set task priority level
- Very Low, Low, Medium, High, Very High
- Description: Task description text
- Hide In Task Basket: Option to hide task from task basket view

1.2.1.4. Notification Settingsβ
- Send notification email: Enable/disable email notifications
- Provider: Choose email provider (default: Softyflow provider)
- Mail Subject: Email subject line (supports variables)
- Mail Template: Visual email template editor
- Advanced Settings:
- Send UAT mail to SF_initiator: Send test emails to process initiator
- From: Custom sender email
- Cc: Carbon copy recipients
- Reply to: Reply-to addresses
- Attachments: File attachments from project files

1.3. Send Task (Mail Task)β
Element Type: bpmn:SendTask
The Send Task element automates email delivery during process execution, sending notifications or information without requiring human interaction.

1.3.1. Configuration Optionsβ
1.3.1.1. Recipientsβ
- To Users: Email recipients (users)
- To Roles: Email recipients (roles/groups)

1.3.1.2. Mail Configurationβ
- Provider: Email service provider
- Mail Subject: Email subject (supports variables like
{{ taskId }}) - Mail Template: Visual email body editor
- Advanced Settings: Same as User Task notification settings

Mail Template

1.4. Sub Processβ
Element Type: bpmn:SubProcess
Sub Processes allow embedding and executing other processes within the current process.

1.4.1. Configuration Optionsβ
- Sub Process: Select the process to execute
- Parallel Multi-Instance: Enable parallel execution of multiple instances
- Parallel Array: Variable containing array values for multi-instance execution
- Each array value starts a new sub-process instance

2. Gateway Componentsβ
Gateways control the divergence and convergence of process flows based on defined conditions.
2.1. Exclusive Gateway (XOR)β
Exclusive Gateways create decision points in the process flow where only one path can be taken based on conditions.
- Used to model decisions based on conditions.
- Only one outgoing path is selected (mutually exclusive).

2.2. Parallel Gatewayβ
- Used to fork the process into multiple parallel paths.
- Can also join multiple incoming paths into one.

3. Event Componentsβ
3.1. Boundary Eventsβ
Element Type: bpmn:BoundaryEvent
Boundary Events are attached to activities and can interrupt or run parallel to the main activity.
3.1.1. Timer Eventsβ
Event Definition: bpmn:TimerEventDefinition
3.1.1.1. Interrupting Timer (One-time)β
- Start in: Time to wait before triggering (in minutes)
- Supports variable-based delays:
{{ delay }} - Interrupts the main activity when triggered
3.1.1.2. Non-Interrupting Timer (Recurring)β
- Every: Recurring interval (in minutes)
- Runs periodically without interrupting the main activity
- Continues until the main activity completes

3.1.2. Error Eventsβ
Event Definition: bpmn:ErrorEventDefinition
- Catches errors from the attached activity
- Provides error handling and recovery mechanisms
- Can define error-specific handling logic

3.2. Start Eventsβ
Element Type: bpmn:StartEvent
Start Events define where process instances begin execution.

3.3. End Eventsβ
Element Type: bpmn:EndEvent
End Events mark the completion points of process instances, finalizing the workflow execution and storing the final state of process variables.

Sequence Flows connect process elements and define the execution order.
4.1.1. Configuration Optionsβ
- Conditional Flows: Add JavaScript conditions to control flow
- Default Flows: Fallback paths when no conditions are met
- Variable access for condition evaluation

5. Input/Output Variablesβ
Available for Empty Task, User Tasks, Send Tasks, and Sub Processes.
I/O Variables define values evaluated before (Input) or after (Output) task execution.
5.0.1. Input Parametersβ
- Process data before task execution
- Transform external data for task consumption
- Set up task-specific variables
5.0.2. Output Parametersβ
- Process data after task completion
- Transform task results for process consumption
- Update process variables
5.1. Variable Typesβ
5.1.1. Scriptsβ
- Type:
script - Language: JavaScript
- Execution: Server-side execution
- Use Cases: Complex data manipulation, calculations, API calls

5.1.2. Expressionsβ
- Type:
expression - Language: JavaScript expressions
- Execution: Simple value assignments and transformations
- Use Cases: Variable mapping, simple calculations

5.1.3. Actionsβ
- Type:
action - UI-Based: Visual function builder
- Capabilities: UI components, database operations, file handling
- Return Value: Configurable return data

6. Advanced Featuresβ
6.1. System Variables Referenceβ
The following system variables are automatically available in all process contexts:
| Variable | Type | Description | Available In |
|---|---|---|---|
SF_initiator | Object | Process initiator user information (email, name, id) | All tasks and scripts |
SF_latestValidator | Object | User who completed the most recent task | All tasks and scripts |
SF_mode | String | Execution mode: "test", "uat", or "prod" | All contexts |
SF_version | String | Process version identifier | All contexts |
instanceId | String | Unique process instance identifier | All contexts |
projectId | String | Current project identifier | All contexts |
nextTaskId | String | Identifier of the next task to execute | Process flow |
SF_loop_variables | Any | Current array element in multi-instance execution | Multi-instance subprocesses only |
SF_loop_index | Number | Current iteration index (0-based) | Multi-instance subprocesses only |
SF_sub_process_data | Object | Data returned from subprocess execution | Parent process after subprocess |
SF_sub_process_res | Array | Array of results from parallel subprocess instances | Parent process after multi-instance |
SF_last_activity_name | String | Name of the last executed activity | All contexts |
SF_involved_users | Array | All users who have participated in the process | All contexts |
SF_involved_validators | Array | All users who have validated tasks | All contexts |
SF_involved_roles | Array | All roles assigned to tasks | All contexts |
SF_observer | Array | Observer roles for the process | All contexts |
SF_priority | String | Current process priority level | All contexts |
SF_description | String | Process description text | All contexts |
Usage Examples:
// Access initiator email
let requesterEmail = SF_initiator.email;
// Check execution mode
if (SF_mode === "prod") {
// Production-only logic
}
// Access loop data in multi-instance
let currentItem = SF_loop_variables;
let itemIndex = SF_loop_index;
6.2. Variable Interpolationβ
- Syntax:
{{ variableName }} - Supported in: Email subjects, templates, assignments, conditions
- Dynamic evaluation during runtime
6.3. Multi-Instance Executionβ
6.3.1. Parallel Multi-Instanceβ
- Execute multiple instances of sub-processes simultaneously
- Array-based instance creation
- Independent variable scopes per instance
7. Best Practicesβ
This section consolidates best practices from across the process documentation suite.
7.1. Process Designβ
- Start Simple: Begin with basic flows before adding complexity
- Use Descriptive Names: All elements should have clear, business-friendly names
- Modular Design: Break complex processes into subprocesses
- Plan Error Handling: Define error paths for critical operations
- Document Your Process: Add descriptions and comments for future maintainers
7.2. Variable Managementβ
- Consistent Naming: Use camelCase and descriptive names
- Avoid System Prefixes: Don't start variables with
SF_ - Document Complex Scripts: Add comments explaining business logic
- Test Before Deployment: Validate all scripts in test mode
- Minimize Scope: Keep variable usage as local as possible
7.3. Data Transformation (Input/Output)β
- Choose the Right Type:
- Expressions for simple values
- Scripts for complex logic
- Actions for database operations
- Performance: Minimize external API calls in critical paths
- Error Handling: Always use try-catch in complex scripts
- Type Validation: Ensure data types match expectations
7.4. Email Configurationβ
- Test Templates: Always test in UAT mode first
- Use Variables: Create dynamic, personalized content
- Provider Selection: Configure appropriate providers per environment
- Compliance: Include unsubscribe options where required
7.5. Subprocess Usageβ
- Clear Interfaces: Document expected input/output variables
- Error Handling: Implement error handling in both parent and subprocess
- Performance: Monitor parallel execution limits
- Testing: Test subprocesses independently before integration
7.6. Measures and Reportingβ
- Meaningful Names: Use business-friendly measure labels
- Consistent Naming: Follow conventions across all processes
- Appropriate Types: Match measure types to data types
- Handle Null Values: Use conditional logic for missing data
- Test Expressions: Validate with various scenarios
7.7. Securityβ
- Enable reCAPTCHA: For public tasks to prevent spam
- Validate Input: Always validate user input in scripts
- Role-Based Access: Use proper role assignments
- Secure Credentials: Never hardcode API keys or passwords
- Audit Logging: Enable logging for sensitive operations
7.8. Performance Optimizationβ
- Limit Parallel Tasks: Avoid resource exhaustion
- Optimize Queries: Use indexed fields in database queries
- Cache When Possible: Store frequently-accessed data
- Monitor Execution: Track subprocess and task execution times
- Set Appropriate Timeouts: Configure realistic timeout values
7.9. Testing and Deploymentβ
- Test Mode First: Always test in test environment
- Gradual Rollout: Test β UAT β Production
- Version Control: Track process version changes
- Backup Before Changes: Save current version before major updates
- Monitor After Deployment: Watch for errors in production
7.10. Maintenanceβ
- Regular Reviews: Periodically review and optimize processes
- Update Documentation: Keep process descriptions current
- Clean Up Unused: Remove deprecated processes and variables
- Monitor Performance: Track metrics and optimize bottlenecks
- User Feedback: Incorporate user suggestions and issues
This comprehensive guide covers all available BPMN components in Softyflow. Each component can be combined to create sophisticated workflow automation solutions that meet your business requirements.