Workflow

AMD: require(["esri/widgets/Editor/Workflow"], (Workflow) => { /* code goes here */ });
ESM: import Workflow from "@arcgis/core/widgets/Editor/Workflow";
Class: esri/widgets/Editor/Workflow
Inheritance: Workflow Accessor
Since: ArcGIS API for JavaScript 4.11

A Workflow helps manage different stages of an editing workflow. A workflow can be thought of as one of two types: CreateFeaturesWorkflow and UpdateWorkflow. If adding an individual or multiple features, the CreateFeaturesWorkflow is used. This takes the place of the deprecated CreateWorkflow. Whereas if editing an existing feature, the UpdateWorkflow is used. Updating workflows include both editing geometry and attribute data and deleting features.

An instance of either a CreateFeaturesWorkflow or UpdateWorkflow is accessed via the activeWorkflow property in either the Editor or EditorViewModel classes.

These workflows are only enabled if the feature service allows these operations. For example, if a feature service is only enabled to allow updates, it is not possible to override this using the API.

Starting with version 4.23, CreateWorkflow is deprecated in favor of using CreateFeaturesWorkflow.

See also:

Constructors

new Workflow(properties)
Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
Show inherited properties Hide inherited properties
Name Type Summary Class
CreateWorkflowData|CreateFeaturesWorkflowData|UpdateWorkflowDatamore details

The shared workflow data.

more detailsWorkflow
Stringmore details

The name of the class.

more detailsAccessor
Booleanmore details

This property indicates whether there is a next step in the workflow.

more detailsWorkflow
Booleanmore details

This property indicates if there is a previous step in the workflow.

more detailsWorkflow
Booleanmore details

Indicates whether the workflow is considered active.

more detailsWorkflow
Stringmore details

The name of the current step in the workflow.

more detailsWorkflow
Stringmore details

Value indicating the workflow type.

more detailsWorkflow

Property Details

The shared workflow data. This can be either CreateFeaturesWorkflowData (use this in place of the deprecated CreateWorkflowData) or UpdateWorkflowData.

declaredClass Stringreadonly inherited

The name of the class. The declared class name is formatted as esri.folder.className.

hasNextStep Booleanreadonly

This property indicates whether there is a next step in the workflow.

hasPreviousStep Booleanreadonly

This property indicates if there is a previous step in the workflow.

started Booleanreadonly

Indicates whether the workflow is considered active.

Default Value:false
stepId Stringreadonly

The name of the current step in the workflow.

type Stringreadonly

Value indicating the workflow type.

Possible Value Description
create This allows the end user to create a new individual feature in the feature service. (deprecated as of 4.23, use create-features as noted below.)
create-features This allows the end user to create either individual or continuous features in the feature service. (Since 4.23)
update This allows the end user to update and/or delete features in the feature service.

These workflows are only enabled if the feature service allows these operations.

Possible Values:"create"|"create-features"|"update"

Method Overview

Name Return Type Summary Class
Promise<void>more details

Cancels the active workflow.

more detailsWorkflow
Promise<void>more details

Call this method when the workflow is considered finished.

more detailsWorkflow
Promise<void>more details

Moves to the next step in the workflow.

more detailsWorkflow
Promise<void>more details

Moves to the previous step in the workflow.

more detailsWorkflow
Promise<void>more details

Resets the workflow.

more detailsWorkflow
Promise<void>more details

Starts the workflow.

more detailsWorkflow

Method Details

cancel(){Promise<void>}

Cancels the active workflow.

Returns:
Type Description
Promise<void> Resolves when the active workflow is canceled.
commit(){Promise<void>}
Since: ArcGIS API for JavaScript 4.15

Call this method when the workflow is considered finished. This is used to help process the editing results.

Returns:
Type Description
Promise<void> Resolves when the active workflow commits and processes the edited results.

Moves to the next step in the workflow.

Returns:
Type Description
Promise<void> Resolves when moved to the next step within the active workflow.

Moves to the previous step in the workflow.

Parameters:
options Object
optional

Options when calling this method.

Specification:
cancelCurrentStep Boolean

Cancels the current workflow when calling this method. Default value is false.

Returns:
Type Description
Promise<void> Resolves when moved to the previous step within the active workflow.
reset(){Promise<void>}

Resets the workflow.

Returns:
Type Description
Promise<void> Resolves when the active workflow is reset.
start(){Promise<void>}

Starts the workflow.

Returns:
Type Description
Promise<void> Resolves when the active workflow starts.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.