Aller au contenu principal

Add workflow to Web Viewer, but not to menu

Commentaires

5 commentaires

  • Pairin Mason

    Hi Berend,

     

    You can also configure a workflow to run via event hooks (e.g. Map Initialized in map setting) or "Launch Link workflow" under "Services" section in designer.

    The workflow won't appear to a user, but it will be fired quietly when map is loaded or viewer startup.

     

    Kind Regards,

    Pairin

    0
  • Cam Barnard

    Adding to what Pairin said. When you add a workflow as a 'launch link workflow' it adds it to the app but it is your choice whether to wire it up to a startup event. It is a good 'general' way to get your workflow into the app config regardless of how you want to use it.

    0
  • Berend Veldkamp

    Thanks, it seems I need a Launch Link workflow, since I don't want to run the workflow at startup.

     

    One more question: I can't find this Launch Link workflow in app.json, so how do I get its ID? And how can I set the acceptsUrlParams for it?

    0
  • Cam Barnard

    Hi Berend - when you add a launch link worklfow, it will show up in your app.json. In the example below I added a launch link workflow to my app in Designer called altaddedit ... if I download the app.json and search for the name of the workflow I find a block that looks like this.

     

      {

       "id": "dabfdce6-bfd5-4d2e-9e75-ceabad9a2d5c",

       "title": "language-designer-gen-dabfdce6-bfd5-4d2e-9e75-ceabad9a2d5c-title-rgw3fp",

       "icon": "workflow",

       "portalItem": "https://www.arcgis.com/sharing/rest/content/items/520496eeeec24b7cade87251489ef448",

       "acceptsUrlParams": true,

       "$type": "workflow"

      },

      {

       "id": "87be0905-adac-4c0f-af21-af1cd876d54a",

       "$type": "workflow"

      },

      {

       "id": "d324300d-d765-4761-94af-4dc524d6a06c",

       "locale": "en-US",

       "values": {

        "language-designer-gen-dabfdce6-bfd5-4d2e-9e75-ceabad9a2d5c-title-rgw3fp": "altaddedit"

       },

       "$type": "language-resources"

      }

     

    The ID of the workflow (generated) is dabfdce6-bfd5-4d2e-9e75-ceabad9a2d5c and it is already set acceptsUrlParams to true because it needs to be ready to be used in that way.

    0
  • Berend Veldkamp

    Hi Cam,

     

    You're right, the workflow is there, somehow I managed to miss it.

     

    There is another thing though. When the workflow was added to the I Want To menu, I could get arguments from =$getWorkflowInputs.inputs.context. Now that I removed the workflow from IWT, the context property is named undefined, so I have to use =$getWorkflowInputs.inputs.undefined. It works, but feels weird.

     

    BTW, is there an easy way to get the ID of a Launch Link workflow, or do I have to download the app config?

    0

Vous devez vous connecter pour laisser un commentaire.