|
POST
|
Make sure the Flow has been turned on. If the Flow is off, the receiver is unreachable, thus you cannot connect to it.
... View more
07-19-2023
07:04 AM
|
0
|
15
|
7929
|
|
POST
|
I believe you're correct it was added in 1.6. I'd suggest using at least 2.0 or higher as I know the team fixed some bugs with it. Try this code snippet to create/manage webhooks from arcgis.gis import GIS from arcgis.features.layer import FeatureLayerCollection gis = GIS("https://www.arcgis.com", "username", "password" ) # Find your layer item i= gis.content.search("webhook") # I know I only have 1 feature layer named "Webhook" so I can cheat with the index flc = FeatureLayerCollection.fromitem(i[0]) mgr = flc.manager wh = mgr.webhook_manager wh.create("My WEBHOOK", "https://webhook.site/aaabbb11223", "FeaturesCreated")
... View more
03-23-2023
12:07 PM
|
1
|
1
|
952
|
|
POST
|
Thanks. That's sort of good news / bad news. I'm still skeptical the patch has caused the issue, but if you've only had the errors since applying the patch, it's now a question of how the communication was interrupted. I'll talk to a couple of colleagues and see if it's reproducible. Unfortunately, you'll see the messages once a minute as Server attempts to re-establish the connection. Please respond back with the result of restarting Server.
... View more
10-07-2022
09:00 AM
|
0
|
2
|
6468
|
|
POST
|
Hi @DavidColey I don't have much knowledge of that particular patch, but I'm doubtful that it caused the problem. The message is indicating that GIS Server is failing to connect to the required components for webhooks. Are you able to restart the GIS Server? A restart will sometimes fix this problem. Is there any chance the problem was there before you applied the patch and you didn't notice the logs? If so, we'd need to figure out what might be in the way of the connection. (closed ports perhaps)
... View more
10-07-2022
08:02 AM
|
0
|
4
|
6479
|
|
POST
|
Kim, I've attached a zip file with my progress on this. I'll note it's not quite complete, but offers the code you'll need to perform extract changes. (Specifically, I didn't complete the authentication to ArcGIS.com, the code assumes the service is publicly accessible). I'm trying to support both Online FS webhooks and Enterprise FS webhooks in the same script, so it needs to handle connecting to both. You'll want to start in the agol_receiver.py -- all this does is grabs a JSON value and launches the workflow. In production, this would act as the webhook receiver and handle requests in real-time, but for this, it's just the entry way to test. Inside extractChanges.py you'll see the basic workflow (start at the bottom). I hope this helps. When I get it finished up, I'll add it to the previously mentioned github repo.
... View more
10-05-2022
09:57 AM
|
0
|
1
|
3343
|
|
POST
|
I'm getting webhooks sent from a couple of different Orgs/FeatureServices I have on arcgis.com. From your screen shot, you have Active:True and accepting any changes ("*"). So everything looks good.
... View more
09-08-2022
01:02 PM
|
0
|
0
|
3415
|
|
POST
|
One other thing - would it be helpful if I added a Python sample for the Extract Changes workflow? Every so often I hear about this want, and I'd like to do it, but it falls off my priority list. It's possible someone has already written the code (so a matter of finding it), but either way, if it would be useful, I'd try to get it created as a sample in the mentioned repo.
... View more
09-08-2022
06:53 AM
|
1
|
0
|
3422
|
|
POST
|
@RogerAsbury to answer your first question about getting the information from Extract Changes -- I'm not aware of any changes coming to this workflow. The webhook is purposely sent with what has been termed as a "skinny payload". Basically, a small payload without sensitive information inside. This is grounded in both performance and security reasons. I do sympathize that it takes a few steps to go back and grab what actually happened via the API. I'm glad you and @BlueBunnies have found the github samples. Debugging Azure can be challenging sometimes, but it looks like you found the real time console. My suggestion if things aren't making sense in Azure, switch the payload URL to some place like https://webhook.site/ This is a great resource for quick tests. It takes the code and complexity out of grabbing those payloads.
... View more
09-08-2022
06:28 AM
|
0
|
2
|
3424
|
|
POST
|
Hi Jack, I was working on this today and cannot reproduce the error you're seeing. I have my receiver setup to return "true" - you can note my copy/paste results below where the time stamps are all in the same second. I tried testing in a couple of ways - 1) Multiple browser tabs and setup to click save real quickly. 2) I put a breakpoint on my receiver, essentially it's up and running, but forced it to stop short of responding. I sent off a few triggers before cleaning the break point. I looked through our error messages, and I don't see something where we throw peer not authenticated. (I'm not saying it's impossible that's from Portal, I however couldn't find an instance of when/why we throw it). Is there any chance this is a message coming from your receiver? Do you get this with other receivers? Any chance you could setup a different one, or even a 3rd party service and perform the test. Reference: https://github.com/Esri/webhooks-samples 2022-06-10 09:04:03 true {"success":"true"} 2022-06-10 09:04:03 true {"success":"true"} 2022-06-10 09:04:03 true {"success":"true"} 2022-06-10 09:03:42 true {"success":"true"} 2022-06-10 09:02:51 true {"success":"true"} 2022-06-10 09:02:51 true {"success":"true"} 2022-06-10 09:02:33 true {"success":"true"} 2022-06-10 08:57:20 true {"success":"true"} 2022-06-10 08:57:20 true {"success":"true"}
... View more
06-10-2022
09:10 AM
|
1
|
0
|
1551
|
|
POST
|
Hi - I'm trying to understand the workflow. Do you have more than 1 webhook created that would be listening to groups? Or is there just a single webhook, but your receiver is responding to the webhook and performing actions on the group which cause that same webhook to fire again. If you have a 2nd webhook configured, what events is it listening for? Just group, or "*", or? I haven't seen the error you've mentioned, nor did I have any luck trying to reproduce it. However, I'm not sure I've set my test up in the same way you have yours.
... View more
05-31-2022
08:35 AM
|
0
|
2
|
1570
|
|
POST
|
Ok, that gets us somewhere. I'm guessing its probably a licensing issue. One more test? The following will capture and exception caused by trying to import arcpy. Hopefully this provides a helpful message to see whats going on. f = open("c:/temp/output.txt", 'w')
f.write("this is before arcpy \n")
try:
import arcpy
f.write("arcpy imported\n")
except Exception as e :
f.write(str(e))
f.close()
... View more
06-28-2017
05:59 AM
|
0
|
4
|
2134
|
|
POST
|
Hi Shelby, I was made aware of the fact that yes, indeed there is a difference between 1.4 and the upcoming release of 2.0. You cannot perform the export from a scheduled task. This is documented here: “ If you create a task to run when the user is logged off of the Windows machine, then the Layout Class export functions (for example, exportToPDF) and the Bookmark Class updateThumbnailfunction will not work. These functions require a user to be logged on to Windows in order to work” http://pro.arcgis.com/en/pro-app/arcpy/mapping/guidelines-for-arcpy-mapping.htm They've overcome this for 2.0, thus you should be able to export from a scheduled task. Now that said...the fact you can't run the test script I gave you (of running a gp tool)...that narrows down the problem a little bit. Could you update it to run this? If this does not create a text file with anything, not even "this is before arcpy"...then this has nothing to do with licensing or arcpy and its something to do with running python through your scheduled task. If it creates the textfile and outputs some lines...well depending how far it gets, that tells something else. f = open("c:/temp/output.txt", 'w')
f.write("this is before arcpy \n")
import arcpy
f.write("this is after arcpy \n")
p = arcpy.mp.ArcGISProject("C:\\arcgisserver\\documents\\GPService\\ProGPPDS.aprx")
maps = p.listMaps()[0]
layers = maps.listLayers()[0]
f.write("this is before the tool\n")
gc = arcpy.GetCount_management(layers) f.write(gc.getMessages()) f.close() I realize your final goal is to export from a scheduled task. As mentioned, unfortunately you wont be able to do that in 1.4. But we can continue to troubleshoot and try to figure out why you cant run a simple scheduled task. If you get that figured out, then once Pro 2.0 is available you'll be set to export.
... View more
06-27-2017
10:52 AM
|
1
|
7
|
2134
|
|
POST
|
Being in the administrators group should be enough - that is how I do it. You've said "it doesn't work". Maybe we need to explore what that means - whether the task is being run and failing, or whether the task doesn't run at all. Could you take the following code and turn this into a schedule task? You'll need to update the path to a project that exists, with a map and has a single layer. The thought here is, you'll get a text file with the messages from the get count tool. If that works, you know there is no license problem and the schedule task work - its a problem with the export. Otherwise if this fails to produce a txt file, then it could still be a license problem. At that point I'd check to see what messages you have in the event viewer or the task scheduler itself. import arcpy
p = arcpy.mp.ArcGISProject("C:\\arcgisserver\\documents\\GPService\\ProGPPDS.aprx")
maps = p.listMaps()[0]
layers = maps.listLayers()[0]
gc = arcpy.GetCount_management(layers)
f = open("c:/temp/output.txt", 'w')
f.write(gc.getMessages())
f.close()
... View more
06-27-2017
07:13 AM
|
0
|
11
|
2134
|
|
POST
|
Focus your efforts with concurrent or single use license. If you're using named user.... it should work, the big unknown is if the "app" is still logged in. There is a period of time that the license should remain valid. However, since you're not logged in and have an active windows session, you cant guarantee that you're logged in. If you license singe use or concurrent, when you "import arcpy" from the script all the bits and pieces just get the license from the computer or network and all should work just fine (like you see it working from ArcMap). And yes, its possible its an OS level setting. I dont have a Win2012 machine to put Pro on (I just went to 2016). I'll see if I can find a colleague to help test on that. I assume you're using your domain account to run the task? Or a local account on the machine? Its also possible its a 1.4 issue fixed in 2.0 -- although I did a quick sweep of bugs and didn't see anything. (If it was a fixed bug, its very possible I missed it in the quick search I did.)
... View more
06-26-2017
11:28 AM
|
1
|
14
|
1919
|
|
POST
|
Hi Shelby, I just tried your workflow and it worked fine for me. Here are the particulars of my test: License as Concurrent use (connecting to a license manager) Python script: import arcpy p = arcpy.mp.ArcGISProject("C:\\arcgisserver\\documents\\GPService\\ProGPPDS.aprx") layout = p.listLayouts()[0] layout.exportToPNG("c:/temp/KEVIN.PNG") Task scheduler settings: Run whether user is logged on or not Do not store password is UNCHECKED (I entered my password when I made the task) Configured for Windows 2016 (and 2008, I created two tasks) Occurs at: just a time I set for today, then logged off before it ran Starts program: C:\ArcGIS\bin\Python\envs\arcgispro-py3\python.exe Argument: C:\PythonStuff\ExportPNG.py No other settings configured Like I said, I logged out. Let the task run. Came back and have c:\temp\kevin.png waiting for me. Checking the history of the task I see that it ran successfully. Task Scheduler successfully finished "{d7f8189f-2cd6-4fb2-b465-95e91a6464c7}" instance of the "\KEVIN - python export PNG" task for user "domain\kevin". Note - this is using Pro 2.0 (which will be available to you soon). I really dont think there is any difference between 1.4 and 2.0 in regards to this workflow. If this continues to not work for you, can you provide more information. Such as your script, messages from the task scheduler, task scheduler settings, etc.
... View more
06-26-2017
11:17 AM
|
2
|
17
|
1919
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-20-2023 06:37 AM | |
| 1 | 09-18-2025 07:07 AM | |
| 2 | 09-18-2025 06:52 AM | |
| 1 | 03-23-2023 12:07 PM | |
| 1 | 10-21-2024 12:40 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-30-2025
06:25 AM
|