Task Types
The BankLingo Process Engine supports 8 different task types, each designed for specific use cases in business process automation.
Available Task Types
1. User Task
Purpose: Human interaction and manual work
User tasks pause process execution and wait for a human to perform an action (approve, reject, review, etc.).
Use Cases:
- Approvals and reviews
- Manual data entry
- Decision making
- Document verification
2. Service Task
Purpose: Call external services and APIs
Service tasks make HTTP/REST API calls to external systems, with support for retries, timeouts, and response validation.
Use Cases:
- REST API integration
- Third-party service calls
- Data synchronization
- External system updates
3. Script Task
Purpose: Execute inline code
Script tasks execute JavaScript/Node.js code directly within the process, with full access to process variables.
Use Cases:
- Data transformation
- Calculations and logic
- Variable manipulation
- Conditional logic
4. Send Task
Purpose: Send messages and notifications
Send tasks send messages to queues, topics, HTTP endpoints, or email/SMS services.
Use Cases:
- Email notifications
- SMS alerts
- Message queue publishing
- Webhook calls
- Event publishing
5. Business Rule Task
Purpose: Execute business rules and decision tables
Business rule tasks evaluate complex business logic using rule sets and decision tables.
Use Cases:
- Pricing calculations
- Risk assessment
- Eligibility checks
- Policy evaluation
- Credit scoring
6. Receive Task
Purpose: Wait for external messages
Receive tasks pause execution and wait for external messages or signals with correlation.
Use Cases:
- Waiting for payment confirmation
- Document upload events
- Third-party callbacks
- Asynchronous responses
- Event-driven workflows
7. Call Activity
Purpose: Invoke sub-processes
Call activities invoke other BPMN processes as sub-processes, with data mapping between parent and child.
Use Cases:
- Reusable workflows
- Complex process composition
- Modular process design
- Nested approvals
- Hierarchical processes
8. Gateway
Purpose: Control flow routing and decisions
Gateways control the flow of execution based on conditions, enabling branching, merging, and parallel execution.
Types:
- Exclusive Gateway: Single path selection (XOR)
- Parallel Gateway: Multiple parallel paths (AND)
- Inclusive Gateway: Multiple conditional paths (OR)
Use Cases:
- Conditional routing
- Dynamic path selection
- Parallel execution
- Workflow branching
Task Type Comparison
| Task Type | Execution | Human Interaction | External System | Complexity |
|---|---|---|---|---|
| UserTask | Paused | Required | No | Low |
| ServiceTask | Automatic | No | Yes (HTTP) | Medium |
| ScriptTask | Automatic | No | No | Low |
| SendTask | Automatic | No | Yes (Message) | Low |
| BusinessRuleTask | Automatic | No | Rules Engine | Medium |
| ReceiveTask | Paused | No | Yes (Event) | Medium |
| CallActivity | Automatic | Depends | Depends | High |
| Gateway | Automatic | No | No | Low |
Common Properties
All task types share these common properties:
Base Properties
<bpmn:extensionElements>
<custom:properties>
<!-- Task identification -->
<custom:property name="Name" value="Task name" />
<custom:property name="Description" value="Task description" />
<!-- Entity state tracking -->
<custom:property name="EntityState" value="Processing" />
<!-- Responsible parties -->
<custom:property name="ResponsibleTeams" value="Team1,Team2" />
<custom:property name="ResponsibleUsers" value="user1@bank.com,user2@bank.com" />
<!-- Async execution -->
<custom:property name="AsyncBefore" value="true" />
<custom:property name="AsyncAfter" value="true" />
</custom:properties>
</bpmn:extensionElements>
Input/Output Mapping
All tasks support variable mapping:
<custom:properties>
<!-- Input mapping: Read from process variables -->
<custom:property name="InputMapping" value="{
"amount": "loanAmount",
"customer": "customerData.name"
}" />
<!-- Output mapping: Write to process variables -->
<custom:property name="OutputMapping" value="{
"result": "approvalResult",
"timestamp": "processedAt"
}" />
</custom:properties>
Choosing the Right Task Type
Decision Tree
Need human interaction?
├─ YES → UserTask
└─ NO → Continue
Need to call external API?
├─ YES → ServiceTask or SendTask
│ ├─ Expect response? → ServiceTask
│ └─ Fire-and-forget? → SendTask
└─ NO → Continue
Need to execute business rules?
├─ YES → BusinessRuleTask
└─ NO → Continue
Need to execute custom code?
├─ YES → ScriptTask
└─ NO → Continue
Need to wait for external event?
├─ YES → ReceiveTask
└─ NO → Continue
Need to invoke another process?
├─ YES → CallActivity
└─ NO → Continue
Need conditional routing?
└─ YES → Gateway
Task Execution Order
Tasks execute in the order defined by sequence flows:
<bpmn:process>
<bpmn:startEvent id="Start" />
<bpmn:sequenceFlow sourceRef="Start" targetRef="Task1" />
<bpmn:scriptTask id="Task1" />
<bpmn:sequenceFlow sourceRef="Task1" targetRef="Task2" />
<bpmn:userTask id="Task2" />
<bpmn:sequenceFlow sourceRef="Task2" targetRef="Gateway1" />
<bpmn:exclusiveGateway id="Gateway1" />
<!-- Multiple outgoing flows from gateway -->
</bpmn:process>
Execution: Start → Task1 → Task2 (pauses) → Gateway1 → (conditional routing)
Error Handling
All tasks support error handling:
<custom:properties>
<!-- Retry configuration -->
<custom:property name="Retries" value="3" />
<custom:property name="TimeoutMs" value="30000" />
<!-- Error handling -->
<custom:property name="OnError" value="Continue" /> <!-- Continue, Retry, Fail -->
</custom:properties>
Next Steps
Explore detailed documentation for each task type:
- UserTask - Human tasks and approvals
- ServiceTask - REST API integration
- ScriptTask - Inline code execution
- SendTask - Message sending
- BusinessRuleTask - Business rules
- ReceiveTask - Event waiting
- CallActivity - Sub-processes
- Gateway - Flow control
Or continue with:
- Execution Modes - Supervised vs Unsupervised
- Variables & I/O - Data management
- Examples - Complete processes