Skip to content

Distributed Workflow Orchestration for Expense Approvals (Issue #983)#989

Merged
Renu-code123 merged 3 commits intoRenu-code123:mainfrom
Ayaanshaikh12243:ISSUE-983
Mar 5, 2026
Merged

Distributed Workflow Orchestration for Expense Approvals (Issue #983)#989
Renu-code123 merged 3 commits intoRenu-code123:mainfrom
Ayaanshaikh12243:ISSUE-983

Conversation

@Ayaanshaikh12243
Copy link
Contributor

Distributed Workflow Orchestration for Expense Approvals (Issue #983)

Summary

This feature integrates Temporal.io for resilient, distributed workflow orchestration of expense approvals. It supports multi-step approval processes with retries, compensation, monitoring, and audit logging, making complex workflows reliable and easy to manage.

Features

  • Temporal.io workflow for expense approvals
  • Activities for validation, notification, logging, compensation, and approval
  • Worker and client setup for distributed execution
  • API server for workflow initiation and status queries
  • Utility functions for workflow management, retries, and monitoring
  • Scalable, modular backend codebase (500+ lines)

Benefits

  • Resilient, distributed execution with automatic retries and compensation
  • Real-time monitoring and audit trail for all workflow events
  • Simplifies complex, multi-step approval processes
  • Easy recovery from failures and errors

Files Added/Modified

  • temporal/workflows/expenseApprovalWorkflow.js
  • temporal/activities/validation.js
  • temporal/activities/notification.js
  • temporal/activities/logging.js
  • temporal/activities/compensation.js
  • temporal/activities/waitForApproval.js
  • temporal/worker.js
  • temporal/client.js
  • api/expense-approval-api.js
  • utils/workflow-utils.js

How to Use

  1. Start the Temporal worker: node temporal/worker.js
  2. Start the API server: node api/expense-approval-api.js
  3. Submit expense approval requests via the API
  4. Query workflow status and monitor events

Closes #983

@vercel
Copy link

vercel bot commented Mar 4, 2026

@Ayaanshaikh12243 is attempting to deploy a commit to the Renu's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

🎉 Thanks for the PR, @Ayaanshaikh12243!

We really appreciate you taking the time to contribute to ExpenseFlow! 💙


⭐ Love this project?

Please give us a star! It helps the project grow and reach more developers! 🌟

🔗 https://github.com/Renu-code123/ExpenseFlow


✅ PR Checklist

Before we review, please ensure:

  • Your code follows the project's coding standards
  • All file changes are accurate and intentional
  • You've tested your changes locally
  • Any review comments have been addressed

🙌 Thank You for Contributing!

We truly appreciate your interest in contributing to this project.

  • Please make sure your code follows the project structure
  • Add clear commit messages and comments where necessary
  • Ensure your changes do not break existing functionality

We'll review your PR as soon as possible. Keep up the great work! ✨


@Ayaanshaikh12243
Copy link
Contributor Author

@Renu-code123 pls merge

@vercel
Copy link

vercel bot commented Mar 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
expenseflow Error Error Mar 5, 2026 6:44am

@Renu-code123 Renu-code123 merged commit 4baa340 into Renu-code123:main Mar 5, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Distributed Workflow Orchestration for Expense Approvals

2 participants