AnsweredAssumed Answered

Geoprocessing Task

Question asked by jay.kapalczynski on Sep 17, 2019
Latest reply on Sep 23, 2019 by jay.kapalczynski

Please Help

I am trying to run a GP task from a test Appstudio app.

This is what I have right now and want to see if I am on the right this varies from the JavaScript API


1. ALL I am trying to do is Pass a few variables on a button click to the GP service.

2. Once at the GPS Service I want to write those to Variables.


I just want to make sure I can transfer this data and grab it on the back end.  



Right now I am referencing an ESRI same service I will replace this with mine.


// snip

    property GeoprocessingJob viewshedJob: null

// snip

    // viewshedTask.calculateViewshed(mouse.mapPoint);

    GeoprocessingTask {
        id: viewshedTask
        url: ""
       function calculateViewshed(location) {    
            var viewshedParameters = ArcGISRuntimeEnvironment.createObject("GeoprocessingParameters", {
                            executionType: Enums.GeoprocessingExecutionTypeSynchronousExecute
            var ObjectID = "65421"   // will get these values from textboxes
            var Comments = "something"  // will get these values from textboxes
            var params = {"OBHECTID":ObjectID,"comments":Comments };
            viewshedParameters = params;
            // Create the job that handles the communication between the application and the geoprocessing task
            viewshedJob = viewshedTask.createJob(viewshedParameters);
            // Create signal handler for the job
            // start the job



import arcpy
import os

# Geting user input for project name, status, type, submital date and planner name 
varObjectID = arcpy.GetParameterAsText(0) 
varComments = arcpy.GetParameterAsText(1)

# do something with the returned values