Add a Workflow to an App

Access to Geocortex Workflow is included with the Geocortex Web software bundle. Workflows can be very powerful and enable you to extend the functionality of your GXW apps to include complex processes, including forms. For example, if you have specific information for an inspection, you can give field workers multiple options to select to save time and ensure consistent data. You could also include a guided interaction form with cascading combo boxes that limit options based on previous choices.

In the following water pump example, users can identify a pump by serial number or by the type of pump they can observe.

For detailed instructions on building workflows, see the Geocortex Workflow Help on the documentation center. In particular, the Activity Reference contains information about each Workflow Activity.

To add your workflow to your GXW app: 

This procedure adds a menu item to the I Want To menu that runs an existing workflow created in Geocortex Workflow Designer.

For a list of component menus to which you can add menu items, see Component Menu Types and Contexts.

  1. In Web Designer, in the Configure Components panel, click I Want To Menu, and then click +Add Menu Item.

  2. In the Title of the menu item, type in a title for the menu item, for example, Run My Workflow.

    This title then appears as an option in the I Want To menu.

  3. Click Select Icon and choose an icon to be displayed beside your menu option in the I Want To menu.

  4. In the Command box, start typing the name of your workflow, and then select it when it appears in the box.

    When you select a workflow from the Command box, it is immediately translated into a custom command with the required arguments.

  5. Click File | Save to save the app.

    The workflow menu item now appears in the I Want To menu.

Specify Workflow Input Values

You can manually specify values for one or more workflow inputs.

To specify workflow input values:

This procedure adds a menu item to the Results List menu that runs an existing workflow with custom input.

For a list of component menus to which you can add menu items, see Component Menu Types and Contexts.

  1. While editing an app in Web Designer, in the Configure Components panel, click Results List.

  2. Click +Add Menu Item.

  3. In the Title box of the menu item, type a title for the menu item, for example, Run My Workflow With Input.

    This title appears as an option in the Results List menu.

  4. Click Select Icon and choose an icon to be displayed beside the menu option in the Results List menu.

  5. In the Command box, start typing the name of your workflow, and then select it when it appears in the box.

    When you select a workflow from the Command box, it is immediately translated into a custom command with the required arguments.

  6. Set the inputs property to a key-value object, where the keys are the names of workflow inputs and the values are the values for those workflow inputs. For example, set MyStringWorkflowInput to a string and MyNumberWorkflowInput to a number. By default, this property is set to {}, which is an empty object.

    The type of the workflow input should match the type of the value specified.

    The inputs property is overridden by the commandArgumentInput property.

  7. Click File | Save to save the app.

    The workflow menu item now appears in the Results List menu.

Use the Menu Context as a Workflow Input

Some menus have a context in which they are used. You can pass the context of the menu as the value for a workflow input. For example, a menu item in the Results List could pass the results as the input for a workflow.

The following table indicates the types of context of each kind of menu.

Component Menu Types and Contexts

Component Menu

Type

Context

I Want To menu

null

None

Toolbar

null

None

Result Details *

Graphic

The Esri Graphic object representing the result in the Result Details panel.

Results List *

Graphic[]

An array of Esri Graphic objects representing the results in the search results.

Results Table *

Graphic[]

An array of Esri Graphic objects representing the results in the search results.

Map > (Specific layer) *

Graphic[]

An array of Esri Graphic objects representing the results from the specified layer in the search results.

Map (Context Menu)

Geometry

The Esri Geometry object representing the point on the map where the user activates the context menu.

* The Result Details, Results List and Results Table component menus all share the same menu items. The Map > (Specific layer) component menu also shares the same menu items for results from the specified layer.

To use the menu context as a workflow input:

This procedure adds a menu item to the Results List menu that runs an existing workflow with the results in the Results List as its input.

  1. While editing an app in Web Designer, in the Configure Components panel, click Results List.

  2. Click +Add Menu Item.

  3. In the Title box of the menu item, type a title for the menu item, for example, Run My Workflow With Input.

    This title appears as an option in the Results List menu.

  4. Click Select Icon and to be displayed beside the menu option in the Results List menu.

  5. In the Command box, start typing the name of your workflow, and then select it when it appears in the box.

    When you select a workflow from the Command box, it is immediately translated into a custom command with the required arguments.

  6. Set the commandArgumentInput property to the name of the workflow input you want to pass the menu's context to. For example, MyGraphicsWorkflowInput. By default, this property is set to context, which only works if that is the name of your workflow input.

    The type of the workflow input should match the type of the context of the component menu. For example, the workflow input type is an array of Esri Graphic objects which is the same type as the context of the Results List component menu. For a list of types and contexts, see Component Menu Types and Contexts.

    The commandArgumentInput property overrides the inputs property.

  7. Click File | Save to save the app.

    The workflow menu item now appears in the Results List menu.

© 2019 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 5.2