Hoppa till huvudinnehållet

Custom Activity Development Server Error

Kommentarer

6 kommentarer

  • Jerry Stafurik

    I've tried deploying the activity to an IIS server, but I'm getting a 404 (Not found) on /activitypack.json/index.js.map. Not sure where 'index.js.map' is coming from, as the request from workflow designer doesn't look right.

    0
  • Ryan Cooney

    Hi Jerry,

     

    There are two flavors of the Workflow SDK. The old version uses the "index.js.map" files. The new version (the one that you are using) produces an "activitypack.json" file.

     

    Since your Workflow designer is appending "index.js.map" to the request it means designer thinks that it is the old style. This suggests that one of the following is the cause:

    • You are using an on-prem version of Workflow older than 5.18. Support for the new SDK was added at 5.18. You'll need to upgrade to 5.18 or newer.
    • The URL on the activity pack portal item does not end with exactly "/activitypack.json". This is how the designer distinguishes between the two styles of SDK.
    0
  • Jerry Stafurik

    Hi @Ryan Cooney? ,

     

    Thanks for you response. Yes, the issue was an older version of Workflow. After upgrading to 5.18.1 the activities on IIS appear in the workflow activity panel, and work as expected.

     

    However, the activity pack hosted on the 'dev' server (https://localhost:5000), still shows the CORS issue. I'm guessing this is due to the fact that workflow designer of hosted on a different machine. Are there any flags I can pass to the dev server, to include a list of allowed origins?

     

     

    Thanks,

    Jerry

    0
  • Jerry Stafurik

    Hi @Ryan Cooney? ,

     

    Any suggestions for "activity pack hosted on the 'dev' server (https://localhost:5000), still shows the CORS issue. I'm guessing this is due to the fact that workflow designer of hosted on a different machine. Are there any flags I can pass to the dev server, to include a list of allowed origins?"

     

    What's the development workflow, when developing on my local machine and running the activities on remote servers? Building and deploying to the server takes time and the code is minified, which is impossible to debug.

     

    Thanks,

    Jerry

    0
  • Ryan Cooney

    Hi Jerry,

     

    I have a workaround for you.

    1. Open node_modules\@vertigis\workflow-sdk\scripts\start.js
    2. Edit line 31 that currently says "Access-Control-Allow-Origin": "*"
    3. Change the "*" to be the root URL of the server where your workflow designer is running. Something like: "https://acme.apps.geocortex.com" or "https://myserver.com".

     

    Normally you should never edit files within node_modules. But this should just be a temporary fix. We have a change coming in the next Workflow release that resolves this issue.

     

    --Ryan

    1
  • Jerry Stafurik

    Thank you @Ryan Cooney? :)

    0

Du måste logga in om du vill lämna en kommentar.