Assign Task
Create a task for someone to complete
Assign Task
Create a task and assign it to a specific person or role. The workflow will wait for them to complete the task before continuing. You can send email notifications to let them know about the task.
Technical Name: UserActionFunc
Properties
- Execution Mode: ASYNC
- Type: NATIVE
- Category: User Interactions
- Function ID:
dc2763db-b462-4362-9ba5-015fe95d9981
Input Schema
Optional Parameters
| Parameter | Type | Description |
|---|---|---|
label | string | Label of the step |
description | string | Description of the step |
roleId | string (uuid) | Role ID for the task |
userId | string (uuid) | User ID for the task |
templateId | string (uuid) | Email template ID for notification |
flowData | object | Flow data for the user action |
dataObject | object | Token mapping for email template rendering |
[Image placeholder: UserAction configuration panel]
Input Example
{
"label": "Review Customer Application",
"description": "Please review the customer application and provide your decision",
"roleId": "reviewer-role-uuid",
"templateId": "review-request-template-uuid",
"flowData": {
"applicationId": "app-123",
"customerName": "John Doe",
"applicationType": "Premium Account"
},
"dataObject": {
"applicationNumber": "APP-2024-001",
"submittedDate": "2024-01-15"
}
}Output Schema
Returns data based on user's action:
{
"action": "approved",
"comments": "Application looks good",
"completedBy": "user@example.com",
"completedAt": "2024-01-15T10:30:00Z",
"additionalData": {...}
}[Image placeholder: UserAction task screen]
Use Cases
Manual Review Process
Pause workflow for manual review:
Start → FetchApplication → UserAction(Review) → ProcessDecision → EndData Collection
Collect additional information from user:
{
"label": "Provide Additional Information",
"description": "Please fill in the missing customer details",
"userId": "specific-user-uuid",
"flowData": {
"customerId": "cust-123",
"requiredFields": ["address", "phone", "taxId"]
}
}Multi-Step Approval
Combine with other nodes for multi-step processes:
Start → InsertMData → UserAction(ManagerReview) → UserAction(DirectorApproval) → FinalizeProcess → End[Image placeholder: Multi-step workflow with UserAction]
How It Works
- Workflow Pauses: Execution stops at the UserAction node
- Task Created: A task is assigned to the specified user or role
- Notification Sent: Email notification sent if template provided
- User Completes: User accesses their task inbox and completes the action
- Workflow Resumes: Execution continues with user's response
[Image placeholder: UserAction execution flow]
Task Assignment
Assign to Specific User
{
"userId": "user-uuid",
"label": "Your approval is needed"
}Assign to Role
{
"roleId": "approvers-role-uuid",
"label": "Approval required"
}Any user with the specified role can complete the task.
Best Practices
- Clear Instructions: Provide clear label and description
- Send Notifications: Always use email templates to notify users
- Set Deadlines: Configure timeout for time-sensitive tasks
- Track Progress: Use workflow tracker to monitor pending tasks
- Handle Timeouts: Plan for scenarios where users don't respond
Error Handling
Timeout
Configure timeout for tasks:
{
"label": "Urgent Review",
"timeout": 3600, // 1 hour in seconds
"timeoutAction": "auto-reject"
}No Available Users
When no users match the role:
{
"error": "No users found with the specified role",
"timestamp": "2024-01-15T10:30:00Z"
}Related Functions
- ApprovalAction - Specialized approval workflows
- EmailNotification - Send notification emails
- SubFlow - Break complex approval logic into subflows
Workflow Patterns
Sequential Approval
Start → UserAction(Level1) → UserAction(Level2) → UserAction(Level3) → EndConditional Approval
Start → CheckAmount → (if > $10k) → UserAction(ManagerApproval) → EndParallel Review
Start → Parallel(UserAction(Legal), UserAction(Finance), UserAction(Operations)) → AggregateDecisions → End[Image placeholder: Approval workflow patterns]
User Experience
When a UserAction is triggered, users see:
- Task in their inbox
- Clear description and instructions
- Relevant data and context
- Action buttons (approve, reject, etc.)
- Comment field for feedback
- File upload for attachments
[Image placeholder: User task inbox]
Monitoring
Track UserAction tasks:
- View all pending tasks
- See who is assigned
- Monitor task age
- Track completion time
- Analyze bottlenecks
[Image placeholder: Task monitoring dashboard]