views:

733

answers:

4

When creating and modifying document templates in Documentum 6.5 my TBO for that object type is being triggered. In 5.3 creating a template did not trigger the TBO.

This is a problem because I have the TBO doing all sorts of things with documents when they are checked in and saved. But I want it to do nothing if the document is just a template going into my templates cabinet.

Has anyone else come across this issue? What strategies are there to get around this problem?

+1  A: 

I would think there would be some way to programatically detect if the object being acted on is a template, thus you could wrap your custom tbo logic in an if check for this, and if it is a template none of your logic would be performed. However...

...In general it's not considered good practice to have heavy amounts of logic in your tbo, as tbo's run regardless of context and you often run into situations such as this, which you want to avoid. It is better to put this type of logic in an sbo and call the sbo from the context where you want this logic to be invoked. ie by extending webtop.

shsteimer
I do not have a good way to programatically detect if the document is a template. I can check if it is in the Templates cabinate, but in some of my tbo logic the doc has not yet been pulled out of the cabinate.
joe
A: 

If this was not the case with 5.3 I would file a bug with support. As a work around you can check the folder path of the document in the TBO and ignore the event if the document is in the template folder.

Drunken Programmer
A: 

I got around this be using a script to rename the TBO's before creating my templates. This disabled the TBO's, then once my templates were created I named them back.

joe
A: 

Interesting problem.. Typically the templates are saved in a predetermined folder location. In the custom TBO object you can skip invocation of additional behavior for documents saved in the template object path.

gnlogic