Portal Community

Inbox API

// List pending approval tasks for the current user
GET /api/approvals/pending
Authorization: Bearer {userToken}

Response:
[
  {
    "taskId"      : "task-guid-001",
    "executionId" : "exec-abc",
    "processId"   : "proc-xyz",
    "processName" : "Vendor Contract Approval",
    "nodeId"      : "approvalNode1",
    "title"       : "Vendor Contract Approval",
    "instruction" : "Review and approve the vendor contract attached.",
    "strategy"    : "All",
    "totalApprovers"    : 3,
    "decisionsReceived" : 1,
    "createdAt"   : "2026-05-25T09:00:00Z",
    "expiresAt"   : "2026-05-26T09:00:00Z",
    "payload"     : { ... }  // context data from the workflow
  }
]

Submit a Decision

POST /api/approvals/{taskId}/decide
Authorization: Bearer {userToken}
Content-Type: application/json

{
  "decision": "Approved",   // "Approved" | "Rejected"
  "comment" : "Looks good — terms are acceptable."
}

Approval Task Detail

GET /api/approvals/{taskId}
Authorization: Bearer {userToken}

Response includes:
- fullPayload: the complete context data (e.g., document to review)
- currentDecisions: what other actors have decided so far
- approvers: the full list of assigned approvers

Notification Integration

When a new approval task is created, the engine publishes a WorkflowPaused event (via the event bus). An event handler should send notification emails or Slack messages to the assigned approvers.

public class ApprovalNotificationHandler : IWorkflowEventHandler<WorkflowPaused>
{
    public async Task HandleAsync(WorkflowPaused @event, CancellationToken ct)
    {
        // Fetch the approval task details and notify assigned actors
        var task = await _approvalRepo.GetByExecutionAsync(@event.ExecutionId, @event.SuspendedNodeId);
        foreach (var approver in task.Approvers)
        {
            await _notificationService.SendApprovalRequestAsync(approver.ActorId, task);
        }
    }
}
Inbox location: The approval inbox is a separate UI from Flow Studio's canvas. It lives in the WorkDesk application or can be embedded via the WorkDesk widget in any web app. The API (/api/approvals/pending) is the integration point.