npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@vertigis/workflow-activities-configurable-queries

v2.0.5

Published

Activities for working with configurable queries in VertiGIS Studio Workflow

Downloads

71

Readme

CI/CD npm

This project contains activities for generating and executing configurable queries. A configurable query workflow is comprised of a dynamically generated form and dynamically generated where clause to be applied to an ArcGIS Feature Query. Queries are configured using a collection of SearchFields, which define the field, form element and operation to be applied to a Feature Layer query. The project also includes a complete Workflow implementation.

Requirements

VertiGIS Studio Workflow Versions

These activities are designed to work with VertiGIS Studio Workflow versions 5.30.1 and above.

Usage

To use these activities in VertiGIS Studio Workflow Designer you need to register an activity pack and then add the activities to a workflow.

Register the Configurable Queries activity pack

  1. Sign in to ArcGIS Online or Portal for ArcGIS
  2. Go to My Content
  3. Select Add Item > An application
    • Type: Web Mapping
    • Purpose: Ready To Use
    • API: JavaScript
    • URL: The URL to this activity pack manifest
      • Use https://unpkg.com/@vertigis/workflow-activities-configurable-queries/activitypack.json for the latest version
      • Use https://unpkg.com/@vertigis/[email protected]/activitypack.json for a specific version
      • Use https://localhost:5000/activitypack.json for a local development version
    • Title: Your desired title
    • Tags: Must include geocortex-workflow-activity-pack
  4. Reload VertiGIS Studio Workflow Designer
  5. These activities will now appear in the activity toolbox in a Configurable Queries category

Search Field

The Add Query Elements activity accepts an array of Search Field JSON objects as an input. The SearchFields.json file provides an example.

Search Field Schema

{
  /* The name of layer field to search (Required) */
  field: string,
  /* The SQL operator to apply to the field (=, !=, <, >, >=, <=, IN, and BETWEEN) (Required) */
  operator: string,
  /* The name of the field to use as the parent in a cascading relationship. (Optional)*/
  dependsOn: string,
  /* The form element type to use for the search. (Required) */
  type: "AutoComplete" |
        "CheckBox" |
        "CheckGroup" |
        "DatePicker" |
        "DateRangePicker" |
        "DateTimePicker" |
        "DropDownList" |
        "ItemPicker" |
        "ListBox" |
        "Number" |
        "NumberRangeSlider" |
        "NumberSlider" |
        "RadioGroup" |
        "TextArea" |
        "TextBox" |
        "TimePicker",
    
  /* The title to appear for the search element. (Required) */
  title: string,
  /* The description to appear for the search element. (Optional) */
  description: string,
  /* The default value of the search field.  Only applies when cascade is false.  (Optional) */
  value : defs.Value,
  /* The events to be used for the element. If cascade is set to true then a 'populate' event must be set.  If the type is Autocomplete then the
     suggest event must be set.  (Optional) */
  events: {
    changed: string | undefined,
    clicked: string | undefined,
    populate: string | undefined,
    suggest: string | undefined,
    validate: string | undefined,
  },
  /* A form element JSON object.  This is useful when finer grained control over the form is required. (Optional) */
  element: defs.Element
}

Configured Query Workflow

The Configured Query Workflow is a full implementation of a configurable query form. It can be used as-is, run as a SubWorkflow from another Workflow or modified to meet your needs.

Usage

To use the Configured Query Workflow, download the content.json to your local machine and import it into your Portal using VertiGIS Studio Workflow designer.

Workflow Inputs:
  • layerId (Required): The layer Id for the layer to run the stored query against. Supported layer types include FeatureLayer, SubtypeGroupLayer, SubtypeSubLayer and MapImageLayer.
  • sublayerId (Optional): The sublayer to query from a MapImageLayer.
  • formTitle (Required): The title to appear in the form.
  • formDescription (Optional): The description text to appear with the form's title.
  • searchFields (Required): An array of SearchField objects.
  • eventSubWorkflow (Optional): The Url to a subworkflow to be executed when a form event is fired. The SearchFields, event type, event data and form state are passed to the subworkflow.
Workflow Outputs:
  • action: The form action.
  • formState: The state of the form.
  • queryResults: The results of the configured query if the workflow was not cancelled.

Select Query Workflow

The Select Query Workflow presents the user with a list of queries to execute and runs the Configured Query Workflow in a Run Workflow activity.

Usage

To use the Select Query Workflow, download the content.json to your local machine and import it into your Portal using VertiGIS Studio Workflow designer.

Workflow Inputs:
  • formWorkflow (Required): The Url to the Configured Query Workflow
  • inputModel: An array of json objects that include the inputs for the Configured Query Workflow. See the Input Model for an example of how to configure this parameter.
  • eventSubWorkflow (Optional): The Url to a subworkflow to be executed when a form event is fired. The SearchFields, event type, event data and form state are passed to the subworkflow.

Development

This project was bootstrapped with the VertiGIS Studio Workflow SDK. Before you can use your activity pack in the VertiGIS Studio Workflow Designer, you will need to register the activity pack.

Available Scripts

Inside the newly created project, you can run some built-in commands:

npm run generate

Interactively generate a new activity or form element.

npm start

Runs the project in development mode. Your activity pack will be available at http://localhost:5000/main.js. The HTTPS certificate of the development server is a self-signed certificate that web browsers will warn about. To work around this open https://localhost:5000/main.js in a web browser and allow the invalid certificate as an exception. For creating a locally-trusted HTTPS certificate see the Configuring a HTTPS Certificate section on the VertiGIS Studio Developer Center.

npm run build

Builds the activity pack for production to the build folder. It optimizes the build for the best performance.

Your custom activity pack is now ready to be deployed!

See the section about deployment in the VertiGIS Studio Developer Center for more information.

Documentation

Find further documentation on the SDK on the VertiGIS Studio Developer Center