# Class Workflow

Workflow class

#### Implements

- AbstractWorkflow

- Defined in packages/saltcorn-data/models/workflow.ts:29

##### Index

### Constructors

constructor

### Properties

__
action?
autoSave?
modifyForm?
onDone
onStepSave?
onStepSuccess?
previewURL?
saveURL?
startAtStepURL?
steps

### Methods

prepareForm
run
runStep
singleStepForm
title

## Constructors

### constructor

- new Workflow(o: WorkflowCfg): Workflow

  Workflow constructor

  #### Parameters

  - o: WorkflowCfg

  #### Returns Workflow

  - Defined in packages/saltcorn-data/models/workflow.ts:46

## Properties

### __

__: any

Implementation of AbstractWorkflow.__

- Defined in packages/saltcorn-data/models/workflow.ts:34

### `Optional` action

action?: string

Implementation of AbstractWorkflow.action

- Defined in packages/saltcorn-data/models/workflow.ts:33

### `Optional` autoSave

autoSave?: boolean

Implementation of AbstractWorkflow.autoSave

- Defined in packages/saltcorn-data/models/workflow.ts:38

### `Optional` modifyForm

modifyForm?: (form: Form) => void

- Defined in packages/saltcorn-data/models/workflow.ts:40

### onDone

onDone: (context: any) => any

Implementation of AbstractWorkflow.onDone

- Defined in packages/saltcorn-data/models/workflow.ts:31

### `Optional` onStepSave

onStepSave?: (step: any, context: any, formVals: any) => any

- Defined in packages/saltcorn-data/models/workflow.ts:36

### `Optional` onStepSuccess

onStepSuccess?: (step: any, context: any) => any

- Defined in packages/saltcorn-data/models/workflow.ts:32

### `Optional` previewURL

previewURL?: string

Implementation of AbstractWorkflow.previewURL

- Defined in packages/saltcorn-data/models/workflow.ts:39

### `Optional` saveURL

saveURL?: string

Implementation of AbstractWorkflow.saveURL

- Defined in packages/saltcorn-data/models/workflow.ts:35

### `Optional` startAtStepURL

startAtStepURL?: (stepName: string) => string

Implementation of AbstractWorkflow.startAtStepURL

- Defined in packages/saltcorn-data/models/workflow.ts:37

### steps

steps: any[]

Implementation of AbstractWorkflow.steps

- Defined in packages/saltcorn-data/models/workflow.ts:30

## Methods

### prepareForm

- prepareForm(form: Form): Promise<void>

  #### Parameters

  - form: Form

  #### Returns Promise<void>

  Implementation of AbstractWorkflow.prepareForm

  - Defined in packages/saltcorn-data/models/workflow.ts:105

### run

- run(body?: any, req?: any): Promise<RunResult | undefined>

  #### Parameters

  - `Optional` body: any
  - `Optional` req: any

  #### Returns Promise<RunResult | undefined>

  Implementation of AbstractWorkflow.run

  - Defined in packages/saltcorn-data/models/workflow.ts:122

### runStep

- runStep(context: any, stepIx: number): Promise<RunResult | undefined>

  #### Parameters

  - context: any
  - stepIx: number

  #### Returns Promise<RunResult | undefined>

  Implementation of AbstractWorkflow.runStep

  - Defined in packages/saltcorn-data/models/workflow.ts:211

### singleStepForm

- singleStepForm(body?: any, req?: any): Promise<RunResult | undefined>

  #### Parameters

  - `Optional` body: any
  - `Optional` req: any

  #### Returns Promise<RunResult | undefined>

  Implementation of AbstractWorkflow.singleStepForm

  - Defined in packages/saltcorn-data/models/workflow.ts:56

### title

- title(step: any, stepIx: number): string

  #### Parameters

  - step: any
  - stepIx: number

  #### Returns string

  Implementation of AbstractWorkflow.title

  - Defined in packages/saltcorn-data/models/workflow.ts:327