Get started

  1. Install and setup the API
  2. Identify your portal URL
  3. Identify your workflow item ID
  4. Get an app ID
  5. Get an instance of a manager

1. Install and setup the API

The Workflow Manager JavaScript API is available as an ES module via npm, a JavaScript package manager. You can install the API locally for use with JavaScript frameworks such as React and Angular, and with module bundlers such as webpack or rollup.js.

To install:

Use dark colors for code blocksCopy
1
npm install @arcgis/workflow-manager

2. Identify your portal URL

For ArcGIS Enterprise, this is the ArcGIS Portal instance that your Workflow Manager Server is federated with:

https://domain.hostname.com/portal/

This property does not need to be configured for ArcGIS Online. If the portal URL is not defined, ArcGIS Online is used by default.

3. Identify your workflow item ID

Create a new item or use an existing workflow item. Use the Workflow Manager Web Application to manage your workflow items.

Learn more about creating and sharing workflow items

4. Get an app ID

You will need to provide an app ID for Workflow Manager to support OAuth2 authentication.

Complete the following steps to generate an app ID. This only needs to be done once per application.

  1. Sign in to your ArcGIS Online organization or the ArcGIS Portal associated with your Workflow Manager Server.
  2. Add a new application item. This new item can be a placeholder for your future web application. Refer to the ArcGIS Portal topic Add Items.
  3. On the item details page, copy the app ID under App Registration.

5. Get an instance of a manager

Get an instance of one of the managers provided by Workflow Manager.

Use the ManagerFactory as an entry point to instantiate one of the manager classes within Workflow Manager. There are managers to work on jobs, get configuration information, register for job notifications, and check server status.

Refer to Resources and Operations for the list of capabilities.

For example, to get an instance of a JobsManager:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
import { ConfigInfo, JobsManager, ManagerFactory } from '@arcgis/workflow-manager';

// Configure connection properties
const config: ConfigInfo = {
  portalUrl: 'https://domain.hostname.com/portal/', //For ArcGIS Enterprise environments only
  itemId: 'workflowItemId',
  appId: 'myAppId'
};

const jobsManager = await ManagerFactory.getManager(JobsManager, config);

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