# Class WorkflowRun

WorkflowRun Class

#### Hierarchy

- WorkflowRun

- Defined in saltcorn-data/models/workflow_run.ts:63

#####
Index

### Constructors

constructor

### Properties

context
current_step
error?
id?
session_id?
started_at
started_by?
status
status_updated_at?
step_start?
steps?
trigger_id
wait_info?

### Accessors

current_step_name
toJson

### Methods

createTrace
delete
get_next_step
markAsError
popReturnDirectives
provide_form_input
run
set_current_step
update
userFormFields
user_allowed_to_fill_form
count
create
find
findOne
getResumableWorkflows
prune
runResumableWorkflows

## Constructors

### constructor

- new WorkflowRun(o): WorkflowRun

- WorkflowRun constructor

  #### Parameters

  - ##### o: WorkflowRun | WorkflowRunCfg

  #### Returns WorkflowRun

  - Defined in saltcorn-data/models/workflow_run.ts:83

## Properties

### context

context: any

- Defined in saltcorn-data/models/workflow_run.ts:66

### current_step

current_step: any[]

- Defined in saltcorn-data/models/workflow_run.ts:74

### `Optional` error

error?: string

- Defined in saltcorn-data/models/workflow_run.ts:71

### `Optional` id

id?: number

- Defined in saltcorn-data/models/workflow_run.ts:64

### `Optional` session_id

session_id?: string

- Defined in saltcorn-data/models/workflow_run.ts:72

### started_at

started_at: Date

- Defined in saltcorn-data/models/workflow_run.ts:68

### `Optional` started_by

started_by?: number

- Defined in saltcorn-data/models/workflow_run.ts:70

### status

status: "Error" | "Pending" | "Running" | "Finished" | "Waiting"

- Defined in saltcorn-data/models/workflow_run.ts:73

### `Optional` status_updated_at

status_updated_at?: Date

- Defined in saltcorn-data/models/workflow_run.ts:69

### `Optional` step_start

step_start?: Date

- Defined in saltcorn-data/models/workflow_run.ts:77

### `Optional` steps

steps?: WorkflowStep[]

- Defined in saltcorn-data/models/workflow_run.ts:75

### trigger_id

trigger_id: number

- Defined in saltcorn-data/models/workflow_run.ts:65

### `Optional` wait_info

wait_info?: any

- Defined in saltcorn-data/models/workflow_run.ts:67

## Accessors

### current_step_name

- get current_step_name(): any

- #### Returns any

  - Defined in saltcorn-data/models/workflow_run.ts:248

### toJson

- get toJson(): any

- #### Returns any

  - Defined in saltcorn-data/models/workflow_run.ts:118

## Methods

### createTrace

- createTrace(step_name, user?): Promise<void>

- #### Parameters

  - ##### step_name: string

  - ##### `Optional` user: User

  #### Returns Promise<void>

  - Defined in saltcorn-data/models/workflow_run.ts:252

### delete

- delete(): Promise<void>

- #### Returns Promise<void>

  - Defined in saltcorn-data/models/workflow_run.ts:155

### get_next_step

- get_next_step(step, user?): null | WorkflowStep

- #### Parameters

  - ##### step: WorkflowStep

  - ##### `Optional` user: User

  #### Returns null | WorkflowStep

  - Defined in saltcorn-data/models/workflow_run.ts:188

### markAsError

- markAsError(e, step, user?): Promise<void>

- #### Parameters

  - ##### e: Error

  - ##### step: WorkflowStep

  - ##### `Optional` user: User

  #### Returns Promise<void>

  - Defined in saltcorn-data/models/workflow_run.ts:880

### popReturnDirectives

- popReturnDirectives(): Promise<any>

- #### Returns Promise<any>

  - Defined in saltcorn-data/models/workflow_run.ts:894

### provide_form_input

- provide_form_input(form_values): Promise<void>

- #### Parameters

  - ##### form_values: any

  #### Returns Promise<void>

  - Defined in saltcorn-data/models/workflow_run.ts:179

### run

- run(__namedParameters): Promise<any>

- #### Parameters

  - ##### __namedParameters: {
    api_call?: boolean;
    interactive?: boolean;
    noNotifications?: boolean;
    req?: any;
    trace?: boolean;
    user?: User;
    }

    - ##### `Optional` api_call?: boolean

    - ##### `Optional` interactive?: boolean

    - ##### `Optional` noNotifications?: boolean

    - ##### `Optional` req?: any

    - ##### `Optional` trace?: boolean

    - ##### `Optional` user?: User

  #### Returns Promise<any>

  - Defined in saltcorn-data/models/workflow_run.ts:398

### set_current_step

- set_current_step(stepName): void

- #### Parameters

  - ##### stepName: string

  #### Returns void

  - Defined in saltcorn-data/models/workflow_run.ts:394

### update

- update(row): Promise<void>

- #### Parameters

  - ##### row: Row

  #### Returns Promise<void>

  - Defined in saltcorn-data/models/workflow_run.ts:166

### userFormFields

- userFormFields(step0?, user?): Promise<{
  fields: FieldLike[];
  validator?: ((r) => any);
  }>

- #### Parameters

  - ##### `Optional` step0: WorkflowStep

  - ##### `Optional` user: User

  #### Returns Promise<{
  fields: FieldLike[];
  validator?: ((r) => any);
  }>

  - Defined in saltcorn-data/models/workflow_run.ts:268

### user_allowed_to_fill_form

- user_allowed_to_fill_form(user): boolean

- #### Parameters

  - ##### user: User

  #### Returns boolean

  - Defined in saltcorn-data/models/workflow_run.ts:212

### `Static` count

- count(where?): Promise<number>

- #### Parameters

  - ##### `Optional` where: Where

  #### Returns Promise<number>

  - Defined in saltcorn-data/models/workflow_run.ts:907

### `Static` create

- create(run_in): Promise<WorkflowRun>

- #### Parameters

  - ##### run_in: WorkflowRunCfg

  #### Returns Promise<WorkflowRun>

  - Defined in saltcorn-data/models/workflow_run.ts:108

### `Static` find

- find(where, selectopts?): Promise<WorkflowRun[]>

- #### Parameters

  - ##### where: Where

  - ##### `Optional` selectopts: SelectOptions

  #### Returns Promise<WorkflowRun[]>

  - Defined in saltcorn-data/models/workflow_run.ts:128

### `Static` findOne

- findOne(where, selectopts?): Promise<WorkflowRun>

- #### Parameters

  - ##### where: Where

  - ##### `Optional` selectopts: SelectOptions

  #### Returns Promise<WorkflowRun>

  - Defined in saltcorn-data/models/workflow_run.ts:140

### `Static` getResumableWorkflows

- getResumableWorkflows(): Promise<WorkflowRun[]>

- #### Returns Promise<WorkflowRun[]>

  - Defined in saltcorn-data/models/workflow_run.ts:220

### `Static` prune

- prune(): Promise<void>

- #### Returns Promise<void>

  - Defined in saltcorn-data/models/workflow_run.ts:911

### `Static` runResumableWorkflows

- runResumableWorkflows(): Promise<void>

- #### Returns Promise<void>

  - Defined in saltcorn-data/models/workflow_run.ts:239

Generated using TypeDoc