Skip to main content

Run a Geoprocessing Task from WF5

Comments

6 comments

  • Permanently deleted user

    In the message in a bottle example, they convert the GeometryPicker Point using the Get FeatureSet from JSON and then pass it as an argument in the Run Geoprocessing Task. Something similar would probably work for you?

     

    Get FeatureSet from JSON:

    ={

      geometryType: "esriGeometryPoint",

      spatialReference: $displayform1.state.GeometryPicker1.value.geometry[0].spatialReference,

      features: [{

        geometry: $displayform1.state.GeometryPicker1.value.geometry[0],

        symbol: {"angle":0,"xoffset":0,"yoffset":0,"type":"esriPMS","url":"https://developers.arcgis.com/javascript/3/samples/gp_bottle/images/sailboat.png","width":19.5,"height":19.5}

      }]

    }

     

    Run Geoprocessing:

    Arguments

    ={

    Input_Point: $featuresetfromjson1.featureSet,

    Days: $displayform1.state.Number1.value.numeric

    }

    0
  • Sean Phayakapong

    I tried using the example, but I don't think I am passing the argument correctly.

    0
  • Permanently deleted user

    You might want to post some of your code so someone may be able to see what's wrong. You could also try posting any errors that may show up in the browser's console since those can help pinpoint where the error is happening.

     

    Also, have you tried using the "Log" task. Anything you put in it is logged to the browser's console. This way you can see exactly what you're getting from workflows and what you're passing to arguments. You can sometimes find errors in your code this way when you see that values aren't what you expected them to be.

    0
  • Claire Inbody

    Sean - Did you ever get your geoprocessing activity to work?

    We are having troubling passing in the argument as well.

     

    0
  • Sean Phayakapong

    Hi Claire, I have not. I tried to do what Matt was suggesting but haven’t found the time to upload or test more into this, but if you figure it out, would you mind uploading a sample of your workflow? I will do the same.

    0
  • Claire Inbody

    Sean - We got it working. Here is the syntax we used:

    ={

     

     "Enter_Control_Number": `CONTROL_NO = '${$form1.state.autoComplete1.label}'`

     

    }

     

    Where Enter_Control_Number is the parameter name in our geoprocessing tool.

    Thanks,

    Claire

     

    0

Please sign in to leave a comment.