@open-mercato/core 0.6.5-develop.4516.1.88e6ab71a9 → 0.6.5-develop.4534.1.b459babe6d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +2 -2
- package/dist/generated/entities/step_instance/index.js +2 -0
- package/dist/generated/entities/step_instance/index.js.map +2 -2
- package/dist/generated/entities/user_task/index.js +2 -0
- package/dist/generated/entities/user_task/index.js.map +2 -2
- package/dist/generated/entities/workflow_branch_instance/index.js +39 -0
- package/dist/generated/entities/workflow_branch_instance/index.js.map +7 -0
- package/dist/generated/entities/workflow_event/index.js +2 -0
- package/dist/generated/entities/workflow_event/index.js.map +2 -2
- package/dist/generated/entities/workflow_instance/index.js +2 -0
- package/dist/generated/entities/workflow_instance/index.js.map +2 -2
- package/dist/generated/entities.ids.generated.js +1 -0
- package/dist/generated/entities.ids.generated.js.map +2 -2
- package/dist/generated/entity-fields-registry.js +24 -0
- package/dist/generated/entity-fields-registry.js.map +2 -2
- package/dist/modules/progress/api/jobs/[id]/route.js +7 -1
- package/dist/modules/progress/api/jobs/[id]/route.js.map +2 -2
- package/dist/modules/shipping_carriers/api/cancel/route.js +2 -2
- package/dist/modules/shipping_carriers/api/cancel/route.js.map +2 -2
- package/dist/modules/shipping_carriers/lib/status-sync.js +8 -1
- package/dist/modules/shipping_carriers/lib/status-sync.js.map +2 -2
- package/dist/modules/workflows/components/NodeEditDialog.js +3 -1
- package/dist/modules/workflows/components/NodeEditDialog.js.map +2 -2
- package/dist/modules/workflows/components/WorkflowGraphImpl.js +4 -2
- package/dist/modules/workflows/components/WorkflowGraphImpl.js.map +2 -2
- package/dist/modules/workflows/components/nodes/ParallelForkNode.js +49 -0
- package/dist/modules/workflows/components/nodes/ParallelForkNode.js.map +7 -0
- package/dist/modules/workflows/components/nodes/ParallelJoinNode.js +49 -0
- package/dist/modules/workflows/components/nodes/ParallelJoinNode.js.map +7 -0
- package/dist/modules/workflows/components/nodes/index.js +4 -0
- package/dist/modules/workflows/components/nodes/index.js.map +2 -2
- package/dist/modules/workflows/data/entities.js +81 -0
- package/dist/modules/workflows/data/entities.js.map +2 -2
- package/dist/modules/workflows/data/validators.js +146 -1
- package/dist/modules/workflows/data/validators.js.map +2 -2
- package/dist/modules/workflows/events.js +7 -1
- package/dist/modules/workflows/events.js.map +2 -2
- package/dist/modules/workflows/lib/activity-executor.js +4 -2
- package/dist/modules/workflows/lib/activity-executor.js.map +2 -2
- package/dist/modules/workflows/lib/activity-queue-types.js.map +2 -2
- package/dist/modules/workflows/lib/event-logger.js +2 -0
- package/dist/modules/workflows/lib/event-logger.js.map +2 -2
- package/dist/modules/workflows/lib/execution-token.js +98 -0
- package/dist/modules/workflows/lib/execution-token.js.map +7 -0
- package/dist/modules/workflows/lib/node-type-icons.js +14 -5
- package/dist/modules/workflows/lib/node-type-icons.js.map +2 -2
- package/dist/modules/workflows/lib/parallel-handler.js +364 -0
- package/dist/modules/workflows/lib/parallel-handler.js.map +7 -0
- package/dist/modules/workflows/lib/signal-handler.js +63 -1
- package/dist/modules/workflows/lib/signal-handler.js.map +2 -2
- package/dist/modules/workflows/lib/step-handler.js +74 -30
- package/dist/modules/workflows/lib/step-handler.js.map +2 -2
- package/dist/modules/workflows/lib/task-handler.js +26 -0
- package/dist/modules/workflows/lib/task-handler.js.map +2 -2
- package/dist/modules/workflows/lib/timer-handler.js +26 -1
- package/dist/modules/workflows/lib/timer-handler.js.map +2 -2
- package/dist/modules/workflows/lib/transition-handler.js +33 -21
- package/dist/modules/workflows/lib/transition-handler.js.map +2 -2
- package/dist/modules/workflows/lib/workflow-executor.js +39 -1
- package/dist/modules/workflows/lib/workflow-executor.js.map +2 -2
- package/dist/modules/workflows/migrations/Migration20260602120000.js +24 -0
- package/dist/modules/workflows/migrations/Migration20260602120000.js.map +7 -0
- package/dist/modules/workflows/workers/workflow-activities.worker.js +8 -4
- package/dist/modules/workflows/workers/workflow-activities.worker.js.map +2 -2
- package/generated/entities/step_instance/index.ts +1 -0
- package/generated/entities/user_task/index.ts +1 -0
- package/generated/entities/workflow_branch_instance/index.ts +18 -0
- package/generated/entities/workflow_event/index.ts +1 -0
- package/generated/entities/workflow_instance/index.ts +1 -0
- package/generated/entities.ids.generated.ts +1 -0
- package/generated/entity-fields-registry.ts +24 -0
- package/package.json +7 -7
- package/src/modules/progress/api/jobs/[id]/route.ts +7 -0
- package/src/modules/shipping_carriers/api/cancel/route.ts +2 -2
- package/src/modules/shipping_carriers/lib/status-sync.ts +19 -0
- package/src/modules/workflows/components/NodeEditDialog.tsx +2 -0
- package/src/modules/workflows/components/WorkflowGraphImpl.tsx +3 -1
- package/src/modules/workflows/components/nodes/ParallelForkNode.tsx +66 -0
- package/src/modules/workflows/components/nodes/ParallelJoinNode.tsx +66 -0
- package/src/modules/workflows/components/nodes/index.ts +6 -0
- package/src/modules/workflows/data/entities.ts +109 -0
- package/src/modules/workflows/data/validators.ts +223 -0
- package/src/modules/workflows/events.ts +7 -0
- package/src/modules/workflows/i18n/de.json +12 -0
- package/src/modules/workflows/i18n/en.json +12 -0
- package/src/modules/workflows/i18n/es.json +12 -0
- package/src/modules/workflows/i18n/pl.json +12 -0
- package/src/modules/workflows/lib/activity-executor.ts +8 -2
- package/src/modules/workflows/lib/activity-queue-types.ts +3 -0
- package/src/modules/workflows/lib/event-logger.ts +3 -0
- package/src/modules/workflows/lib/execution-token.ts +166 -0
- package/src/modules/workflows/lib/node-type-icons.ts +11 -2
- package/src/modules/workflows/lib/parallel-handler.ts +575 -0
- package/src/modules/workflows/lib/signal-handler.ts +72 -1
- package/src/modules/workflows/lib/step-handler.ts +94 -34
- package/src/modules/workflows/lib/task-handler.ts +32 -0
- package/src/modules/workflows/lib/timer-handler.ts +30 -1
- package/src/modules/workflows/lib/transition-handler.ts +56 -24
- package/src/modules/workflows/lib/workflow-executor.ts +53 -1
- package/src/modules/workflows/migrations/.snapshot-open-mercato.json +263 -0
- package/src/modules/workflows/migrations/Migration20260602120000.ts +25 -0
- package/src/modules/workflows/workers/workflow-activities.worker.ts +9 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/modules/workflows/components/WorkflowGraphImpl.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport '@xyflow/react/dist/style.css'\n\nimport { useCallback, useMemo, useEffect, useState } from 'react'\nimport {\n ReactFlow,\n Node,\n Edge,\n Controls,\n Background,\n BackgroundVariant,\n MiniMap,\n Panel,\n useNodesState,\n useEdgesState,\n addEdge,\n Connection,\n ConnectionMode,\n MarkerType,\n} from '@xyflow/react'\nimport {StartNode, EndNode, UserTaskNode, AutomatedNode, SubWorkflowNode, WaitForSignalNode, WaitForTimerNode} from './nodes'\nimport { WorkflowTransitionEdge } from './WorkflowTransitionEdge'\nimport { STATUS_COLORS } from '../lib/status-colors'\nimport { Alert, AlertDescription } from '@open-mercato/ui/primitives/alert'\nimport { Edit3 } from 'lucide-react'\nimport { useTheme } from '@open-mercato/ui/theme'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\n\nexport interface WorkflowGraphImplProps {\n initialNodes?: Node[]\n initialEdges?: Edge[]\n onNodesChange?: (changes: any[]) => void\n onEdgesChange?: (changes: any[]) => void\n onNodeClick?: (event: React.MouseEvent, node: Node) => void\n onEdgeClick?: (event: React.MouseEvent, edge: Edge) => void\n onConnect?: (connection: Connection) => void\n editable?: boolean\n className?: string\n height?: string\n}\n\nexport default function WorkflowGraphImpl({\n initialNodes = [],\n initialEdges = [],\n onNodesChange: onNodesChangeProp,\n onEdgesChange: onEdgesChangeProp,\n onNodeClick: onNodeClickProp,\n onEdgeClick: onEdgeClickProp,\n onConnect: onConnectProp,\n editable = false,\n className = '',\n height = '600px',\n}: WorkflowGraphImplProps) {\n const t = useT()\n const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes)\n const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges)\n\n const { resolvedTheme } = useTheme()\n const isDark = resolvedTheme === 'dark'\n const backgroundDotColor = isDark ? '#374151' : '#e5e7eb'\n const [isCompactViewport, setIsCompactViewport] = useState(false)\n\n useEffect(() => {\n if (typeof window === 'undefined') return\n const mediaQuery = window.matchMedia('(max-width: 1279px)')\n const updateViewportMode = () => setIsCompactViewport(mediaQuery.matches)\n\n updateViewportMode()\n mediaQuery.addEventListener('change', updateViewportMode)\n\n return () => {\n mediaQuery.removeEventListener('change', updateViewportMode)\n }\n }, [])\n\n useEffect(() => {\n setNodes(initialNodes)\n }, [initialNodes, setNodes])\n\n useEffect(() => {\n setEdges(initialEdges)\n }, [initialEdges, setEdges])\n\n const onConnect = useCallback(\n (connection: Connection) => {\n if (onConnectProp) {\n onConnectProp(connection)\n } else {\n const newEdge = {\n ...connection,\n type: 'workflowTransition',\n animated: false,\n markerEnd: {\n type: MarkerType.ArrowClosed,\n width: 16,\n height: 16,\n color: '#9ca3af',\n },\n }\n setEdges((eds) => addEdge(newEdge, eds))\n }\n },\n [setEdges, onConnectProp]\n )\n\n const handleNodesChange = useCallback(\n (changes: any) => {\n onNodesChange(changes)\n if (onNodesChangeProp) {\n onNodesChangeProp(changes)\n }\n },\n [onNodesChange, onNodesChangeProp]\n )\n\n const handleEdgesChange = useCallback(\n (changes: any) => {\n onEdgesChange(changes)\n if (onEdgesChangeProp) {\n onEdgesChangeProp(changes)\n }\n },\n [onEdgesChange, onEdgesChangeProp]\n )\n\n const nodeTypes = useMemo(\n () => ({\n start: StartNode,\n end: EndNode,\n userTask: UserTaskNode,\n automated: AutomatedNode,\n subWorkflow: SubWorkflowNode,\n waitForSignal: WaitForSignalNode,\n waitForTimer: WaitForTimerNode,\n }),\n []\n )\n\n const edgeTypes = useMemo(\n () => ({\n workflowTransition: WorkflowTransitionEdge,\n }),\n []\n )\n\n return (\n <div className={`workflow-graph-container ${className}`} style={{ height }}>\n <ReactFlow\n nodes={nodes}\n edges={edges}\n nodeTypes={nodeTypes}\n edgeTypes={edgeTypes}\n onNodesChange={handleNodesChange}\n onEdgesChange={handleEdgesChange}\n onConnect={editable ? onConnect : undefined}\n onNodeClick={onNodeClickProp}\n onEdgeClick={onEdgeClickProp}\n connectionMode={ConnectionMode.Loose}\n fitView\n fitViewOptions={{\n padding: 0.2,\n maxZoom: isCompactViewport ? 0.9 : 1,\n }}\n minZoom={0.1}\n maxZoom={2}\n defaultEdgeOptions={{\n type: 'workflowTransition',\n animated: false,\n markerEnd: {\n type: MarkerType.ArrowClosed,\n width: 16,\n height: 16,\n color: '#9ca3af',\n },\n }}\n nodesDraggable={editable}\n nodesConnectable={editable}\n elementsSelectable={editable}\n proOptions={{ hideAttribution: true }}\n >\n <Background\n variant={BackgroundVariant.Dots}\n gap={16}\n size={1}\n color={backgroundDotColor}\n />\n\n <Controls\n showZoom={true}\n showFitView={true}\n showInteractive={false}\n position={isCompactViewport ? 'bottom-right' : 'top-right'}\n className={`!bg-card !border-border !shadow-md [&>button]:!bg-card [&>button]:!border-border [&>button]:!fill-foreground [&>button:hover]:!bg-muted ${isCompactViewport ? 'scale-90 origin-bottom-right' : ''}`}\n />\n\n {!isCompactViewport && (\n <MiniMap\n nodeStrokeWidth={3}\n nodeColor={(node) => {\n const status = (node.data?.status || 'not_started') as keyof typeof STATUS_COLORS\n return STATUS_COLORS[status]?.hex || STATUS_COLORS.not_started.hex\n }}\n maskColor=\"rgba(0, 0, 0, 0.1)\"\n position=\"bottom-left\"\n className=\"!bg-card !border !border-border !rounded-lg\"\n />\n )}\n\n {!editable && !isCompactViewport && (\n <Panel position=\"top-left\" style={{ margin: 10 }}>\n <div className=\"bg-card rounded-lg shadow-sm border border-border px-4 py-2\">\n <p className=\"text-sm text-muted-foreground font-medium\">\n {t('workflows.graph.visualization')}\n </p>\n </div>\n </Panel>\n )}\n\n {editable && !isCompactViewport && (\n <Panel position=\"top-left\" style={{ margin: 10 }}>\n <Alert variant=\"info\" className=\"max-w-sm\">\n <Edit3 className=\"size-4\" />\n <AlertDescription className=\"font-medium\">\n {t('workflows.graph.editModeInfo')}\n </AlertDescription>\n </Alert>\n </Panel>\n )}\n </ReactFlow>\n </div>\n )\n}\n"],
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport '@xyflow/react/dist/style.css'\n\nimport { useCallback, useMemo, useEffect, useState } from 'react'\nimport {\n ReactFlow,\n Node,\n Edge,\n Controls,\n Background,\n BackgroundVariant,\n MiniMap,\n Panel,\n useNodesState,\n useEdgesState,\n addEdge,\n Connection,\n ConnectionMode,\n MarkerType,\n} from '@xyflow/react'\nimport {StartNode, EndNode, UserTaskNode, AutomatedNode, SubWorkflowNode, WaitForSignalNode, WaitForTimerNode, ParallelForkNode, ParallelJoinNode} from './nodes'\nimport { WorkflowTransitionEdge } from './WorkflowTransitionEdge'\nimport { STATUS_COLORS } from '../lib/status-colors'\nimport { Alert, AlertDescription } from '@open-mercato/ui/primitives/alert'\nimport { Edit3 } from 'lucide-react'\nimport { useTheme } from '@open-mercato/ui/theme'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\n\nexport interface WorkflowGraphImplProps {\n initialNodes?: Node[]\n initialEdges?: Edge[]\n onNodesChange?: (changes: any[]) => void\n onEdgesChange?: (changes: any[]) => void\n onNodeClick?: (event: React.MouseEvent, node: Node) => void\n onEdgeClick?: (event: React.MouseEvent, edge: Edge) => void\n onConnect?: (connection: Connection) => void\n editable?: boolean\n className?: string\n height?: string\n}\n\nexport default function WorkflowGraphImpl({\n initialNodes = [],\n initialEdges = [],\n onNodesChange: onNodesChangeProp,\n onEdgesChange: onEdgesChangeProp,\n onNodeClick: onNodeClickProp,\n onEdgeClick: onEdgeClickProp,\n onConnect: onConnectProp,\n editable = false,\n className = '',\n height = '600px',\n}: WorkflowGraphImplProps) {\n const t = useT()\n const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes)\n const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges)\n\n const { resolvedTheme } = useTheme()\n const isDark = resolvedTheme === 'dark'\n const backgroundDotColor = isDark ? '#374151' : '#e5e7eb'\n const [isCompactViewport, setIsCompactViewport] = useState(false)\n\n useEffect(() => {\n if (typeof window === 'undefined') return\n const mediaQuery = window.matchMedia('(max-width: 1279px)')\n const updateViewportMode = () => setIsCompactViewport(mediaQuery.matches)\n\n updateViewportMode()\n mediaQuery.addEventListener('change', updateViewportMode)\n\n return () => {\n mediaQuery.removeEventListener('change', updateViewportMode)\n }\n }, [])\n\n useEffect(() => {\n setNodes(initialNodes)\n }, [initialNodes, setNodes])\n\n useEffect(() => {\n setEdges(initialEdges)\n }, [initialEdges, setEdges])\n\n const onConnect = useCallback(\n (connection: Connection) => {\n if (onConnectProp) {\n onConnectProp(connection)\n } else {\n const newEdge = {\n ...connection,\n type: 'workflowTransition',\n animated: false,\n markerEnd: {\n type: MarkerType.ArrowClosed,\n width: 16,\n height: 16,\n color: '#9ca3af',\n },\n }\n setEdges((eds) => addEdge(newEdge, eds))\n }\n },\n [setEdges, onConnectProp]\n )\n\n const handleNodesChange = useCallback(\n (changes: any) => {\n onNodesChange(changes)\n if (onNodesChangeProp) {\n onNodesChangeProp(changes)\n }\n },\n [onNodesChange, onNodesChangeProp]\n )\n\n const handleEdgesChange = useCallback(\n (changes: any) => {\n onEdgesChange(changes)\n if (onEdgesChangeProp) {\n onEdgesChangeProp(changes)\n }\n },\n [onEdgesChange, onEdgesChangeProp]\n )\n\n const nodeTypes = useMemo(\n () => ({\n start: StartNode,\n end: EndNode,\n userTask: UserTaskNode,\n automated: AutomatedNode,\n subWorkflow: SubWorkflowNode,\n waitForSignal: WaitForSignalNode,\n waitForTimer: WaitForTimerNode,\n parallelFork: ParallelForkNode,\n parallelJoin: ParallelJoinNode,\n }),\n []\n )\n\n const edgeTypes = useMemo(\n () => ({\n workflowTransition: WorkflowTransitionEdge,\n }),\n []\n )\n\n return (\n <div className={`workflow-graph-container ${className}`} style={{ height }}>\n <ReactFlow\n nodes={nodes}\n edges={edges}\n nodeTypes={nodeTypes}\n edgeTypes={edgeTypes}\n onNodesChange={handleNodesChange}\n onEdgesChange={handleEdgesChange}\n onConnect={editable ? onConnect : undefined}\n onNodeClick={onNodeClickProp}\n onEdgeClick={onEdgeClickProp}\n connectionMode={ConnectionMode.Loose}\n fitView\n fitViewOptions={{\n padding: 0.2,\n maxZoom: isCompactViewport ? 0.9 : 1,\n }}\n minZoom={0.1}\n maxZoom={2}\n defaultEdgeOptions={{\n type: 'workflowTransition',\n animated: false,\n markerEnd: {\n type: MarkerType.ArrowClosed,\n width: 16,\n height: 16,\n color: '#9ca3af',\n },\n }}\n nodesDraggable={editable}\n nodesConnectable={editable}\n elementsSelectable={editable}\n proOptions={{ hideAttribution: true }}\n >\n <Background\n variant={BackgroundVariant.Dots}\n gap={16}\n size={1}\n color={backgroundDotColor}\n />\n\n <Controls\n showZoom={true}\n showFitView={true}\n showInteractive={false}\n position={isCompactViewport ? 'bottom-right' : 'top-right'}\n className={`!bg-card !border-border !shadow-md [&>button]:!bg-card [&>button]:!border-border [&>button]:!fill-foreground [&>button:hover]:!bg-muted ${isCompactViewport ? 'scale-90 origin-bottom-right' : ''}`}\n />\n\n {!isCompactViewport && (\n <MiniMap\n nodeStrokeWidth={3}\n nodeColor={(node) => {\n const status = (node.data?.status || 'not_started') as keyof typeof STATUS_COLORS\n return STATUS_COLORS[status]?.hex || STATUS_COLORS.not_started.hex\n }}\n maskColor=\"rgba(0, 0, 0, 0.1)\"\n position=\"bottom-left\"\n className=\"!bg-card !border !border-border !rounded-lg\"\n />\n )}\n\n {!editable && !isCompactViewport && (\n <Panel position=\"top-left\" style={{ margin: 10 }}>\n <div className=\"bg-card rounded-lg shadow-sm border border-border px-4 py-2\">\n <p className=\"text-sm text-muted-foreground font-medium\">\n {t('workflows.graph.visualization')}\n </p>\n </div>\n </Panel>\n )}\n\n {editable && !isCompactViewport && (\n <Panel position=\"top-left\" style={{ margin: 10 }}>\n <Alert variant=\"info\" className=\"max-w-sm\">\n <Edit3 className=\"size-4\" />\n <AlertDescription className=\"font-medium\">\n {t('workflows.graph.editModeInfo')}\n </AlertDescription>\n </Alert>\n </Panel>\n )}\n </ReactFlow>\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AAuLQ,cAwCI,YAxCJ;AArLR,OAAO;AAEP,SAAS,aAAa,SAAS,WAAW,gBAAgB;AAC1D;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,OACK;AACP,SAAQ,WAAW,SAAS,cAAc,eAAe,iBAAiB,mBAAmB,kBAAkB,kBAAkB,wBAAuB;AACxJ,SAAS,8BAA8B;AACvC,SAAS,qBAAqB;AAC9B,SAAS,OAAO,wBAAwB;AACxC,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB,SAAS,YAAY;AAeN,SAAR,kBAAmC;AAAA,EACxC,eAAe,CAAC;AAAA,EAChB,eAAe,CAAC;AAAA,EAChB,eAAe;AAAA,EACf,eAAe;AAAA,EACf,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,SAAS;AACX,GAA2B;AACzB,QAAM,IAAI,KAAK;AACf,QAAM,CAAC,OAAO,UAAU,aAAa,IAAI,cAAc,YAAY;AACnE,QAAM,CAAC,OAAO,UAAU,aAAa,IAAI,cAAc,YAAY;AAEnE,QAAM,EAAE,cAAc,IAAI,SAAS;AACnC,QAAM,SAAS,kBAAkB;AACjC,QAAM,qBAAqB,SAAS,YAAY;AAChD,QAAM,CAAC,mBAAmB,oBAAoB,IAAI,SAAS,KAAK;AAEhE,YAAU,MAAM;AACd,QAAI,OAAO,WAAW,YAAa;AACnC,UAAM,aAAa,OAAO,WAAW,qBAAqB;AAC1D,UAAM,qBAAqB,MAAM,qBAAqB,WAAW,OAAO;AAExE,uBAAmB;AACnB,eAAW,iBAAiB,UAAU,kBAAkB;AAExD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c,YAAY;AAAA,YACjE;AAAA,YACA,WAAU;AAAA,YACV,UAAS;AAAA,YACT,WAAU;AAAA;AAAA,QACZ;AAAA,QAGD,CAAC,YAAY,CAAC,qBACb,oBAAC,SAAM,UAAS,YAAW,OAAO,EAAE,QAAQ,GAAG,GAC7C,8BAAC,SAAI,WAAU,+DACb,8BAAC,OAAE,WAAU,6CACV,YAAE,+BAA+B,GACpC,GACF,GACF;AAAA,QAGD,YAAY,CAAC,qBACZ,oBAAC,SAAM,UAAS,YAAW,OAAO,EAAE,QAAQ,GAAG,GAC7C,+BAAC,SAAM,SAAQ,QAAO,WAAU,YAC9B;AAAA,8BAAC,SAAM,WAAU,UAAS;AAAA,UAC1B,oBAAC,oBAAiB,WAAU,eACzB,YAAE,8BAA8B,GACnC;AAAA,WACF,GACF;AAAA;AAAA;AAAA,EAEJ,GACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Handle, Position } from "@xyflow/react";
|
|
4
|
+
import { WorkflowNodeCard } from "../WorkflowNodeCard.js";
|
|
5
|
+
function mapStatus(status) {
|
|
6
|
+
if (!status || status === "pending") return "not_started";
|
|
7
|
+
if (status === "running" || status === "in_progress") return "in_progress";
|
|
8
|
+
if (status === "completed") return "completed";
|
|
9
|
+
return "not_started";
|
|
10
|
+
}
|
|
11
|
+
function ParallelForkNode({ data, isConnectable, selected }) {
|
|
12
|
+
const nodeData = data;
|
|
13
|
+
return /* @__PURE__ */ jsxs("div", { className: "parallel-fork-node", title: nodeData.tooltip, children: [
|
|
14
|
+
/* @__PURE__ */ jsx(
|
|
15
|
+
Handle,
|
|
16
|
+
{
|
|
17
|
+
type: "target",
|
|
18
|
+
position: Position.Top,
|
|
19
|
+
id: "target",
|
|
20
|
+
isConnectable,
|
|
21
|
+
className: "!w-3 !h-3 !bg-primary !border-2 !border-background"
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
WorkflowNodeCard,
|
|
26
|
+
{
|
|
27
|
+
title: nodeData.label,
|
|
28
|
+
description: nodeData.description,
|
|
29
|
+
status: mapStatus(nodeData.status),
|
|
30
|
+
nodeType: "parallelFork",
|
|
31
|
+
selected
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
Handle,
|
|
36
|
+
{
|
|
37
|
+
type: "source",
|
|
38
|
+
position: Position.Bottom,
|
|
39
|
+
id: "source",
|
|
40
|
+
isConnectable,
|
|
41
|
+
className: "!w-3 !h-3 !bg-primary !border-2 !border-background"
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] });
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
ParallelForkNode
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=ParallelForkNode.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/modules/workflows/components/nodes/ParallelForkNode.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport { Handle, Position, NodeProps } from '@xyflow/react'\nimport { WorkflowNodeCard } from '../WorkflowNodeCard'\nimport { WorkflowStatus } from '../../lib/status-colors'\n\n/**\n * ParallelForkNode display data.\n *\n * A PARALLEL_FORK splits execution into N branches (one per outgoing `auto`\n * transition) that run concurrently and converge at the paired PARALLEL_JOIN\n * referenced by `joinStepId`.\n */\nexport interface ParallelForkNodeData {\n label: string\n description?: string\n joinStepId?: string\n status?: 'pending' | 'running' | 'completed' | 'error' | 'not_started' | 'in_progress'\n stepNumber?: number\n badge?: string\n tooltip?: string\n executionStatus?: 'completed' | 'active' | 'pending' | 'failed' | 'skipped'\n}\n\nfunction mapStatus(status?: string): WorkflowStatus {\n if (!status || status === 'pending') return 'not_started'\n if (status === 'running' || status === 'in_progress') return 'in_progress'\n if (status === 'completed') return 'completed'\n return 'not_started'\n}\n\n/**\n * ParallelForkNode - splits the workflow into concurrent branches.\n * One target handle (in); one source handle (out) that fans out to each branch.\n */\nexport function ParallelForkNode({ data, isConnectable, selected }: NodeProps) {\n const nodeData = data as unknown as ParallelForkNodeData\n\n return (\n <div className=\"parallel-fork-node\" title={nodeData.tooltip}>\n <Handle\n type=\"target\"\n position={Position.Top}\n id=\"target\"\n isConnectable={isConnectable}\n className=\"!w-3 !h-3 !bg-primary !border-2 !border-background\"\n />\n\n <WorkflowNodeCard\n title={nodeData.label}\n description={nodeData.description}\n status={mapStatus(nodeData.status)}\n nodeType=\"parallelFork\"\n selected={selected}\n />\n\n <Handle\n type=\"source\"\n position={Position.Bottom}\n id=\"source\"\n isConnectable={isConnectable}\n className=\"!w-3 !h-3 !bg-primary !border-2 !border-background\"\n />\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AAuCI,SACE,KADF;AArCJ,SAAS,QAAQ,gBAA2B;AAC5C,SAAS,wBAAwB;AAqBjC,SAAS,UAAU,QAAiC;AAClD,MAAI,CAAC,UAAU,WAAW,UAAW,QAAO;AAC5C,MAAI,WAAW,aAAa,WAAW,cAAe,QAAO;AAC7D,MAAI,WAAW,YAAa,QAAO;AACnC,SAAO;AACT;AAMO,SAAS,iBAAiB,EAAE,MAAM,eAAe,SAAS,GAAc;AAC7E,QAAM,WAAW;AAEjB,SACE,qBAAC,SAAI,WAAU,sBAAqB,OAAO,SAAS,SAClD;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAU,SAAS;AAAA,QACnB,IAAG;AAAA,QACH;AAAA,QACA,WAAU;AAAA;AAAA,IACZ;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,SAAS;AAAA,QAChB,aAAa,SAAS;AAAA,QACtB,QAAQ,UAAU,SAAS,MAAM;AAAA,QACjC,UAAS;AAAA,QACT;AAAA;AAAA,IACF;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAU,SAAS;AAAA,QACnB,IAAG;AAAA,QACH;AAAA,QACA,WAAU;AAAA;AAAA,IACZ;AAAA,KACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Handle, Position } from "@xyflow/react";
|
|
4
|
+
import { WorkflowNodeCard } from "../WorkflowNodeCard.js";
|
|
5
|
+
function mapStatus(status) {
|
|
6
|
+
if (!status || status === "pending") return "not_started";
|
|
7
|
+
if (status === "running" || status === "in_progress") return "in_progress";
|
|
8
|
+
if (status === "completed") return "completed";
|
|
9
|
+
return "not_started";
|
|
10
|
+
}
|
|
11
|
+
function ParallelJoinNode({ data, isConnectable, selected }) {
|
|
12
|
+
const nodeData = data;
|
|
13
|
+
return /* @__PURE__ */ jsxs("div", { className: "parallel-join-node", title: nodeData.tooltip, children: [
|
|
14
|
+
/* @__PURE__ */ jsx(
|
|
15
|
+
Handle,
|
|
16
|
+
{
|
|
17
|
+
type: "target",
|
|
18
|
+
position: Position.Top,
|
|
19
|
+
id: "target",
|
|
20
|
+
isConnectable,
|
|
21
|
+
className: "!w-3 !h-3 !bg-primary !border-2 !border-background"
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
WorkflowNodeCard,
|
|
26
|
+
{
|
|
27
|
+
title: nodeData.label,
|
|
28
|
+
description: nodeData.description,
|
|
29
|
+
status: mapStatus(nodeData.status),
|
|
30
|
+
nodeType: "parallelJoin",
|
|
31
|
+
selected
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
Handle,
|
|
36
|
+
{
|
|
37
|
+
type: "source",
|
|
38
|
+
position: Position.Bottom,
|
|
39
|
+
id: "source",
|
|
40
|
+
isConnectable,
|
|
41
|
+
className: "!w-3 !h-3 !bg-primary !border-2 !border-background"
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] });
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
ParallelJoinNode
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=ParallelJoinNode.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/modules/workflows/components/nodes/ParallelJoinNode.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport { Handle, Position, NodeProps } from '@xyflow/react'\nimport { WorkflowNodeCard } from '../WorkflowNodeCard'\nimport { WorkflowStatus } from '../../lib/status-colors'\n\n/**\n * ParallelJoinNode display data.\n *\n * A PARALLEL_JOIN synchronizes the branches created by its paired\n * PARALLEL_FORK (`forkStepId`) using wait-all semantics, then continues the\n * single outgoing transition once every branch has completed.\n */\nexport interface ParallelJoinNodeData {\n label: string\n description?: string\n forkStepId?: string\n status?: 'pending' | 'running' | 'completed' | 'error' | 'not_started' | 'in_progress'\n stepNumber?: number\n badge?: string\n tooltip?: string\n executionStatus?: 'completed' | 'active' | 'pending' | 'failed' | 'skipped'\n}\n\nfunction mapStatus(status?: string): WorkflowStatus {\n if (!status || status === 'pending') return 'not_started'\n if (status === 'running' || status === 'in_progress') return 'in_progress'\n if (status === 'completed') return 'completed'\n return 'not_started'\n}\n\n/**\n * ParallelJoinNode - synchronizes concurrent branches (wait-all).\n * One target handle (in) collecting all branches; one source handle (out).\n */\nexport function ParallelJoinNode({ data, isConnectable, selected }: NodeProps) {\n const nodeData = data as unknown as ParallelJoinNodeData\n\n return (\n <div className=\"parallel-join-node\" title={nodeData.tooltip}>\n <Handle\n type=\"target\"\n position={Position.Top}\n id=\"target\"\n isConnectable={isConnectable}\n className=\"!w-3 !h-3 !bg-primary !border-2 !border-background\"\n />\n\n <WorkflowNodeCard\n title={nodeData.label}\n description={nodeData.description}\n status={mapStatus(nodeData.status)}\n nodeType=\"parallelJoin\"\n selected={selected}\n />\n\n <Handle\n type=\"source\"\n position={Position.Bottom}\n id=\"source\"\n isConnectable={isConnectable}\n className=\"!w-3 !h-3 !bg-primary !border-2 !border-background\"\n />\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AAuCI,SACE,KADF;AArCJ,SAAS,QAAQ,gBAA2B;AAC5C,SAAS,wBAAwB;AAqBjC,SAAS,UAAU,QAAiC;AAClD,MAAI,CAAC,UAAU,WAAW,UAAW,QAAO;AAC5C,MAAI,WAAW,aAAa,WAAW,cAAe,QAAO;AAC7D,MAAI,WAAW,YAAa,QAAO;AACnC,SAAO;AACT;AAMO,SAAS,iBAAiB,EAAE,MAAM,eAAe,SAAS,GAAc;AAC7E,QAAM,WAAW;AAEjB,SACE,qBAAC,SAAI,WAAU,sBAAqB,OAAO,SAAS,SAClD;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAU,SAAS;AAAA,QACnB,IAAG;AAAA,QACH;AAAA,QACA,WAAU;AAAA;AAAA,IACZ;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,SAAS;AAAA,QAChB,aAAa,SAAS;AAAA,QACtB,QAAQ,UAAU,SAAS,MAAM;AAAA,QACjC,UAAS;AAAA,QACT;AAAA;AAAA,IACF;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAU,SAAS;AAAA,QACnB,IAAG;AAAA,QACH;AAAA,QACA,WAAU;AAAA;AAAA,IACZ;AAAA,KACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -5,9 +5,13 @@ import { AutomatedNode } from "./AutomatedNode.js";
|
|
|
5
5
|
import { SubWorkflowNode } from "./SubWorkflowNode.js";
|
|
6
6
|
import { WaitForSignalNode } from "./WaitForSignalNode.js";
|
|
7
7
|
import { WaitForTimerNode } from "./WaitForTimerNode.js";
|
|
8
|
+
import { ParallelForkNode } from "./ParallelForkNode.js";
|
|
9
|
+
import { ParallelJoinNode } from "./ParallelJoinNode.js";
|
|
8
10
|
export {
|
|
9
11
|
AutomatedNode,
|
|
10
12
|
EndNode,
|
|
13
|
+
ParallelForkNode,
|
|
14
|
+
ParallelJoinNode,
|
|
11
15
|
StartNode,
|
|
12
16
|
SubWorkflowNode,
|
|
13
17
|
UserTaskNode,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/modules/workflows/components/nodes/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { StartNode } from './StartNode'\nexport type { StartNodeData } from './StartNode'\n\nexport { EndNode } from './EndNode'\nexport type { EndNodeData } from './EndNode'\n\nexport { UserTaskNode } from './UserTaskNode'\nexport type { UserTaskNodeData } from './UserTaskNode'\n\nexport { AutomatedNode } from './AutomatedNode'\nexport type { AutomatedNodeData } from './AutomatedNode'\n\nexport { SubWorkflowNode } from './SubWorkflowNode'\nexport type { SubWorkflowNodeData } from './SubWorkflowNode'\n\nexport { WaitForSignalNode } from './WaitForSignalNode'\nexport type { WaitForSignalNodeData } from './WaitForSignalNode'\n\nexport { WaitForTimerNode } from './WaitForTimerNode'\nexport type { WaitForTimerNodeData } from './WaitForTimerNode'\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,iBAAiB;AAG1B,SAAS,eAAe;AAGxB,SAAS,oBAAoB;AAG7B,SAAS,qBAAqB;AAG9B,SAAS,uBAAuB;AAGhC,SAAS,yBAAyB;AAGlC,SAAS,wBAAwB;",
|
|
4
|
+
"sourcesContent": ["export { StartNode } from './StartNode'\nexport type { StartNodeData } from './StartNode'\n\nexport { EndNode } from './EndNode'\nexport type { EndNodeData } from './EndNode'\n\nexport { UserTaskNode } from './UserTaskNode'\nexport type { UserTaskNodeData } from './UserTaskNode'\n\nexport { AutomatedNode } from './AutomatedNode'\nexport type { AutomatedNodeData } from './AutomatedNode'\n\nexport { SubWorkflowNode } from './SubWorkflowNode'\nexport type { SubWorkflowNodeData } from './SubWorkflowNode'\n\nexport { WaitForSignalNode } from './WaitForSignalNode'\nexport type { WaitForSignalNodeData } from './WaitForSignalNode'\n\nexport { WaitForTimerNode } from './WaitForTimerNode'\nexport type { WaitForTimerNodeData } from './WaitForTimerNode'\n\nexport { ParallelForkNode } from './ParallelForkNode'\nexport type { ParallelForkNodeData } from './ParallelForkNode'\n\nexport { ParallelJoinNode } from './ParallelJoinNode'\nexport type { ParallelJoinNodeData } from './ParallelJoinNode'\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,iBAAiB;AAG1B,SAAS,eAAe;AAGxB,SAAS,oBAAoB;AAG7B,SAAS,qBAAqB;AAG9B,SAAS,uBAAuB;AAGhC,SAAS,yBAAyB;AAGlC,SAAS,wBAAwB;AAGjC,SAAS,wBAAwB;AAGjC,SAAS,wBAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -136,6 +136,9 @@ __decorateClass([
|
|
|
136
136
|
__decorateClass([
|
|
137
137
|
Property({ name: "pending_transition", type: "jsonb", nullable: true })
|
|
138
138
|
], WorkflowInstance.prototype, "pendingTransition", 2);
|
|
139
|
+
__decorateClass([
|
|
140
|
+
Property({ name: "active_fork_step_id", type: "varchar", length: 100, nullable: true })
|
|
141
|
+
], WorkflowInstance.prototype, "activeForkStepId", 2);
|
|
139
142
|
__decorateClass([
|
|
140
143
|
Property({ name: "retry_count", type: "integer", default: 0 })
|
|
141
144
|
], WorkflowInstance.prototype, "retryCount", 2);
|
|
@@ -163,6 +166,73 @@ WorkflowInstance = __decorateClass([
|
|
|
163
166
|
Index({ name: "workflow_instances_tenant_org_idx", properties: ["tenantId", "organizationId"] })
|
|
164
167
|
], WorkflowInstance);
|
|
165
168
|
OptionalProps;
|
|
169
|
+
let WorkflowBranchInstance = class {
|
|
170
|
+
constructor() {
|
|
171
|
+
this.createdAt = /* @__PURE__ */ new Date();
|
|
172
|
+
this.updatedAt = /* @__PURE__ */ new Date();
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
__decorateClass([
|
|
176
|
+
PrimaryKey({ type: "uuid", defaultRaw: "gen_random_uuid()" })
|
|
177
|
+
], WorkflowBranchInstance.prototype, "id", 2);
|
|
178
|
+
__decorateClass([
|
|
179
|
+
Property({ name: "workflow_instance_id", type: "uuid" })
|
|
180
|
+
], WorkflowBranchInstance.prototype, "workflowInstanceId", 2);
|
|
181
|
+
__decorateClass([
|
|
182
|
+
Property({ name: "fork_step_id", type: "varchar", length: 100 })
|
|
183
|
+
], WorkflowBranchInstance.prototype, "forkStepId", 2);
|
|
184
|
+
__decorateClass([
|
|
185
|
+
Property({ name: "join_step_id", type: "varchar", length: 100 })
|
|
186
|
+
], WorkflowBranchInstance.prototype, "joinStepId", 2);
|
|
187
|
+
__decorateClass([
|
|
188
|
+
Property({ name: "branch_key", type: "varchar", length: 100 })
|
|
189
|
+
], WorkflowBranchInstance.prototype, "branchKey", 2);
|
|
190
|
+
__decorateClass([
|
|
191
|
+
Property({ name: "parent_branch_id", type: "uuid", nullable: true })
|
|
192
|
+
], WorkflowBranchInstance.prototype, "parentBranchId", 2);
|
|
193
|
+
__decorateClass([
|
|
194
|
+
Property({ name: "current_step_id", type: "varchar", length: 100 })
|
|
195
|
+
], WorkflowBranchInstance.prototype, "currentStepId", 2);
|
|
196
|
+
__decorateClass([
|
|
197
|
+
Property({ name: "status", type: "varchar", length: 30 })
|
|
198
|
+
], WorkflowBranchInstance.prototype, "status", 2);
|
|
199
|
+
__decorateClass([
|
|
200
|
+
Property({ name: "context_namespace", type: "jsonb" })
|
|
201
|
+
], WorkflowBranchInstance.prototype, "contextNamespace", 2);
|
|
202
|
+
__decorateClass([
|
|
203
|
+
Property({ name: "pending_transition", type: "jsonb", nullable: true })
|
|
204
|
+
], WorkflowBranchInstance.prototype, "pendingTransition", 2);
|
|
205
|
+
__decorateClass([
|
|
206
|
+
Property({ name: "error_message", type: "text", nullable: true })
|
|
207
|
+
], WorkflowBranchInstance.prototype, "errorMessage", 2);
|
|
208
|
+
__decorateClass([
|
|
209
|
+
Property({ name: "error_details", type: "jsonb", nullable: true })
|
|
210
|
+
], WorkflowBranchInstance.prototype, "errorDetails", 2);
|
|
211
|
+
__decorateClass([
|
|
212
|
+
Property({ name: "started_at", type: Date, nullable: true })
|
|
213
|
+
], WorkflowBranchInstance.prototype, "startedAt", 2);
|
|
214
|
+
__decorateClass([
|
|
215
|
+
Property({ name: "completed_at", type: Date, nullable: true })
|
|
216
|
+
], WorkflowBranchInstance.prototype, "completedAt", 2);
|
|
217
|
+
__decorateClass([
|
|
218
|
+
Property({ name: "tenant_id", type: "uuid" })
|
|
219
|
+
], WorkflowBranchInstance.prototype, "tenantId", 2);
|
|
220
|
+
__decorateClass([
|
|
221
|
+
Property({ name: "organization_id", type: "uuid" })
|
|
222
|
+
], WorkflowBranchInstance.prototype, "organizationId", 2);
|
|
223
|
+
__decorateClass([
|
|
224
|
+
Property({ name: "created_at", type: Date, onCreate: () => /* @__PURE__ */ new Date() })
|
|
225
|
+
], WorkflowBranchInstance.prototype, "createdAt", 2);
|
|
226
|
+
__decorateClass([
|
|
227
|
+
Property({ name: "updated_at", type: Date, onUpdate: () => /* @__PURE__ */ new Date() })
|
|
228
|
+
], WorkflowBranchInstance.prototype, "updatedAt", 2);
|
|
229
|
+
WorkflowBranchInstance = __decorateClass([
|
|
230
|
+
Entity({ tableName: "workflow_branch_instances" }),
|
|
231
|
+
Index({ name: "workflow_branch_instances_instance_status_idx", properties: ["workflowInstanceId", "status"] }),
|
|
232
|
+
Index({ name: "workflow_branch_instances_instance_fork_idx", properties: ["workflowInstanceId", "forkStepId"] }),
|
|
233
|
+
Index({ name: "workflow_branch_instances_tenant_org_idx", properties: ["tenantId", "organizationId"] })
|
|
234
|
+
], WorkflowBranchInstance);
|
|
235
|
+
OptionalProps;
|
|
166
236
|
let StepInstance = class {
|
|
167
237
|
constructor() {
|
|
168
238
|
this.retryCount = 0;
|
|
@@ -176,6 +246,9 @@ __decorateClass([
|
|
|
176
246
|
__decorateClass([
|
|
177
247
|
Property({ name: "workflow_instance_id", type: "uuid" })
|
|
178
248
|
], StepInstance.prototype, "workflowInstanceId", 2);
|
|
249
|
+
__decorateClass([
|
|
250
|
+
Property({ name: "branch_instance_id", type: "uuid", nullable: true })
|
|
251
|
+
], StepInstance.prototype, "branchInstanceId", 2);
|
|
179
252
|
__decorateClass([
|
|
180
253
|
Property({ name: "step_id", type: "varchar", length: 100 })
|
|
181
254
|
], StepInstance.prototype, "stepId", 2);
|
|
@@ -243,6 +316,9 @@ __decorateClass([
|
|
|
243
316
|
__decorateClass([
|
|
244
317
|
Property({ name: "step_instance_id", type: "uuid" })
|
|
245
318
|
], UserTask.prototype, "stepInstanceId", 2);
|
|
319
|
+
__decorateClass([
|
|
320
|
+
Property({ name: "branch_instance_id", type: "uuid", nullable: true })
|
|
321
|
+
], UserTask.prototype, "branchInstanceId", 2);
|
|
246
322
|
__decorateClass([
|
|
247
323
|
Property({ name: "task_name", type: "varchar", length: 255 })
|
|
248
324
|
], UserTask.prototype, "taskName", 2);
|
|
@@ -321,6 +397,9 @@ __decorateClass([
|
|
|
321
397
|
__decorateClass([
|
|
322
398
|
Property({ name: "step_instance_id", type: "uuid", nullable: true })
|
|
323
399
|
], WorkflowEvent.prototype, "stepInstanceId", 2);
|
|
400
|
+
__decorateClass([
|
|
401
|
+
Property({ name: "branch_instance_id", type: "uuid", nullable: true })
|
|
402
|
+
], WorkflowEvent.prototype, "branchInstanceId", 2);
|
|
324
403
|
__decorateClass([
|
|
325
404
|
Property({ name: "event_type", type: "varchar", length: 50 })
|
|
326
405
|
], WorkflowEvent.prototype, "eventType", 2);
|
|
@@ -409,6 +488,7 @@ WorkflowEventTrigger = __decorateClass([
|
|
|
409
488
|
var entities_default = [
|
|
410
489
|
WorkflowDefinition,
|
|
411
490
|
WorkflowInstance,
|
|
491
|
+
WorkflowBranchInstance,
|
|
412
492
|
StepInstance,
|
|
413
493
|
UserTask,
|
|
414
494
|
WorkflowEvent,
|
|
@@ -417,6 +497,7 @@ var entities_default = [
|
|
|
417
497
|
export {
|
|
418
498
|
StepInstance,
|
|
419
499
|
UserTask,
|
|
500
|
+
WorkflowBranchInstance,
|
|
420
501
|
WorkflowDefinition,
|
|
421
502
|
WorkflowEvent,
|
|
422
503
|
WorkflowEventTrigger,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/modules/workflows/data/entities.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Workflows Module - Database Entities\n *\n * MikroORM entities for workflow engine.\n */\n\nimport { OptionalProps } from '@mikro-orm/core'\nimport { Entity, Index, PrimaryKey, Property, Unique } from '@mikro-orm/decorators/legacy'\n\n// ============================================================================\n// Type Definitions\n// ============================================================================\n\nexport type WorkflowStepType =\n | 'START'\n | 'END'\n | 'USER_TASK'\n | 'AUTOMATED'\n | 'PARALLEL_FORK'\n | 'PARALLEL_JOIN'\n | 'SUB_WORKFLOW'\n | 'WAIT_FOR_SIGNAL'\n | 'WAIT_FOR_TIMER'\n\nexport type WorkflowInstanceStatus =\n | 'RUNNING'\n | 'PAUSED'\n | 'COMPLETED'\n | 'FAILED'\n | 'CANCELLED'\n | 'COMPENSATING'\n | 'COMPENSATED'\n | 'WAITING_FOR_ACTIVITIES'\n\nexport type StepInstanceStatus =\n | 'PENDING'\n | 'ACTIVE'\n | 'COMPLETED'\n | 'FAILED'\n | 'SKIPPED'\n | 'CANCELLED'\n\nexport type UserTaskStatus =\n | 'PENDING'\n | 'IN_PROGRESS'\n | 'COMPLETED'\n | 'CANCELLED'\n | 'ESCALATED'\n\n// ============================================================================\n// Event Trigger Types\n// ============================================================================\n\nexport type TriggerFilterOperator =\n | 'eq'\n | 'neq'\n | 'gt'\n | 'gte'\n | 'lt'\n | 'lte'\n | 'contains'\n | 'startsWith'\n | 'endsWith'\n | 'in'\n | 'notIn'\n | 'exists'\n | 'notExists'\n | 'regex'\n\nexport interface TriggerFilterCondition {\n field: string // JSON path (e.g., \"status\", \"metadata.type\")\n operator: TriggerFilterOperator\n value: unknown\n}\n\nexport interface TriggerContextMapping {\n targetKey: string // Key in workflow initial context\n sourceExpression: string // Path from event payload (supports dot notation)\n defaultValue?: unknown\n}\n\nexport interface WorkflowEventTriggerConfig {\n filterConditions?: TriggerFilterCondition[]\n contextMapping?: TriggerContextMapping[]\n debounceMs?: number // Debounce rapid events\n maxConcurrentInstances?: number // Limit concurrent instances\n entityType?: string // Entity type for workflow instance metadata (e.g., \"SalesOrder\")\n}\n\n/**\n * WorkflowDefinitionTrigger - Embedded trigger configuration\n *\n * Triggers are now embedded directly in the workflow definition,\n * allowing users to configure event-based workflow starts during\n * workflow creation in the visual editor.\n */\nexport interface WorkflowDefinitionTrigger {\n triggerId: string\n name: string\n description?: string | null\n eventPattern: string // e.g., \"sales.orders.created\", \"customers.*\"\n config?: WorkflowEventTriggerConfig | null\n enabled: boolean\n priority: number\n}\n\n// ============================================================================\n// JSONB Structure Interfaces\n// ============================================================================\n\nexport interface WorkflowDefinitionData {\n steps: any[] // WorkflowStep[] - will define schema in validators.ts\n transitions: any[] // WorkflowTransition[] - will define schema in validators.ts\n triggers?: WorkflowDefinitionTrigger[] // Event triggers for automatic workflow start\n activities?: any[] // ActivityDefinition[] - will define schema in validators.ts\n queries?: any[]\n signals?: any[]\n timers?: any[]\n}\n\nexport interface WorkflowMetadata {\n tags?: string[]\n category?: string\n icon?: string\n}\n\nexport interface WorkflowInstanceMetadata {\n entityType?: string\n entityId?: string\n initiatedBy?: string\n labels?: Record<string, string>\n}\n\n// ============================================================================\n// Entity: WorkflowDefinition\n// ============================================================================\n\n/**\n * WorkflowDefinition entity\n *\n * Stores workflow definitions (templates) that can be instantiated\n * to create workflow instances.\n */\n@Entity({ tableName: 'workflow_definitions' })\n@Unique({ properties: ['workflowId', 'tenantId'] })\n@Index({ name: 'workflow_definitions_enabled_idx', properties: ['enabled'] })\n@Index({ name: 'workflow_definitions_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'workflow_definitions_workflow_id_idx', properties: ['workflowId'] })\nexport class WorkflowDefinition {\n [OptionalProps]?: 'enabled' | 'version' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'codeWorkflowId'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'workflow_id', type: 'varchar', length: 100 })\n workflowId!: string\n\n @Property({ name: 'code_workflow_id', type: 'varchar', length: 100, nullable: true })\n codeWorkflowId?: string | null\n\n @Property({ name: 'workflow_name', type: 'varchar', length: 255 })\n workflowName!: string\n\n @Property({ name: 'description', type: 'text', nullable: true })\n description?: string | null\n\n @Property({ name: 'version', type: 'integer', default: 1 })\n version: number = 1\n\n @Property({ name: 'definition', type: 'jsonb' })\n definition!: WorkflowDefinitionData\n\n @Property({ name: 'metadata', type: 'jsonb', nullable: true })\n metadata?: WorkflowMetadata | null\n\n @Property({ name: 'enabled', type: 'boolean', default: true })\n enabled: boolean = true\n\n @Property({ name: 'effective_from', type: Date, nullable: true })\n effectiveFrom?: Date | null\n\n @Property({ name: 'effective_to', type: Date, nullable: true })\n effectiveTo?: Date | null\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'created_by', type: 'varchar', length: 255, nullable: true })\n createdBy?: string | null\n\n @Property({ name: 'updated_by', type: 'varchar', length: 255, nullable: true })\n updatedBy?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n// ============================================================================\n// Entity: WorkflowInstance\n// ============================================================================\n\n/**\n * WorkflowInstance entity\n *\n * Represents a running instance of a workflow definition.\n * Tracks the current state, context data, and execution status.\n */\n@Entity({ tableName: 'workflow_instances' })\n@Index({ name: 'workflow_instances_definition_status_idx', properties: ['definitionId', 'status'] })\n@Index({ name: 'workflow_instances_correlation_key_idx', properties: ['correlationKey'] })\n@Index({ name: 'workflow_instances_status_tenant_idx', properties: ['status', 'tenantId'] })\n@Index({ name: 'workflow_instances_current_step_idx', properties: ['currentStepId', 'status'] })\n@Index({ name: 'workflow_instances_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\nexport class WorkflowInstance {\n [OptionalProps]?: 'retryCount' | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'definition_id', type: 'uuid' })\n definitionId!: string\n\n @Property({ name: 'workflow_id', type: 'varchar', length: 100 })\n workflowId!: string\n\n @Property({ name: 'version', type: 'integer' })\n version!: number\n\n @Property({ name: 'status', type: 'varchar', length: 30 })\n status!: WorkflowInstanceStatus\n\n @Property({ name: 'current_step_id', type: 'varchar', length: 100 })\n currentStepId!: string\n\n @Property({ name: 'context', type: 'jsonb' })\n context!: Record<string, any>\n\n @Property({ name: 'correlation_key', type: 'varchar', length: 255, nullable: true })\n correlationKey?: string | null\n\n @Property({ name: 'metadata', type: 'jsonb', nullable: true })\n metadata?: WorkflowInstanceMetadata | null\n\n @Property({ name: 'started_at', type: Date })\n startedAt!: Date\n\n @Property({ name: 'completed_at', type: Date, nullable: true })\n completedAt?: Date | null\n\n @Property({ name: 'paused_at', type: Date, nullable: true })\n pausedAt?: Date | null\n\n @Property({ name: 'cancelled_at', type: Date, nullable: true })\n cancelledAt?: Date | null\n\n @Property({ name: 'error_message', type: 'text', nullable: true })\n errorMessage?: string | null\n\n @Property({ name: 'error_details', type: 'jsonb', nullable: true })\n errorDetails?: any | null\n\n @Property({ name: 'pending_transition', type: 'jsonb', nullable: true })\n pendingTransition?: {\n toStepId: string\n activityResults: any[]\n timestamp: Date\n } | null\n\n @Property({ name: 'retry_count', type: 'integer', default: 0 })\n retryCount: number = 0\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n// ============================================================================\n// Entity: StepInstance\n// ============================================================================\n\n/**\n * StepInstance entity\n *\n * Tracks individual step executions within a workflow instance.\n * Records input/output data, timing, and execution status for each step.\n */\n@Entity({ tableName: 'step_instances' })\n@Index({ name: 'step_instances_workflow_instance_idx', properties: ['workflowInstanceId', 'status'] })\n@Index({ name: 'step_instances_step_id_idx', properties: ['stepId', 'status'] })\n@Index({ name: 'step_instances_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\nexport class StepInstance {\n [OptionalProps]?: 'retryCount' | 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'workflow_instance_id', type: 'uuid' })\n workflowInstanceId!: string\n\n @Property({ name: 'step_id', type: 'varchar', length: 100 })\n stepId!: string\n\n @Property({ name: 'step_name', type: 'varchar', length: 255 })\n stepName!: string\n\n @Property({ name: 'step_type', type: 'varchar', length: 50 })\n stepType!: string\n\n @Property({ name: 'status', type: 'varchar', length: 20 })\n status!: StepInstanceStatus\n\n @Property({ name: 'input_data', type: 'jsonb', nullable: true })\n inputData?: any | null\n\n @Property({ name: 'output_data', type: 'jsonb', nullable: true })\n outputData?: any | null\n\n @Property({ name: 'error_data', type: 'jsonb', nullable: true })\n errorData?: any | null\n\n @Property({ name: 'entered_at', type: Date, nullable: true })\n enteredAt?: Date | null\n\n @Property({ name: 'exited_at', type: Date, nullable: true })\n exitedAt?: Date | null\n\n @Property({ name: 'execution_time_ms', type: 'integer', nullable: true })\n executionTimeMs?: number | null\n\n @Property({ name: 'retry_count', type: 'integer', default: 0 })\n retryCount: number = 0\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n// ============================================================================\n// Entity: UserTask\n// ============================================================================\n\n/**\n * UserTask entity\n *\n * Represents user tasks that require human interaction within a workflow.\n * Tracks assignment, SLA, escalation, and completion status.\n */\n@Entity({ tableName: 'user_tasks' })\n@Index({ name: 'user_tasks_workflow_instance_idx', properties: ['workflowInstanceId'] })\n@Index({ name: 'user_tasks_status_assigned_idx', properties: ['status', 'assignedTo'] })\n@Index({ name: 'user_tasks_status_due_date_idx', properties: ['status', 'dueDate'] })\n@Index({ name: 'user_tasks_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\nexport class UserTask {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'workflow_instance_id', type: 'uuid' })\n workflowInstanceId!: string\n\n @Property({ name: 'step_instance_id', type: 'uuid' })\n stepInstanceId!: string\n\n @Property({ name: 'task_name', type: 'varchar', length: 255 })\n taskName!: string\n\n @Property({ name: 'description', type: 'text', nullable: true })\n description?: string | null\n\n @Property({ name: 'status', type: 'varchar', length: 20 })\n status!: UserTaskStatus\n\n @Property({ name: 'form_schema', type: 'jsonb', nullable: true })\n formSchema?: any | null\n\n @Property({ name: 'form_data', type: 'jsonb', nullable: true })\n formData?: any | null\n\n @Property({ name: 'assigned_to', type: 'varchar', length: 255, nullable: true })\n assignedTo?: string | null\n\n @Property({ name: 'assigned_to_roles', type: 'text[]', nullable: true })\n assignedToRoles?: string[] | null\n\n @Property({ name: 'claimed_by', type: 'varchar', length: 255, nullable: true })\n claimedBy?: string | null\n\n @Property({ name: 'claimed_at', type: Date, nullable: true })\n claimedAt?: Date | null\n\n @Property({ name: 'due_date', type: Date, nullable: true })\n dueDate?: Date | null\n\n @Property({ name: 'escalated_at', type: Date, nullable: true })\n escalatedAt?: Date | null\n\n @Property({ name: 'escalated_to', type: 'varchar', length: 255, nullable: true })\n escalatedTo?: string | null\n\n @Property({ name: 'completed_by', type: 'varchar', length: 255, nullable: true })\n completedBy?: string | null\n\n @Property({ name: 'completed_at', type: Date, nullable: true })\n completedAt?: Date | null\n\n @Property({ name: 'comments', type: 'text', nullable: true })\n comments?: string | null\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n// ============================================================================\n// Entity: WorkflowEvent\n// ============================================================================\n\n/**\n * WorkflowEvent entity\n *\n * Event sourcing log for workflow execution history.\n * Records all events that occur during workflow execution for audit and replay.\n */\n@Entity({ tableName: 'workflow_events' })\n@Index({ name: 'workflow_events_instance_occurred_idx', properties: ['workflowInstanceId', 'occurredAt'] })\n@Index({ name: 'workflow_events_event_type_idx', properties: ['eventType', 'occurredAt'] })\n@Index({ name: 'workflow_events_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\nexport class WorkflowEvent {\n @PrimaryKey({ type: 'bigint', autoincrement: true })\n id!: string\n\n @Property({ name: 'workflow_instance_id', type: 'uuid' })\n workflowInstanceId!: string\n\n @Property({ name: 'step_instance_id', type: 'uuid', nullable: true })\n stepInstanceId?: string | null\n\n @Property({ name: 'event_type', type: 'varchar', length: 50 })\n eventType!: string\n\n @Property({ name: 'event_data', type: 'jsonb' })\n eventData!: any\n\n @Property({ name: 'occurred_at', type: Date, onCreate: () => new Date() })\n occurredAt: Date = new Date()\n\n @Property({ name: 'user_id', type: 'varchar', length: 255, nullable: true })\n userId?: string | null\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n}\n\n// ============================================================================\n// Entity: WorkflowEventTrigger\n// ============================================================================\n\n/**\n * WorkflowEventTrigger entity\n *\n * Maps event patterns to workflow definitions for automatic triggering.\n * When a matching event is emitted, the corresponding workflow is started\n * with context mapped from the event payload.\n */\n@Entity({ tableName: 'workflow_event_triggers' })\n@Index({ name: 'workflow_event_triggers_event_pattern_idx', properties: ['eventPattern', 'enabled'] })\n@Index({ name: 'workflow_event_triggers_definition_idx', properties: ['workflowDefinitionId'] })\n@Index({ name: 'workflow_event_triggers_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'workflow_event_triggers_enabled_priority_idx', properties: ['enabled', 'priority'] })\nexport class WorkflowEventTrigger {\n [OptionalProps]?: 'enabled' | 'priority' | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'name', type: 'varchar', length: 255 })\n name!: string\n\n @Property({ name: 'description', type: 'text', nullable: true })\n description?: string | null\n\n @Property({ name: 'workflow_definition_id', type: 'uuid' })\n workflowDefinitionId!: string\n\n @Property({ name: 'event_pattern', type: 'varchar', length: 255 })\n eventPattern!: string\n\n @Property({ name: 'config', type: 'jsonb', nullable: true })\n config?: WorkflowEventTriggerConfig | null\n\n @Property({ name: 'enabled', type: 'boolean', default: true })\n enabled: boolean = true\n\n @Property({ name: 'priority', type: 'integer', default: 0 })\n priority: number = 0\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'created_by', type: 'varchar', length: 255, nullable: true })\n createdBy?: string | null\n\n @Property({ name: 'updated_by', type: 'varchar', length: 255, nullable: true })\n updatedBy?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n// Export all entities as default for MikroORM discovery\nexport default [\n WorkflowDefinition,\n WorkflowInstance,\n StepInstance,\n UserTask,\n WorkflowEvent,\n WorkflowEventTrigger,\n]\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;AAMA,SAAS,qBAAqB;AAC9B,SAAS,QAAQ,OAAO,YAAY,UAAU,cAAc;AA8IzD;AADI,IAAM,qBAAN,MAAyB;AAAA,EAAzB;AAmBL,mBAAkB;AASlB,mBAAmB;AAqBnB,qBAAkB,oBAAI,KAAK;AAG3B,qBAAkB,oBAAI,KAAK;AAAA;AAI7B;AApDE;AAAA,EADC,WAAW,EAAE,MAAM,QAAQ,YAAY,oBAAoB,CAAC;AAAA,GAHlD,mBAIX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,eAAe,MAAM,WAAW,QAAQ,IAAI,CAAC;AAAA,GANpD,mBAOX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,oBAAoB,MAAM,WAAW,QAAQ,KAAK,UAAU,KAAK,CAAC;AAAA,GATzE,mBAUX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,iBAAiB,MAAM,WAAW,QAAQ,IAAI,CAAC;AAAA,GAZtD,mBAaX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,eAAe,MAAM,QAAQ,UAAU,KAAK,CAAC;AAAA,GAfpD,mBAgBX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,WAAW,MAAM,WAAW,SAAS,EAAE,CAAC;AAAA,GAlB/C,mBAmBX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,cAAc,MAAM,QAAQ,C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AAAA,EADC,SAAS,EAAE,MAAM,cAAc,MAAM,MAAM,UAAU,MAAM,oBAAI,KAAK,EAAE,CAAC;AAAA,GAvC7D,qBAwCX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,cAAc,MAAM,MAAM,UAAU,MAAM,oBAAI,KAAK,EAAE,CAAC;AAAA,GA1C7D,qBA2CX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,cAAc,MAAM,MAAM,UAAU,KAAK,CAAC;AAAA,GA7CjD,qBA8CX;AA9CW,uBAAN;AAAA,EALN,OAAO,EAAE,WAAW,0BAA0B,CAAC;AAAA,EAC/C,MAAM,EAAE,MAAM,6CAA6C,YAAY,CAAC,gBAAgB,SAAS,EAAE,CAAC;AAAA,EACpG,MAAM,EAAE,MAAM,0CAA0C,YAAY,CAAC,sBAAsB,EAAE,CAAC;AAAA,EAC9F,MAAM,EAAE,MAAM,0CAA0C,YAAY,CAAC,YAAY,gBAAgB,EAAE,CAAC;AAAA,EACpG,MAAM,EAAE,MAAM,gDAAgD,YAAY,CAAC,WAAW,UAAU,EAAE,CAAC;AAAA,GACvF;AAkDb,IAAO,mBAAQ;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
|
|
4
|
+
"sourcesContent": ["/**\n * Workflows Module - Database Entities\n *\n * MikroORM entities for workflow engine.\n */\n\nimport { OptionalProps } from '@mikro-orm/core'\nimport { Entity, Index, PrimaryKey, Property, Unique } from '@mikro-orm/decorators/legacy'\n\n// ============================================================================\n// Type Definitions\n// ============================================================================\n\nexport type WorkflowStepType =\n | 'START'\n | 'END'\n | 'USER_TASK'\n | 'AUTOMATED'\n | 'PARALLEL_FORK'\n | 'PARALLEL_JOIN'\n | 'SUB_WORKFLOW'\n | 'WAIT_FOR_SIGNAL'\n | 'WAIT_FOR_TIMER'\n\nexport type WorkflowInstanceStatus =\n | 'RUNNING'\n | 'PAUSED'\n | 'COMPLETED'\n | 'FAILED'\n | 'CANCELLED'\n | 'COMPENSATING'\n | 'COMPENSATED'\n | 'WAITING_FOR_ACTIVITIES'\n | 'FORKED'\n\nexport type WorkflowBranchInstanceStatus =\n | 'ACTIVE'\n | 'PAUSED'\n | 'WAITING_FOR_ACTIVITIES'\n | 'COMPLETED'\n | 'FAILED'\n | 'CANCELLED'\n\nexport type StepInstanceStatus =\n | 'PENDING'\n | 'ACTIVE'\n | 'COMPLETED'\n | 'FAILED'\n | 'SKIPPED'\n | 'CANCELLED'\n\nexport type UserTaskStatus =\n | 'PENDING'\n | 'IN_PROGRESS'\n | 'COMPLETED'\n | 'CANCELLED'\n | 'ESCALATED'\n\n// ============================================================================\n// Event Trigger Types\n// ============================================================================\n\nexport type TriggerFilterOperator =\n | 'eq'\n | 'neq'\n | 'gt'\n | 'gte'\n | 'lt'\n | 'lte'\n | 'contains'\n | 'startsWith'\n | 'endsWith'\n | 'in'\n | 'notIn'\n | 'exists'\n | 'notExists'\n | 'regex'\n\nexport interface TriggerFilterCondition {\n field: string // JSON path (e.g., \"status\", \"metadata.type\")\n operator: TriggerFilterOperator\n value: unknown\n}\n\nexport interface TriggerContextMapping {\n targetKey: string // Key in workflow initial context\n sourceExpression: string // Path from event payload (supports dot notation)\n defaultValue?: unknown\n}\n\nexport interface WorkflowEventTriggerConfig {\n filterConditions?: TriggerFilterCondition[]\n contextMapping?: TriggerContextMapping[]\n debounceMs?: number // Debounce rapid events\n maxConcurrentInstances?: number // Limit concurrent instances\n entityType?: string // Entity type for workflow instance metadata (e.g., \"SalesOrder\")\n}\n\n/**\n * WorkflowDefinitionTrigger - Embedded trigger configuration\n *\n * Triggers are now embedded directly in the workflow definition,\n * allowing users to configure event-based workflow starts during\n * workflow creation in the visual editor.\n */\nexport interface WorkflowDefinitionTrigger {\n triggerId: string\n name: string\n description?: string | null\n eventPattern: string // e.g., \"sales.orders.created\", \"customers.*\"\n config?: WorkflowEventTriggerConfig | null\n enabled: boolean\n priority: number\n}\n\n// ============================================================================\n// JSONB Structure Interfaces\n// ============================================================================\n\nexport interface WorkflowDefinitionData {\n steps: any[] // WorkflowStep[] - will define schema in validators.ts\n transitions: any[] // WorkflowTransition[] - will define schema in validators.ts\n triggers?: WorkflowDefinitionTrigger[] // Event triggers for automatic workflow start\n activities?: any[] // ActivityDefinition[] - will define schema in validators.ts\n queries?: any[]\n signals?: any[]\n timers?: any[]\n}\n\nexport interface WorkflowMetadata {\n tags?: string[]\n category?: string\n icon?: string\n}\n\nexport interface WorkflowInstanceMetadata {\n entityType?: string\n entityId?: string\n initiatedBy?: string\n labels?: Record<string, string>\n}\n\n// ============================================================================\n// Entity: WorkflowDefinition\n// ============================================================================\n\n/**\n * WorkflowDefinition entity\n *\n * Stores workflow definitions (templates) that can be instantiated\n * to create workflow instances.\n */\n@Entity({ tableName: 'workflow_definitions' })\n@Unique({ properties: ['workflowId', 'tenantId'] })\n@Index({ name: 'workflow_definitions_enabled_idx', properties: ['enabled'] })\n@Index({ name: 'workflow_definitions_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'workflow_definitions_workflow_id_idx', properties: ['workflowId'] })\nexport class WorkflowDefinition {\n [OptionalProps]?: 'enabled' | 'version' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'codeWorkflowId'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'workflow_id', type: 'varchar', length: 100 })\n workflowId!: string\n\n @Property({ name: 'code_workflow_id', type: 'varchar', length: 100, nullable: true })\n codeWorkflowId?: string | null\n\n @Property({ name: 'workflow_name', type: 'varchar', length: 255 })\n workflowName!: string\n\n @Property({ name: 'description', type: 'text', nullable: true })\n description?: string | null\n\n @Property({ name: 'version', type: 'integer', default: 1 })\n version: number = 1\n\n @Property({ name: 'definition', type: 'jsonb' })\n definition!: WorkflowDefinitionData\n\n @Property({ name: 'metadata', type: 'jsonb', nullable: true })\n metadata?: WorkflowMetadata | null\n\n @Property({ name: 'enabled', type: 'boolean', default: true })\n enabled: boolean = true\n\n @Property({ name: 'effective_from', type: Date, nullable: true })\n effectiveFrom?: Date | null\n\n @Property({ name: 'effective_to', type: Date, nullable: true })\n effectiveTo?: Date | null\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'created_by', type: 'varchar', length: 255, nullable: true })\n createdBy?: string | null\n\n @Property({ name: 'updated_by', type: 'varchar', length: 255, nullable: true })\n updatedBy?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n// ============================================================================\n// Entity: WorkflowInstance\n// ============================================================================\n\n/**\n * WorkflowInstance entity\n *\n * Represents a running instance of a workflow definition.\n * Tracks the current state, context data, and execution status.\n */\n@Entity({ tableName: 'workflow_instances' })\n@Index({ name: 'workflow_instances_definition_status_idx', properties: ['definitionId', 'status'] })\n@Index({ name: 'workflow_instances_correlation_key_idx', properties: ['correlationKey'] })\n@Index({ name: 'workflow_instances_status_tenant_idx', properties: ['status', 'tenantId'] })\n@Index({ name: 'workflow_instances_current_step_idx', properties: ['currentStepId', 'status'] })\n@Index({ name: 'workflow_instances_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\nexport class WorkflowInstance {\n [OptionalProps]?: 'retryCount' | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'definition_id', type: 'uuid' })\n definitionId!: string\n\n @Property({ name: 'workflow_id', type: 'varchar', length: 100 })\n workflowId!: string\n\n @Property({ name: 'version', type: 'integer' })\n version!: number\n\n @Property({ name: 'status', type: 'varchar', length: 30 })\n status!: WorkflowInstanceStatus\n\n @Property({ name: 'current_step_id', type: 'varchar', length: 100 })\n currentStepId!: string\n\n @Property({ name: 'context', type: 'jsonb' })\n context!: Record<string, any>\n\n @Property({ name: 'correlation_key', type: 'varchar', length: 255, nullable: true })\n correlationKey?: string | null\n\n @Property({ name: 'metadata', type: 'jsonb', nullable: true })\n metadata?: WorkflowInstanceMetadata | null\n\n @Property({ name: 'started_at', type: Date })\n startedAt!: Date\n\n @Property({ name: 'completed_at', type: Date, nullable: true })\n completedAt?: Date | null\n\n @Property({ name: 'paused_at', type: Date, nullable: true })\n pausedAt?: Date | null\n\n @Property({ name: 'cancelled_at', type: Date, nullable: true })\n cancelledAt?: Date | null\n\n @Property({ name: 'error_message', type: 'text', nullable: true })\n errorMessage?: string | null\n\n @Property({ name: 'error_details', type: 'jsonb', nullable: true })\n errorDetails?: any | null\n\n @Property({ name: 'pending_transition', type: 'jsonb', nullable: true })\n pendingTransition?: {\n toStepId: string\n activityResults: any[]\n timestamp: Date\n } | null\n\n // When the instance is FORKED, points at the open PARALLEL_FORK step whose\n // branches are currently executing. Null for single-token instances.\n @Property({ name: 'active_fork_step_id', type: 'varchar', length: 100, nullable: true })\n activeForkStepId?: string | null\n\n @Property({ name: 'retry_count', type: 'integer', default: 0 })\n retryCount: number = 0\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n// ============================================================================\n// Entity: WorkflowBranchInstance\n// ============================================================================\n\n/**\n * WorkflowBranchInstance entity\n *\n * A single parallel branch token created by a PARALLEL_FORK step. Each branch\n * advances independently (interleaved under the instance lock) with its own\n * private context namespace, and converges to the paired PARALLEL_JOIN step.\n * Branches are tenant/org scoped and never cross-tenant.\n */\n@Entity({ tableName: 'workflow_branch_instances' })\n@Index({ name: 'workflow_branch_instances_instance_status_idx', properties: ['workflowInstanceId', 'status'] })\n@Index({ name: 'workflow_branch_instances_instance_fork_idx', properties: ['workflowInstanceId', 'forkStepId'] })\n@Index({ name: 'workflow_branch_instances_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\nexport class WorkflowBranchInstance {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'workflow_instance_id', type: 'uuid' })\n workflowInstanceId!: string\n\n @Property({ name: 'fork_step_id', type: 'varchar', length: 100 })\n forkStepId!: string\n\n @Property({ name: 'join_step_id', type: 'varchar', length: 100 })\n joinStepId!: string\n\n // The transitionId of the FORK's outgoing transition that created this branch.\n @Property({ name: 'branch_key', type: 'varchar', length: 100 })\n branchKey!: string\n\n // Reserved for nested-fork support (always null this iteration; validator blocks nesting).\n @Property({ name: 'parent_branch_id', type: 'uuid', nullable: true })\n parentBranchId?: string | null\n\n @Property({ name: 'current_step_id', type: 'varchar', length: 100 })\n currentStepId!: string\n\n @Property({ name: 'status', type: 'varchar', length: 30 })\n status!: WorkflowBranchInstanceStatus\n\n // The branch's private write scope; merged back into instance.context at JOIN.\n @Property({ name: 'context_namespace', type: 'jsonb' })\n contextNamespace!: Record<string, any>\n\n // Per-branch equivalent of WorkflowInstance.pendingTransition (async activities).\n @Property({ name: 'pending_transition', type: 'jsonb', nullable: true })\n pendingTransition?: {\n toStepId: string\n activityResults: any[]\n timestamp: Date\n } | null\n\n @Property({ name: 'error_message', type: 'text', nullable: true })\n errorMessage?: string | null\n\n @Property({ name: 'error_details', type: 'jsonb', nullable: true })\n errorDetails?: any | null\n\n @Property({ name: 'started_at', type: Date, nullable: true })\n startedAt?: Date | null\n\n @Property({ name: 'completed_at', type: Date, nullable: true })\n completedAt?: Date | null\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n// ============================================================================\n// Entity: StepInstance\n// ============================================================================\n\n/**\n * StepInstance entity\n *\n * Tracks individual step executions within a workflow instance.\n * Records input/output data, timing, and execution status for each step.\n */\n@Entity({ tableName: 'step_instances' })\n@Index({ name: 'step_instances_workflow_instance_idx', properties: ['workflowInstanceId', 'status'] })\n@Index({ name: 'step_instances_step_id_idx', properties: ['stepId', 'status'] })\n@Index({ name: 'step_instances_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\nexport class StepInstance {\n [OptionalProps]?: 'retryCount' | 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'workflow_instance_id', type: 'uuid' })\n workflowInstanceId!: string\n\n // Set when this step executes inside a parallel branch; null for single-token.\n @Property({ name: 'branch_instance_id', type: 'uuid', nullable: true })\n branchInstanceId?: string | null\n\n @Property({ name: 'step_id', type: 'varchar', length: 100 })\n stepId!: string\n\n @Property({ name: 'step_name', type: 'varchar', length: 255 })\n stepName!: string\n\n @Property({ name: 'step_type', type: 'varchar', length: 50 })\n stepType!: string\n\n @Property({ name: 'status', type: 'varchar', length: 20 })\n status!: StepInstanceStatus\n\n @Property({ name: 'input_data', type: 'jsonb', nullable: true })\n inputData?: any | null\n\n @Property({ name: 'output_data', type: 'jsonb', nullable: true })\n outputData?: any | null\n\n @Property({ name: 'error_data', type: 'jsonb', nullable: true })\n errorData?: any | null\n\n @Property({ name: 'entered_at', type: Date, nullable: true })\n enteredAt?: Date | null\n\n @Property({ name: 'exited_at', type: Date, nullable: true })\n exitedAt?: Date | null\n\n @Property({ name: 'execution_time_ms', type: 'integer', nullable: true })\n executionTimeMs?: number | null\n\n @Property({ name: 'retry_count', type: 'integer', default: 0 })\n retryCount: number = 0\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n// ============================================================================\n// Entity: UserTask\n// ============================================================================\n\n/**\n * UserTask entity\n *\n * Represents user tasks that require human interaction within a workflow.\n * Tracks assignment, SLA, escalation, and completion status.\n */\n@Entity({ tableName: 'user_tasks' })\n@Index({ name: 'user_tasks_workflow_instance_idx', properties: ['workflowInstanceId'] })\n@Index({ name: 'user_tasks_status_assigned_idx', properties: ['status', 'assignedTo'] })\n@Index({ name: 'user_tasks_status_due_date_idx', properties: ['status', 'dueDate'] })\n@Index({ name: 'user_tasks_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\nexport class UserTask {\n [OptionalProps]?: 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'workflow_instance_id', type: 'uuid' })\n workflowInstanceId!: string\n\n @Property({ name: 'step_instance_id', type: 'uuid' })\n stepInstanceId!: string\n\n // Set when this task belongs to a parallel branch; null for single-token instances.\n @Property({ name: 'branch_instance_id', type: 'uuid', nullable: true })\n branchInstanceId?: string | null\n\n @Property({ name: 'task_name', type: 'varchar', length: 255 })\n taskName!: string\n\n @Property({ name: 'description', type: 'text', nullable: true })\n description?: string | null\n\n @Property({ name: 'status', type: 'varchar', length: 20 })\n status!: UserTaskStatus\n\n @Property({ name: 'form_schema', type: 'jsonb', nullable: true })\n formSchema?: any | null\n\n @Property({ name: 'form_data', type: 'jsonb', nullable: true })\n formData?: any | null\n\n @Property({ name: 'assigned_to', type: 'varchar', length: 255, nullable: true })\n assignedTo?: string | null\n\n @Property({ name: 'assigned_to_roles', type: 'text[]', nullable: true })\n assignedToRoles?: string[] | null\n\n @Property({ name: 'claimed_by', type: 'varchar', length: 255, nullable: true })\n claimedBy?: string | null\n\n @Property({ name: 'claimed_at', type: Date, nullable: true })\n claimedAt?: Date | null\n\n @Property({ name: 'due_date', type: Date, nullable: true })\n dueDate?: Date | null\n\n @Property({ name: 'escalated_at', type: Date, nullable: true })\n escalatedAt?: Date | null\n\n @Property({ name: 'escalated_to', type: 'varchar', length: 255, nullable: true })\n escalatedTo?: string | null\n\n @Property({ name: 'completed_by', type: 'varchar', length: 255, nullable: true })\n completedBy?: string | null\n\n @Property({ name: 'completed_at', type: Date, nullable: true })\n completedAt?: Date | null\n\n @Property({ name: 'comments', type: 'text', nullable: true })\n comments?: string | null\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n// ============================================================================\n// Entity: WorkflowEvent\n// ============================================================================\n\n/**\n * WorkflowEvent entity\n *\n * Event sourcing log for workflow execution history.\n * Records all events that occur during workflow execution for audit and replay.\n */\n@Entity({ tableName: 'workflow_events' })\n@Index({ name: 'workflow_events_instance_occurred_idx', properties: ['workflowInstanceId', 'occurredAt'] })\n@Index({ name: 'workflow_events_event_type_idx', properties: ['eventType', 'occurredAt'] })\n@Index({ name: 'workflow_events_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\nexport class WorkflowEvent {\n @PrimaryKey({ type: 'bigint', autoincrement: true })\n id!: string\n\n @Property({ name: 'workflow_instance_id', type: 'uuid' })\n workflowInstanceId!: string\n\n @Property({ name: 'step_instance_id', type: 'uuid', nullable: true })\n stepInstanceId?: string | null\n\n // Set when the event was logged within a parallel branch; null otherwise.\n @Property({ name: 'branch_instance_id', type: 'uuid', nullable: true })\n branchInstanceId?: string | null\n\n @Property({ name: 'event_type', type: 'varchar', length: 50 })\n eventType!: string\n\n @Property({ name: 'event_data', type: 'jsonb' })\n eventData!: any\n\n @Property({ name: 'occurred_at', type: Date, onCreate: () => new Date() })\n occurredAt: Date = new Date()\n\n @Property({ name: 'user_id', type: 'varchar', length: 255, nullable: true })\n userId?: string | null\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n}\n\n// ============================================================================\n// Entity: WorkflowEventTrigger\n// ============================================================================\n\n/**\n * WorkflowEventTrigger entity\n *\n * Maps event patterns to workflow definitions for automatic triggering.\n * When a matching event is emitted, the corresponding workflow is started\n * with context mapped from the event payload.\n */\n@Entity({ tableName: 'workflow_event_triggers' })\n@Index({ name: 'workflow_event_triggers_event_pattern_idx', properties: ['eventPattern', 'enabled'] })\n@Index({ name: 'workflow_event_triggers_definition_idx', properties: ['workflowDefinitionId'] })\n@Index({ name: 'workflow_event_triggers_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'workflow_event_triggers_enabled_priority_idx', properties: ['enabled', 'priority'] })\nexport class WorkflowEventTrigger {\n [OptionalProps]?: 'enabled' | 'priority' | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'name', type: 'varchar', length: 255 })\n name!: string\n\n @Property({ name: 'description', type: 'text', nullable: true })\n description?: string | null\n\n @Property({ name: 'workflow_definition_id', type: 'uuid' })\n workflowDefinitionId!: string\n\n @Property({ name: 'event_pattern', type: 'varchar', length: 255 })\n eventPattern!: string\n\n @Property({ name: 'config', type: 'jsonb', nullable: true })\n config?: WorkflowEventTriggerConfig | null\n\n @Property({ name: 'enabled', type: 'boolean', default: true })\n enabled: boolean = true\n\n @Property({ name: 'priority', type: 'integer', default: 0 })\n priority: number = 0\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'created_by', type: 'varchar', length: 255, nullable: true })\n createdBy?: string | null\n\n @Property({ name: 'updated_by', type: 'varchar', length: 255, nullable: true })\n updatedBy?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n// Export all entities as default for MikroORM discovery\nexport default [\n WorkflowDefinition,\n WorkflowInstance,\n WorkflowBranchInstance,\n StepInstance,\n UserTask,\n WorkflowEvent,\n WorkflowEventTrigger,\n]\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;AAMA,SAAS,qBAAqB;AAC9B,SAAS,QAAQ,OAAO,YAAY,UAAU,cAAc;AAuJzD;AADI,IAAM,qBAAN,MAAyB;AAAA,EAAzB;AAmBL,mBAAkB;AASlB,mBAAmB;AAqBnB,qBAAkB,oBAAI,KAAK;AAG3B,qBAAkB,oBAAI,KAAK;AAAA;AAI7B;AApDE;AAAA,EADC,WAAW,EAAE,MAAM,QAAQ,YAAY,oBAAoB,CAAC;AAAA,GAHlD,mBAIX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,eAAe,MAAM,WAAW,QAAQ,IAAI,CAAC;AAAA,GANpD,mBAOX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,oBAAoB,MAAM,WAAW,QAAQ,KAAK,UAAU,KAAK,CAAC;AAAA,GATzE,mBAUX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,iBAAiB,MAAM,WAAW,QAAQ,IAAI,CAAC;AAAA,GAZtD,mBAaX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,eAAe,MAAM,QAAQ,UAAU,KAAK,CAAC;AAAA,GAfpD,mBAgBX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,WAAW,MA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