Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Go to Aurora Creator and create a new script. It is useful to create one script for the collection of web services, therefore there is no need to create one script per web query. Please remember to assign a map, user and Aurora service address to the script using Aurora Script Settings window.
    Image Modified
  2. Add empty workflow
    Image Modified
  3. Enter workflow name and workflow ID. Workflow ID will be needed when executing query via URL.
    Image Modified
  4. Add “Find by query” task
    Image Modified
  5. Edit “Find by query” task properties to select which layer will be queried. Enter SQL query with [param1] parameter which will be provided dynamically by other systems/user in query URL. In this example we will query “All schools” layer which contains data about schools. In this case

...

  1. “School” 
    column stores school names. We will set [param1] for this column because we want to enter school name in provided URL to get additional data for selected school. This is how query builder looks in our example:
    Image Modified

    Info
    Please don’t click Verify to check the query. An error message will be displayed because there is no [param1] column in selected table. Just click OK to accept the settings.
  2. Add web service query task
    Image Modified
  3. Edit web service query task properties: select a layer and add properties which should be returned. In this case we want to get additional information (telephone number, address and postcode) of selected school. That’s why we have added 2 properties:

    • First property will fetch telephone number from [Telephone] column.
    • Second property will allow us to fetch address and postcode ( from [Address] and [postcode] columns ) for selected school.

     

    Image Modified

     
  4. When both tasks are configured you can save the script.
    You are now ready to test your new query by entering a web service address using the following pattern:

    http://{webserviceAddress}/query?script={pathToYourScript}$&taskId={yourTaskID}&param1={parameterValue}

...

  1. This is how correct URL look in our case:
    http://localhost/map/webservice.svc/query?script=%5cAurora%5cServices2.AuroraScript%24&taskID=webqueryid&param1=Victory%20School
    Where:
    {webserviceAddress} = localhost/map/webservice.svc
    {pathToYourScript} = %5cAurora%5cServices2.AuroraScript%24 (check step 8)
    {yourTaskIDwebqueryid  (check step 3)
    {parameterValue} = Victory%20School
    Once the URL is executed you will be asked to Save or Open query results. This is how the results look in our example:


    Image Modified