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.

workflow.instance.resume

Resume a paused workflow instance.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @example.workflow-system
  • Tags: workflow, instance, resume
  • File: packages/examples/workflow-system/src/instance/instance.operations.ts
  • field.key.label
    workflow.instance.resume
    field.version.label
    1.0.0
    field.type.label
    operation (command)
    field.title.label
    workflow.instance.resume
    field.description.label

    Resume a paused workflow instance.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @example.workflow-system
  • Tags: workflow, instance, resume
  • File: packages/examples/workflow-system/src/instance/instance.operations.ts
  • field.tags.label
    workflow,instance,resume
    field.owners.label
    @example.workflow-system
    field.stability.label
    stable

    Resume a paused workflow instance.

    Goal

    Continue workflow execution.

    Context

    Administrative action.

    Emitted Events

    `workflow.instance.resumed` (v1.0.0)

    Source Definition

    import {
    	defineCommand,
    	defineQuery,
    } from '@lssm-tech/lib.contracts-spec/operations';
    import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
    import { InstanceStatusEnum } from './instance.enum';
    import {
    	StartWorkflowInputModel,
    	TransitionInputModel,
    	TransitionResultModel,
    	WorkflowInstanceModel,
    } from './instance.schema';
    
    export const ResumeWorkflowContract = defineCommand({
    	meta: {
    		key: 'workflow.instance.resume',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['@example.workflow-system'],
    		tags: ['workflow', 'instance', 'resume'],
    		description: 'Resume a paused workflow instance.',
    		goal: 'Continue workflow execution.',
    		context: 'Administrative action.',
    	},
    	io: {
    		input: defineSchemaModel({
    			name: 'PauseResumeInput',
    			fields: {
    				instanceId: {
    					type: ScalarTypeEnum.String_unsecure(),
    					isOptional: false,
    				},
    				reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
    			},
    		}),
    		output: WorkflowInstanceModel,
    	},
    	policy: { auth: 'user' },
    	sideEffects: {
    		emits: [
    			{
    				key: 'workflow.instance.resumed',
    				version: '1.0.0',
    				when: 'Workflow is resumed',
    				payload: WorkflowInstanceModel,
    			},
    		],
    		audit: ['workflow.instance.resumed'],
    	},
    	acceptance: {
    		scenarios: [
    			{
    				key: 'resume-workflow-happy-path',
    				given: ['Workflow is paused'],
    				when: ['Admin resumes workflow'],
    				then: ['Instance status becomes RUNNING'],
    			},
    		],
    		examples: [
    			{
    				key: 'resume-normal',
    				input: { instanceId: 'inst-456', reason: 'Issue resolved' },
    				output: { id: 'inst-456', status: 'running' },
    			},
    		],
    	},
    });