Sharing/Publishing custom Activities
I have created a great utility that would be of great use to others, in our organisation, it works well when I serve it from VS Code on my machine but how do I get it sharable via ArcGISonline?
The readme doc is a bit light on detail.
Thanks, this SDK ability shows a great deal of promise for custom tools and increased usability.
-
Before you share an activity pack you'll want to:
- Deploy it to a real web server like IIS. See the "IIS" section of the Readme.
- Sign in to ArcGIS Online.
- Find the item that represents the activity pack. This was created in the "Register the Activity Pack" section of the Readme.
- Update the URL of the item to point to the real web server location instead of the development web server.
To share an activity pack with other users in your organization:
- Sign in to ArcGIS Online.
- Find the item that represents the activity pack.
- Click the "Share" button.
- Select your organization or the specific groups that contain the workflow authors you want to target.
A couple extra notes:
- You only need to share the activity pack item with workflow authors. You don't ever need to share it with the end users that will run the workflow.
- Workflow Designer will only load activity packs that come from users in your organization. If you want to load an activity pack that was created by someone in another organization you'll have to create your own item that points to it. This is a security precaution.
--Ryan
0 -
Thanks for the guidance but still not having any luck.😭
I was wondering
### IIS
1. Ensure the IIS web site supports SSL and uses a valid SSL certificate.
1. Register the `dist` folder as a virtual directory in IIS.
When it says register is it expecting the whole structure of the Dev environment, eg src, lib etc.
Also when I change AGOL from https://localhost:57999/ to https://myserver/ do I include "dist" and/or "Actitivies" or just the base
0 -
You need to server the contents of the 'dist' directory.
Let's assume the SDK project exists at C:\Projects\activity-sdk. The "dist" directory would then be at C:\Projects\activity-sdk\dist.
Let's assume the URL to IIS on the machine is https://myserver/.
In IIS Manager I would create a new Virtual Directory with an Alias of "customactivities", and a Physical path of "C:\Projects\activity-sdk\dist".
The URL to register in the ArcGIS item would be "https://myserver/customactivities/".
--Ryan
0 -
Now that looks good but I am getting...
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://myserver.au/index.js.map. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)
I have added Crossdomain.xml and clientaccesspolicy.xml to no avail 😢
0 -
Crossdomain.xml and clientaccesspolicy.xml are for Flash and Silverlight applicaitons.
For JavaScript applications you need to enables some CORS specific headers. There are many different ways to do this. Here is an example https://enable-cors.org/server_iis7.html that allows requests from any domain. There are some security considerations to CORS headers so I'd recommend only white-listing the https://apps.geocortex.com domain instead of *.
--Ryan
0 -
Yep this is the answer!
Pity I missed it a month ago
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
6 kommentarer