cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

ESI custom renderer with linked objects

SOLVED
Highlighted
Marble

ESI custom renderer with linked objects

Hi all,

we are trying to add some custom attributes to the ESI map file which will be gathered and added by a custom ESIWTPartRenderer's adjustPartElement() function. If we initiate a publish on a part, then everything works as expected: our custom code is called, we read out the needed data and set it as the specific attribute's value.

The problem is, that if there is a link between a document and a part and I initiate the publish on the document (wan't the document, the related parts and the link in between to be published), then the part's custom renderer is not called... therefor the custom attribute won't get a value.

Any ideas how to force the custom renderer to be called even in case of an indirect publishing of the part (publishing the document that has a link to the part).

BR,

Tamás

1 ACCEPTED SOLUTION

Accepted Solutions

Re: ESI custom renderer with linked objects

The following (extended) functions are called in the following cases.

 

  1. When WTDcocument is published directly: function adjustDocumentElement() from class ESIDocumentsRenderer:              
    public class ESIDocumentsCustomRenderer extends ESIDocumentsRenderer {
    
    	private static final Log logger = LogFactory.getLog(ESIDocumentsCustomRenderer.class.getName());
    
    	@SuppressWarnings("rawtypes")
    	@Override
    	protected Element adjustDocumentElement(Element elem, String paramString, Document document,
    			Collection paramCollection) throws ESIRendererException {
    
    		logger.info("Custom ESI Document Renderer Started");
  2. When EPMDocument is published directly: function adjustDocumentElement() from class ESIEPMDocumentsRenderer:
    public class ESIEPMDocumentCustomRenderer extends ESIEPMDocumentRenderer {
    	
    	private static final Log LOGGER = LogFactory.getLog(ESIEPMDocumentCustomRenderer.class.getName());
    
    	@SuppressWarnings("rawtypes")
    	@Override
    	protected Element adjustDocumentElement(Element elem, String group, Document document, Collection targets)
    			throws ESIRendererException {
    		LOGGER.info("Custom ESI EPM Document Renderer Started");
    
  3. When WTPart is published directly: function adjustDocumentElement() from class ESIWTPartRenderer:
    public class ESIWTPartCustomRenderer extends ESIWTPartRenderer {
    
    	private static final Log LOGGER = LogFactory.getLog(ESIWTPartCustomRenderer.class.getName());
    
    	@SuppressWarnings("rawtypes")
    	@Override
    	protected Element adjustPartElement(Element elem, String group, WTPart part, Eff[] effs, Collection targets)
    			throws ESIRendererException {
    		LOGGER.info("Custom ESI Part Renderer Started");
    
  4. When an EPMDocument/WTDocument is linked to a WTPart the following functions are called:

       a) adjustPartElement() from ESIWTPartRenderer class

            b) adjustDocLinkElement() from ESIDocumentsRenderer class

            c) adjustDocumentElement() from ESIDocumentsRenderer class

 

1 REPLY 1

Re: ESI custom renderer with linked objects

The following (extended) functions are called in the following cases.

 

  1. When WTDcocument is published directly: function adjustDocumentElement() from class ESIDocumentsRenderer:              
    public class ESIDocumentsCustomRenderer extends ESIDocumentsRenderer {
    
    	private static final Log logger = LogFactory.getLog(ESIDocumentsCustomRenderer.class.getName());
    
    	@SuppressWarnings("rawtypes")
    	@Override
    	protected Element adjustDocumentElement(Element elem, String paramString, Document document,
    			Collection paramCollection) throws ESIRendererException {
    
    		logger.info("Custom ESI Document Renderer Started");
  2. When EPMDocument is published directly: function adjustDocumentElement() from class ESIEPMDocumentsRenderer:
    public class ESIEPMDocumentCustomRenderer extends ESIEPMDocumentRenderer {
    	
    	private static final Log LOGGER = LogFactory.getLog(ESIEPMDocumentCustomRenderer.class.getName());
    
    	@SuppressWarnings("rawtypes")
    	@Override
    	protected Element adjustDocumentElement(Element elem, String group, Document document, Collection targets)
    			throws ESIRendererException {
    		LOGGER.info("Custom ESI EPM Document Renderer Started");
    
  3. When WTPart is published directly: function adjustDocumentElement() from class ESIWTPartRenderer:
    public class ESIWTPartCustomRenderer extends ESIWTPartRenderer {
    
    	private static final Log LOGGER = LogFactory.getLog(ESIWTPartCustomRenderer.class.getName());
    
    	@SuppressWarnings("rawtypes")
    	@Override
    	protected Element adjustPartElement(Element elem, String group, WTPart part, Eff[] effs, Collection targets)
    			throws ESIRendererException {
    		LOGGER.info("Custom ESI Part Renderer Started");
    
  4. When an EPMDocument/WTDocument is linked to a WTPart the following functions are called:

       a) adjustPartElement() from ESIWTPartRenderer class

            b) adjustDocLinkElement() from ESIDocumentsRenderer class

            c) adjustDocumentElement() from ESIDocumentsRenderer class

 

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________ Check out the Windchill Tips Board! We're talking about Whirlpool's use of digital twin, augmented reality, and data-driven design!

The NAVIGATE WORKING GROUP is here! Come innovate with PTC!

Sign up for a Working Group