CreateWorkflow

AMD: require(["esri/widgets/Editor/CreateWorkflow"], (CreateWorkflow) => { /* code goes here */ });
ESM: import CreateWorkflow from "@arcgis/core/widgets/Editor/CreateWorkflow";
Class: esri/widgets/Editor/CreateWorkflow
Inheritance: CreateWorkflow Workflow Accessor
Since: ArcGIS API for JavaScript 4.15
Deprecated since version 4.23. Use CreateFeaturesWorkflow instead.

A read-only class containing the logic used when creating features using the Editor widget.

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|UpdateWorkflowData

The shared workflow data.

more details
Workflow
String

The name of the class.

more details
Accessor
Boolean

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

more details
Workflow
Boolean

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

more details
Workflow
Boolean

Indicates whether the workflow is considered active.

more details
Workflow
String

The name of the current step in the workflow.

more details
Workflow
String

The type of workflow.

more details
CreateWorkflow

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 inherited

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

hasPreviousStep Booleanreadonly inherited

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

started Booleanreadonly inherited

Indicates whether the workflow is considered active.

Default Value:false
stepId Stringreadonly inherited

The name of the current step in the workflow.

type Stringreadonly

The type of workflow.

For CreateWorkflow the type is always "create".

Method Overview

Show inherited methods Hide inherited methods
Name Return Type Summary Class

Adds one or more handles which are to be tied to the lifecycle of the object.

more details
Accessor
Promise<void>

Cancels the active workflow.

more details
Workflow
Promise<void>

Call this method when the workflow is considered finished.

more details
Workflow
Boolean

Returns true if a named group of handles exist.

more details
Accessor
Promise<void>

Moves to the next step in the workflow.

more details
Workflow
Promise<void>

Moves to the previous step in the workflow.

more details
Workflow

Removes a group of handles owned by the object.

more details
Accessor
Promise<void>

Resets the workflow.

more details
Workflow
Promise<void>

Starts the workflow.

more details
Workflow

Method Details

addHandles(handleOrHandles, groupKey)inherited
Since: ArcGIS API for JavaScript 4.25

Adds one or more handles which are to be tied to the lifecycle of the object. The handles will be removed when the object is destroyed.

// Manually manage handles
const handle = reactiveUtils.when(
  () => !view.updating,
  () => {
    wkidSelect.disabled = false;
  },
  { once: true }
);

// Handle gets removed when the object is destroyed.
this.addHandles(handle);
Parameters
handleOrHandles WatchHandle|WatchHandle[]

Handles marked for removal once the object is destroyed.

groupKey *
optional

Key identifying the group to which the handles should be added. All the handles in the group can later be removed with Accessor.removeHandles(). If no key is provided the handles are added to a default group.

cancel(){Promise<void>}inherited

Cancels the active workflow.

Returns
Type Description
Promise<void> Resolves when the active workflow is canceled.
commit(){Promise<void>}inherited

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.
hasHandles(groupKey){Boolean}inherited
Since: ArcGIS API for JavaScript 4.25

Returns true if a named group of handles exist.

Parameter
groupKey *
optional

A group key.

Returns
Type Description
Boolean Returns true if a named group of handles exist.
Example
// Remove a named group of handles if they exist.
if (obj.hasHandles("watch-view-updates")) {
  obj.removeHandles("watch-view-updates");
}

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.
removeHandles(groupKey)inherited
Since: ArcGIS API for JavaScript 4.25

Removes a group of handles owned by the object.

Parameter
groupKey *
optional

A group key or an array or collection of group keys to remove.

Example
obj.removeHandles(); // removes handles from default group

obj.removeHandles("handle-group");
obj.removeHandles("other-handle-group");
reset(){Promise<void>}inherited

Resets the workflow.

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

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.