Register the Geocortex Workflow Custom Widgets

The ability to host and run workflows in Web AppBuilder is provided by custom widgets that were developed by Geocortex for this purpose. To configure an app to host a workflow, you add one of the custom widgets and specify the workflow that you want the widget to run. To run the workflow, the user selects the widget in the running app.

Geocortex Workflow provides the following widgets:

Although Geocortex Workflow has four widgets, Web AppBuilder only shows two widgets. When you configure a 2D app, Web AppBuilder shows the 2D widgets. When you configure a 3D app, Web AppBuilder shows the 3D widgets.

To use Web AppBuilder apps to host workflows, you must first register the widgets. You only need to register the widgets one time, and then you can use them in as many apps as you want.

Geocortex Workflow supports two editions of Web AppBuilder. The edition you use and the way that you register it depends on whether you are using on-premises Workflow or cloud Workflow:

You cannot use the ArcGIS Online edition of Web AppBuilder to host workflows, because ArcGIS Online does not support custom widgets.

Register the Widgets with Web AppBuilder in Portal for ArcGIS

This registration procedure applies to on-premises installations of Geocortex Workflow only. In on-premises installations, the widgets are installed when you install Geocortex Workflow. To register a widget, you create an application item that points to the widget's manifest.json file.

After you have registered the widgets, share the widget items with other Workflow authors in your organization. This allows them to configure their Web AppBuilder apps to run workflows. If the widgets are not shared, the other authors will not see the widgets in Web AppBuilder.

To register the Workflow widgets with Web AppBuilder in Portal for ArcGIS:

  1. Sign in to Portal for ArcGIS as an administrator.

  2. In Content, click Add Item and select An application.

  3. Configure the item:

    Example configuration for a Workflow widget's item in Portal for ArcGIS

    1. Set the Type to Application Extension (AppBuilder).

    2. In the Manifest URL box, paste the URL to the manifest.json file for the widget you want to register.

      You can either use the copy of the manifest.json file in your Workflow deployment, or, if your portal has Internet access, the public copy of the manifest.json file. If you use your local copy, you will have to locate the manifest.json file in your deployment.

      • 2D In-Panel Widget:

        • Local: [https]://[host.domain.com]/[virtual_path]/wab/widgets/2D/WorkflowRunner_Panel/manifest.json

        • Public: https://apps.geocortex.com/workflow/latest/dist/wab/2.4/widgets/2D/WorkflowRunner_Panel/manifest.json

      • 2D Modal Widget:

        • Local: [https]://[host.domain.com]/[virtual_path]/wab/widgets/2D/WorkflowRunner_Modal/manifest.json

        • Public: https://apps.geocortex.com/workflow/latest/dist/wab/2.4/widgets/2D/WorkflowRunner_Modal/manifest.json

      • 3D In-Panel Widget:

        • Local: [https]://[host.domain.com]/[virtual_path]/wab/widgets/3d/WorkflowRunner_Panel/manifest.json

        • Public: https://apps.geocortex.com/workflow/latest/dist/wab/2.4/widgets/3D/WorkflowRunner_Panel/manifest.json

      • 3D Modal Widget:

        • Local: [https]://[host.domain.com]/[virtual_path]/wab/widgets/3d/WorkflowRunner_Modal/manifest.json

        • Public: https://apps.geocortex.com/workflow/latest/dist/wab/2.4/widgets/3D/WorkflowRunner_Modal/manifest.json

    3. Click anywhere outside the Manifest URL box.

      Portal for ArcGIS will get the default title from the manifest.json file and enter it into the Title box.

    4. Enter a meaningful title in the Title box, for example: Geocortex Workflow Widget In-Panel 2D

      By default, the widgets all use the same title. Portal for ArcGIS does not allow multiple items to have the same title.

    5. Enter one or more tags, for example, Geocortex, Workflow, and Widget.

    6. Click Add Item.

  4. Repeat these steps for each widget that you want to use in workflows. You will have one Web Mapping Application item for each widget.

Deploy the Widgets to Web AppBuilder (Developer Edition)

This deployment procedure assumes that you have already installed Web AppBuilder (Developer Edition). You can download Web AppBuilder (Developer Edition) here for free. Follow the instructions to install it.

To deploy the widgets, you will copy the widget files to the Web AppBuilder installation. By default, the widgets point to cloud Workflow. The deployment procedure also shows you how to adapt the widgets to point to your on-premises installation of Geocortex Workflow.

To deploy the Workflow widgets to Web AppBuilder (Developer Edition):

Step 1: Deploy the widgets to Web AppBuilder (Developer Edition)

  1. Download the widgets.

  2. Locate the root of your Web AppBuilder (Developer Edition) installation.

    By default, the root is called WebAppBuilderForArcGIS.

  3. Extract the files to the root.

    This places the widgets in the correct locations within your Web AppBuilder (Developer Edition) installation.

Step 2: Adapt the widgets to point to your on-premises installation

  1. In your Web AppBuilder (Developer Edition) installation, locate the Widget.js file for the widget that you want to modify:

  2. Edit the Widget.js file in a text editor.

    The Widget.js file uses string concatenation to define the URL for cloud Workflow. To define the URL for your on-premises installation of Workflow, you will replace the expression with a literal string representing a URL to your installation.

  3. Replace this:

    apps.geocortex.com/workflow/latest/dist/" + "wab/" + wabVersion + "

    with this:

    [host.domain.com]/[virtual_path]/dist/wab/2.4/

    where [host.domain.com] is the fully qualified name of your server and [virtual_path] is the virtual path that you specified on the Post Installer's IIS Settings panel. The default virtual path is Geocortex/Workflow.

    The resulting string should look something like this:

    "https://myserver.myorganization.com/Geocortex/Workflow/dist/wab/2.4/libs/WorkflowRunner/2D/Widget.js!"

    Be sure to include the exclamation point at the end of the URL.

    The "2.4" in the URL is the minimum version of Web AppBuilder (Developer Edition) that Geocortex Workflow supports. The URL remains the same regardless of which version of Web AppBuilder (Developer Edition) you use.

  4. Save the file.

  5. Repeat these steps for each widget that you use.

    The widgets that you modified now point to your on-premises installation of Geocortex Workflow.

© 2018 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 5.9