Issue with Custom Printing Service in ArcGIS Experience Builder

322
10
2 weeks ago
AkhilRajT
New Contributor II

Hello everyone,

I've encountered an issue with a custom printing service setup in ArcGIS Experience Builder in ESRI Enterprise 11.2 and I'm seeking some guidance or insights to resolve it.

Here's the scenario:

I've created a layout using ArcGIS Pro and saved it in a folder as a .pagx file. Additionally, I've generated Printing Server tools, including Export Web Map and Get Layout Template Info. These tools are then shared as a web tool to the server.

In the sharing process, I've configured the synchronization option as a parameter, and I've added Get Layout Template Info as a tool in the content.

Next, I've used the service URL of this tool in ArcGIS Experience Builder, where the layout name is correctly showing in the template. However, when attempting to print, I encounter an error.

The error message states "Unable to complete operation".

If anyone has encountered a similar problem or has any insights into how to troubleshoot and resolve this issue, I would greatly appreciate your assistance.

Thank you in advance for any help or advice you can provide!

Best regards,

Akhil Raj TError.JPGExperiance Builder.JPGShare As a web tool.JPGWebtool.JPG

Tags (1)
0 Kudos
10 Replies
ArchitSrivastava
Occasional Contributor II

Hello @AkhilRajT ,

Can you share "Info" level logs for the Geoprocessing service. To set the logging level for the Geoprocessing Service specifically, follow the below document:

Enabling info-level geoprocessing messages : Troubleshooting geoprocessing REST services—ArcGIS Server | Documentation for ArcGIS Enterprise

Once, you enable this run the tool again in Experience Builder Application and  in another Tab

Navigate to "ArcGIS Server Manager" > Site > Jobs > Under Service select the GP service and query. This will show you the Job ID generated for the latest run of the tool. Once you open that, it will show you details of the JOB run.

If you can share that it would shed some more light on what is actually failing in the process.

Hope it helps!

-Archit

 

0 Kudos
AkhilRajT
New Contributor II

@ArchitSrivastava  Thank you for providing those instructions. Upon investigating the logs, it appears that the error stems from a failure to create a layer from a service. Export Web Map : Failed to create layer from service at https://************/server/rest/services/dev/GIS_Plot/FeatureServer/0. Failed to execute (Export Web Map). This issue arises during the execution of the print tool.

0 Kudos
ArchitSrivastava
Occasional Contributor II

Hello @AkhilRajT ,

That clarifies it a bit. It seems to me that the layer which is in the map could be causing a problem. In order to further understand can you try the following:

We are trying to understand if the workflow requires print service which can Print secured service (with embedding ags file)

These workflows should allow us to understand the behavior better and come up with a defined solution.

Hope it helps!

-Archit

0 Kudos
AkhilRajT
New Contributor II

Hello @ArchitSrivastava Thank you for the reply. 

While the feature service I've published is an enterprise one, not hosted.

I've encountered issues with it in Web App Builder as well.

I've observed that while I successfully published the layout as a web tool in Enterprise 10.8 and utilized its Export Web Map URL in Enterprise 11.2 Experience Builder without encountering any issues, problems arise when attempting to do the same within Enterprise 11.2 (publishing the web tool in 11.2 and using that URL in 11.2 print). Despite reaching out to Esri support and demonstrating the issue to them, it appears to be specifically related to the custom print tool facility in 11.2. Unfortunately, no satisfactory solution has been provided thus far. Is there a possibility of resolving this within the Enterprise 11.2 environment?

Print.JPG

0 Kudos
ArchitSrivastava
Occasional Contributor II

Hello @AkhilRajT ,

Thanks for clarifying that. It would be very helpful in narrowing down the cause. I would run the same test in one of my 11.2 environment today and will try to gather more information on this. 

Will share more details soon on this.

In the meantime can you confirm the the print tool you have created on 11.2, was it able to print the Sample server 6 service which I  shared above. I would like to if that is working or failing?

-Archit

0 Kudos
AkhilRajT
New Contributor II

Hi @ArchitSrivastava , Thank you for your response. I have tested the shared sample feature service, and it is also encountering errors. 

 

A_Wyn_Jones
Esri Contributor

Printing services have to be synchronous for ArcGIS Experience builder: https://enterprise.arcgis.com/en/portal/latest/administer/windows/configure-services.htm#ESRI_SECTIO...

Can you confirm it's been configured as synchronous? 

 

I'd also check whether the service account (the windows account running ArccGIS  Server) has access to the referenced location of the print templates. I imagine you have done this as the print templates are showing up as expected (unless you didn't register the file location with ArcGIS Server).

"We've boosted the Anti-Mass Spectrometer to 105 percent. Bit of a gamble, but we need the extra resolution."
0 Kudos
AkhilRajT
New Contributor II

@A_Wyn_Jones 

Thank you for the reply. 

I can confirm that the printing services in our ArcGIS Experience Builder have indeed been configured as synchronous. Additionally, we have ensured that the service account, which is responsible for running ArcGIS Server, has appropriate access to the location where the print templates are stored. This ensures that the print templates are showing up as expected within the application.

 

 

 

Capture.JPG

Parameters.JPG

0 Kudos
agdgis
by
New Contributor II

Hello, I found this "temporal" solution in those cases where this error arise.

  1. Modify your Export Web Map code
  2. After this line -->  WebMap_as_JSON = arcpy.GetParameterAsText(0) 
  3. Put this --> WebMap_as_JSON = WebMap_as_JSON.replace('your.external.gis.domain.com','your.server.localaddres.domain')
  4. Open your Layout.pagx with a text editor and replace all the "your.external.gis.domain.com" with "your.server.localaddres.domain"

The problem ocurrs in this line: project = arcpy.mp.ConvertWebMapToArcGISProject(WebMap_as_JSON, layoutTemplate) I don't know why but if you replace your external gis domain with your local domain works.

For example: If your external or internet address is https://mycompany.gis.com/portal/home and your local address is https://mymachine.server.com/ you have to replace mycompany.gis.com with mymachine.server.com first in the code of your Export Web Map and then in the Layout.pagx

Regards! 

0 Kudos