EA Workspace – How to Export Enterprise Modeling Diagrams Outside UI Builder - Need PDF from portal

imranaalam
Tera Contributor

Hello Everyone,

I’m looking for guidance and solutioning support for a requirement related to ServiceNow Enterprise Architecture (EA) Workspace, specifically around Enterprise Modeling and Visualization and diagram export.

Background

In EA Workspace, under Enterprise Modeling and Visualization, users can:

  • Create new diagrams
  • Update existing diagrams

Each time a diagram is created or updated:

  • A record is created or updated in the Diagram Instance OOB table
  • The diagram structure is stored as JSON

When opening a diagram record:

  • There is an “Open in Builder” option
  • This opens UI Builder
  • UI Builder provides an OOB “Download” button
  • Clicking the button downloads a PNG snapshot of the diagram

Technical Observation

  • The OOB Download functionality internally uses a third‑party framework: GoJS
  • GoJS consumes the stored diagram JSON and generates the PNG image
  • The implementation details (APIs, functions, input parameters) are not exposed 
  • The GoJS integration appears to be restricted for ServiceNow internal use only

Business Requirement

The requirement is to create the same diagram download capability outside UI Builder, specifically:

  • Provide a Download option in a Portal / custom UI
  • Generate a 3‑page PDF report related to the diagram record:
    • Page 1: Record metadata
    • Page 2: Diagram snapshot (PNG)
    • Page 3: Additional related details / relationships

The key requirement is that the diagram image should match exactly what ServiceNow generates using the OOB Download button in UI Builder.


What I’ve Already Tried

I’ve explored multiple approaches, but none have provided the expected outcome:

  1. Tried to access or reuse GoJS APIs used by ServiceNow

    • Not possible due to restricted/internal implementation
    • Unable to determine which inputs are passed or which functions are invoked
  2. Tried recreating the diagram manually using the stored JSON

    • Not successful
    • Diagram rendering is not purely JSON‑driven
    • JSON contains system data (sys_ids, internal references)
    • Additional internal rendering logic seems to be involved
  3. Tried automation using RPA

    • Not feasible or reliable
    • Not suitable for a production‑grade or maintainable solution

Despite multiple attempts, I’m unable to produce an identical diagram image outside UI Builder.


What I’m Looking For

I’d appreciate guidance from anyone with experience in:

  • ServiceNow EA Workspace internals
  • GoJS (especially image export mechanisms)
  • Identifying a supported workaround or architecturally sound approach
3 REPLIES 3

Doron Orbach
ServiceNow Employee

Hi, Did you look into this functionality that was released recently, to generate documents from the Enterprise Modeling and Visualization diagrams page:

 

https://www.servicenow.com/docs/r/pt-BR/application-portfolio-management/create-documents-for-diagra...

 Thanks for the update. From what I understand, a similar capability is planned to be introduced by ServiceNow in an upcoming release. However, based on the available documentation, it appears that this feature will be supported only within the Workspace/UI Builder context.

The core requirement here is slightly different - we need to generate a report (PDF) and expose a download option in a Portal, not just within the workspace. That’s why I’m still exploring whether there’s a supported approach or workaround to achieve this use case outside Workspace.

One more point that might help is that you can export the document you created above as a PDF: 

DoronOrbach_0-1775850877863.png