OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
Get a workflow definition with all steps.
Goal
View workflow details.
Context
Workflow designer, detail view.
Source Definition
import {
defineCommand,
defineQuery,
} from '@lssm-tech/lib.contracts-spec/operations';
import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
import { WorkflowStatusEnum } from './workflow.enum';
import {
AddStepInputModel,
CreateWorkflowInputModel,
UpdateWorkflowInputModel,
WorkflowDefinitionModel,
WorkflowStepModel,
} from './workflow.schema';
export const GetWorkflowContract = defineQuery({
meta: {
key: 'workflow.definition.get',
version: '1.0.0',
stability: 'stable',
owners: ['@example.workflow-system'],
tags: ['workflow', 'definition', 'get'],
description: 'Get a workflow definition with all steps.',
goal: 'View workflow details.',
context: 'Workflow designer, detail view.',
},
io: {
input: defineSchemaModel({
name: 'GetWorkflowInput',
fields: {
workflowId: {
type: ScalarTypeEnum.String_unsecure(),
isOptional: false,
},
},
}),
output: WorkflowDefinitionModel,
},
policy: { auth: 'user' },
acceptance: {
scenarios: [
{
key: 'get-workflow-happy-path',
given: ['Workflow definition exists'],
when: ['User requests workflow details'],
then: ['Workflow details are returned'],
},
],
examples: [
{
key: 'get-details',
input: { workflowId: 'def-123' },
output: { id: 'def-123', name: 'Employee Onboarding' },
},
],
},
});