duraflows-persistence-adapter

Implement custom duraflows persistence adapters for Prisma, Drizzle, or TypeORM.

4|Updated Mar 28, 2026
One-click install
npx skills add https://github.com/camcima/duraflows --skill duraflows-persistence-adapter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: duraflows-persistence-adapter
Source: https://github.com/camcima/duraflows/tree/main/skills/duraflows-persistence-adapter
Command: npx skills add https://github.com/camcima/duraflows --skill duraflows-persistence-adapter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guides developers to implement custom duraflows persistence adapters that plug into Prisma, Drizzle, TypeORM, or other ORMs, enabling you to replace the default @duraflows/pg integration with your own database library.

Core Features & Use Cases

  • Provides a standard way to implement three core interfaces: WorkflowInstanceStore, WorkflowHistoryStore, and WorkflowTransactionRunner, enabling database-agnostic runtimes.
  • Demonstrates how to wire adapters into the Duraflows runtime (WorkflowModule) and how to validate behavior with the conformance tests.
  • Use cases include migrating to a new ORM, swapping persistence layers, or integrating custom persistence logic while preserving runtime guarantees like locking and transactions.

Quick Start

Implement the three interfaces in your ORM of choice and wire the adapter into your WorkflowModule to begin using a custom persistence layer.

Frequently Asked Questions about duraflows-persistence-adapter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I replace the default duraflows postgres persistence with Prisma or Drizzle?

To replace the default duraflows postgres persistence with Prisma or Drizzle, you implement custom adapters for three core interfaces: WorkflowInstanceStore, WorkflowHistoryStore, and WorkflowTransactionRunner, then wire them into the WorkflowModule runtime.

What is a persistence adapter in a workflow runtime?

A persistence adapter in a workflow runtime is a custom implementation of storage and transaction interfaces that connects your database library to the workflow engine, preserving runtime guarantees like row-level locking and optimistic concurrency.

Can I use TypeORM with duraflows for workflow instance storage?

Yes, you can use TypeORM with duraflows for workflow instance storage by implementing the required WorkflowInstanceStore, WorkflowHistoryStore, and WorkflowTransactionRunner interfaces to bridge TypeORM into the workflow runtime.

How do I test a custom workflow persistence adapter for conformance?

You test a custom workflow persistence adapter for conformance by running the runInstanceStoreConformance test path, which validates that your implementation satisfies interface definitions, row-level locking, and optimistic concurrency requirements.

Does migrating workflow persistence layers require handling transaction management manually?

Yes, migrating workflow persistence layers requires handling transaction management manually within your adapter implementation, specifically by supplying a WorkflowTransactionRunner that satisfies the runtime's transaction and locking guarantees.