Files
cli-e2e-mqo21uyk/packages/functions/src/wirings/card-onboarding.workflow.ts
2026-06-21 19:23:05 +02:00

23 lines
731 B
TypeScript

import { pikkuWorkflowGraph } from '#pikku/workflow/pikku-workflow-types.gen.js'
export const cardOnboardingWorkflow = pikkuWorkflowGraph({
description: 'Enrich a new card, persist it, then notify',
tags: ['kanban', 'onboarding'],
nodes: { enrich: 'enrichCard', create: 'createCard', notify: 'notifyCardCreated' },
config: {
enrich: { next: 'create' },
create: {
next: 'notify',
input: (ref) => ({ title: ref('enrich', 'title'), status: ref('enrich', 'status') }),
},
notify: {
input: (ref) => ({
cardId: ref('create', 'cardId'),
title: ref('create', 'title'),
priority: ref('enrich', 'priority'),
labels: ref('enrich', 'labels'),
}),
},
},
})