chore: kanban template
This commit is contained in:
22
packages/functions/src/wirings/card-onboarding.workflow.ts
Normal file
22
packages/functions/src/wirings/card-onboarding.workflow.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
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'),
|
||||
}),
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user