Get diagram picture in DNG into RPE report
Accepted answer
With DNG 6.0.4 onwards, DNG diagram artifacts can be rendered directly. You should use the text schema and print the rich text body (dataSource/artifact/content/text/richTextBody/div) just like you do for other text artifacts.
Note: There is no separate "diagram" artifact format supported by DNG REST API. While designing RPE template, consider diagram artifact as "text" artifact.
5 other answers
Which version of DNG are you using? Can you specify the Artifact type and Artifact format selected while creating artifact in DNG?
If it is the new "Diagram" Artifact format, it is not a supported artifact format in DNG Reportable REST API. Unlike wrappedResourceImageURI for WrapperResources, we cannot get diagram URI for diagrams. To print the diagram, you can Insert the Diagram artifact into a Text artifact and then GET the Text artifact (https://server:port/rm/publish/text?resourceURI=UUID&maximiseEmbeds=true).
If it is a Graphical Artifact (ex. Business Process Diagram), you can derive the imageURL as in the attached sample template. For other graphical artifacts (ex. UCD), you can use dataSource/artifact/content/usecasediagram/rendering as Image content.
Comments
No. There is an Enhancement created (Add Diagram artifact format to the RDNG Reportable REST API), which is under consideration.
Given that there are only a few artifact formats in DNG 6.0.3, like Module, Text, or Diagram; any artifact of format "Diagram" is unable to be directly published by RPE? Do I understand this correctly?
Comments
-
add a container with condition
- format == "Diagram"
- Data source of _text from dataSource/artifact/moduleContext/contextBinding
-
another container with _text of dataSource/artifact (source $48)
- paragraph with Text of "Figure:", Figure Caption, Text of dataSource/artifact/title (source $48)