Skip to main content

Read File - WF5

Comments

3 comments

  • Nelson Dobbs

    This is a long workaround to this that I am using in my GW5 workflow to read a zip file and also a spreadsheet, but can be used to read any file.

    I basically have a dummy feature service set up for this so I can read the attachment from ArcGIS Server in GW4. Hopefully this workflow will be simplified when the on-prem version of GW5 comes out. Not sure it will solve this or not.

     

     

    In GW4 do this:

    1. Create a workflow to read the file and get the information you need
      1. You will need two input arguments and an output argument
        1. Input1 = Object ID of the feature you created and uploaded in 1 and 2 above
        2. input2 = attachment ID from number 3 above.
        3. output = featureset or json or geometry, whatever you need the output to be
    2. Use the WebRequest Activity to read the attachment from ArcGIS Server.
    3. Do your normal processing of the bytes from the file in GW4 (there are some good resources on the GW4 support site for this)
    4. When you get your output you want use the Output Argument, this will be passed back to GW5 when the GW4 workflow is complete.

    NOTE: This workflow must be registered with an Essentials site to run and you must use the rest endpoint on the site to run this workflow and get your results.

     

    In GW5 do this:

    1. Create a polygon, can be really small, it's just a placeholder polygon.
    2. Add feature to the feature service
    3. Upload the attachment from the filepicker
    4. Use the Run Essentials Workflow and pass through the Feature ID and attachment ID to the GW4 workflow.
    5. Use the results from the Run Essentials Workflow to do what you need to do in GW5.
    6. When you are done you can just delete the feature you uploaded, or if you want to preserve the geometry from the JSON you are reading you can take the Geometry from that polygon and use the Update Feature activity for that feature.

     

    I hope this helps, let me know if you have any questions or if something doesn't make sense.

     

    0
  • Stefan Schweigert

    Hi David,

     

    In the next few months, we will be releasing an on-premises Workflow Designer version which will include several activities related to interaction with files on your file-system.

     

    Thanks, Stefan

    0
  • Permanently deleted user

    Nelson, Thanks for taking the time for such a good answer. Much appreciated. Seems the way to go for the moment.

     

    Stefan, that's good to know. Thanks.

     

    As I was only wanting to get some JSON, as a Q&D I just set up a form with a text area into which the user can paste. Not very nice, but so far at least works for up to 3mb of JSON.

     

    Thanks a lot for your replies guys!

    0

Please sign in to leave a comment.