Skip to main content

Activity Block Tags

Custom Workflow activities implemented in TypeScript use block tags to describe the activity metadata that the Geocortex Workflow Designer consumes.

Basic Tags#

The following activity demonstrates the basic metadata tags that could exist on a custom activity and its inputs and outputs.

import type { IActivityHandler } from "@geocortex/workflow/runtime/IActivityHandler";
export interface Inputs {    /**     * @displayName The name of the activity input that appears in the properties panel.     * @description The description of the activity input that appears in inline help tooltips.     * @required Whether the activity input should be presented as required.     */    input?: any;}
export interface Outputs {    /**     * @description The description of the activity output that appears in inline help tooltips.     */    result: any;}
/** * @category The name of the toolbox category the activity will appear in. * @displayName The name of the activity that appears in the toolbox and properties panel. * @description The description of the activity that appears in inline help tooltips. * @helpUrl An absolute URL to additional documentation for this activity. */export class Activity implements IActivityHandler {    async execute(inputs: Inputs): Promise<Outputs> {        return { result: {} };    }
note

If @displayName is omitted, the identifier name will be capitalized, split up by camelCase, and used as a default display name. For example, myLongParameterName becomes "My Long Parameter Name".

note

The @required tag only applies to the validation in Workflow Designer. Runtime validation of required inputs must be implemented by the execute(inputs) method of the activity.

Activity Compatibility Tags#

You can specify which environments an activity is compatible with by adding the appropriate tags to the activity class. This will cause Geocortex Workflow Designer to only display the activity when the workflow's deployment settings indicate it is compatible, and generate warnings if the activity is used in an incompatible environment. You can use the following tags on the activity class;

  • @onlineOnly
    • Indicates that the activity will not work without network connectivity. It is sufficient to add the tag without any text beside it.
  • @clientOnly
    • Indicates that the activity will only run in a client environment such as web browser or mobile app. It is sufficient to add the tag without any text beside it.
  • @serverOnly
    • Indicates that the activity will only run on a server running Workflow Server. It is sufficient to add the tag without any text beside it.
  • @supportedApps
    • A comma-separated list of apps supported by the activity. Workflows targeting an app that is not listed here should not use this activity.
  • @unsupportedApps
    • A comma-separated list of apps not supported by the activity. Workflows targeting an app that is listed here should not use this activity.

App values that currently supported in Geocortex Workflow Designer:

  • WAB (Web AppBuilder for ArcGIS)
  • GVH (Geocortex Viewer for HTML5)
  • GWV (Geocortex Web Viewer)
  • GMV (Geocortex Mobile Viewer)

If you do not want to limit the use of an activity, do not add any of the above tags. It will appear in the toolbox and will not generate any warnings when used.

note

The intention is that you use either @supportedApps or @unsupportedApps, depending on the situation. Do not use both.

Example: Activity Compatibility Tags#

The following example declares that an activity will only work on Geocortex Web or Web AppBuilder for ArcGIS in an online and client side environment. The display name will default to "Does Not Work On Mobile".

/** * @supportedApps WAB, GWV * @onlineOnly * @clientOnly */export class DoesNotWorkOnMobile implements IActivityHandler {    ...}