Hi All,
ArcGIS enterprise version: 10.9.1 & ArcGIS Pro V 3.0
We are using ArcGIS Workflow Manager Server (service-driven).
When we try the following REST Query URL in browser
Input URL-1:
https://sampleserver6.arcgisonline.com/arcgis/rest/services/SampleWorldCities/MapServer/0/query?wher...POP+%3D+521934&returnCountOnly=true&f=pjson
Output result:
{
"count": 1
}
We have created simple workflow diagram using "Send Web Request" step and configured the above mentioned Input URL-1, getting the output result ("count": 1) as expected.
---------------------------------------------------------------------------------------------------------------------------------------------------
When we try the following REST Query URL in browser
Input URL-2:
https://sampleserver6.arcgisonline.com/arcgis/rest/services/SampleWorldCities/MapServer/0/query?wher...POP+%3D+1&returnCountOnly=true&f=pjson
Output result:
{
"count": 0
}
We have created simple workflow diagram using "Send Web Request" step and configured the above mentioned Input URL-2, getting the following error and unable to proceed with the next steps.
We have chosen "Expressions" under Path Logic options.
Expected behavior: we should get the output result ("count": 0)
Appreciate any help on this. Thanks.
Regards,
Sirish
Solved! Go to Solution.
We had a very similar problem in directing path logic. here is the explanation from our (esri.australia technical rep Razi Mosadeghi). I have verified that the suggested fixes work
Please find below the explanation they have provided on why Boolean(jobExtendedProperty($job, 'switchtable', 'nerrors')== 0) Does not work:
It appears == 0 returns the string representation of the value here and not the actual value (an integer).
In addition, core Arcade logic is playing a role here as well. In Arcade, the > and < operations will first try to evaluate the result as a string value. If that fails (because you aren't using a string), it will then try to evaluate the result as a integer, which is what we are using here. The == function doesn't have that same logic. It tries to compare a string to a string and then will fail if it can't.
So, if you would like to use == 0 logic, we would need to do either one of the following:
We have found some workaround....
getting error....when we use the following arcade expression
Boolean(JobOutputValue($Job, 'd8136a1e-4d48-4faa-94b9-859f64a09847', 'count1') == 0)
Not getting error....when we use the following arcade expression
Boolean(JobOutputValue($Job, 'd8136a1e-4d48-4faa-94b9-859f64a09847', 'count1') <= 0)
We had a very similar problem in directing path logic. here is the explanation from our (esri.australia technical rep Razi Mosadeghi). I have verified that the suggested fixes work
Please find below the explanation they have provided on why Boolean(jobExtendedProperty($job, 'switchtable', 'nerrors')== 0) Does not work:
It appears == 0 returns the string representation of the value here and not the actual value (an integer).
In addition, core Arcade logic is playing a role here as well. In Arcade, the > and < operations will first try to evaluate the result as a string value. If that fails (because you aren't using a string), it will then try to evaluate the result as a integer, which is what we are using here. The == function doesn't have that same logic. It tries to compare a string to a string and then will fail if it can't.
So, if you would like to use == 0 logic, we would need to do either one of the following:
In our implementation for 10.9.1 WFM, no customization is involved. Still facing such issue.
What could be possible solution...
Hello @sirishb ,
Thank you for your question. In ArcGIS Workflow Manager 10.9.1 and 11 I was unable to reproduce this issue following the posted steps, however it may be due to either an issue with the Arcade expression or the authentication configuration. One way I was able to reproduce the behavior you saw was when there was a mismatch between the step ID used in the Arcade expression and the Send Web Request step’s ID, if you can confirm whether that’s the case. I also see the same behavior when the request’s authentication is incorrect, i.e. an invalid or expired token.
If there are no issues there then I recommend you reach out to Technical Support so they can help you investigate this issue further.
Best regards,
Robert Smith
Hello @RobertSmith1 ,
Thanks for the reply.
We are not getting error when we use '<=0' in arcade expression in this way we can confirm that, it is not an issue with "step ID" or "Authentication".
We are getting error when we use '== 0' in arcade expression.
We are contacting Technical Support and will keep posted here once we get resilution from Techsupport.
Thanks.
Sirish