Configure public job queries

Disponible avec une licence Workflow Manager.

Several job query containers and queries are present in Workflow Manager (Classic) by default. These include General Queries (All Jobs query and Unassigned Jobs query), Group Queries (Jobs assigned to my groups and Jobs with steps assigned to my groups), and Personal Queries (Jobs assigned to me and Jobs with steps assigned to me). Job queries in these folders are managed in the ArcGIS Workflow Manager (Classic) Administrator and are available to all users of the system. Users can set any of these as a default query, and that query will execute by default every time the Workflow Manager (Classic) client opens.

Remarque :

Jobs returned by these queries are affected by job filters applied to groups the user belongs to. Default query currently only works for Windows users and does not support portal users.

Add query folders

Use the tools available to add query containers that are used to organize your queries.

  1. Start Workflow Manager (Classic) Administrator and connect to your Workflow Manager (Classic) database.
  2. Expand Queries > Public Queries.
  3. Right-click the query folder where you want the new folder to reside and click Add Query Container.

    The Query Container dialog box appears.

    Remarque :

    The Public Queries folder is the highest-level folder.

  4. Provide a name for the folder in the Query Container Name text box.

    This is the name that appears for users.

  5. Click OK to create the folder.

    The folder is now available to contain other folders or queries.

Add queries

Use the tools available to configure queries that are used to filter your jobs in the application.

  1. Start Workflow Manager (Classic) Administrator and connect to your Workflow Manager (Classic) database.
  2. Expand Queries > Public Queries.
  3. Right-click the query folder where you want the new query to reside and click Add Query.

    The Define Job Query dialog box appears.

    Remarque :

    The Public Queries folder is the highest-level folder.

  4. Provide a name for the query on the General tab.
  5. Click the Fields tab.

    This is where you'll choose the job information to be presented to the user in the List View when the query is executed. Workflow Manager (Classic) automatically manages the inter-table relationships in the system. By expanding nodes off of the fields in the job table, you can choose to show more descriptive information in the query result.

  6. Add fields to the list by double-clicking them or dragging them to the column on the right.
  7. Click the Aliases tab.

    On this tab, you can change the name used to represent each field. You can also reorder the fields. The top field will be the first field on the left, and the bottom field will be the last field on the right.

  8. Change the aliases and order as necessary.
  9. Click the Filtering tab to define what jobs are returned by the query.
  10. Selecting the fields you want to use in your query, the operator, and the value the job must meet.

    You can add as many conditions as needed.

  11. Create the filtering statement in the lower section by linking each condition together with ANDs, ORs, and parentheses.
  12. Click OK to save your changes.

Add a query in SQL view

The SQL view is for advanced users who want to construct queries with the traditional SQL statements. These tools allow you to define more complex queries for filtering jobs in the application.

  1. Start Workflow Manager (Classic) Administrator and connect to your Workflow Manager (Classic) database.
  2. Expand Queries > Public Queries.
  3. Right-click the query folder where you want the new query to reside and click Add Query.

    The Define Job Query dialog box appears.

    Remarque :

    The Public Queries folder is the highest-level folder.

  4. Provide a name for the query on the General tab.
  5. Click SQL View.
  6. Click a table in the Tables list to populate the Fields list with all the fields in the selected table.
  7. Click a field in the Fields list to populate the Unique Values list with all values in the selected field.
  8. Configure query components as necessary in the Select, Name As, From, and Order By text boxes by double-clicking the table or field you want to add.
  9. Specify the where clause to define which jobs should be returned by this query in the Where text box.
  10. Click Verify to confirm that the query is valid.
  11. Click OK to add the query to the specified job query folder.

Share queries

You can use an existing query as the base for another using the Export option on the Define Job Query dialog box.

  1. Start Workflow Manager (Classic) Administrator and connect to your Workflow Manager (Classic) database.
  2. Expand Queries > Public Queries.
  3. Locate the query you want to share.
  4. Right-click the query you want to share and click Edit Item.
  5. Click Export.
  6. Provide a location and file name for the exported query.
  7. Click Save.

    A .jtq file is created. This query file can be imported to use as a base for a new query or shared between users and Workflow Manager (Classic) systems.