Topic
  • 2 replies
  • Latest Post - ‏2014-03-21T23:06:29Z by Benny.Higdon
Benny.Higdon
Benny.Higdon
9 Posts

Pinned topic Why are Definition Documents Promoted?

‏2014-03-20T03:18:25Z |

Hi.  When you create a REST Service Interface, you can include zero or more Definition Documents.  AFAIK, the definition documents for a REST service are only for documentation purposes and would not be used at runtime.  However, when I promote the service version, the definition documents are also promoted.  These will seemingly require additional space in the runtime database but provide no value.

Is there a reason that the definition documents for a REST service interface are promoted?  If not, is there a way to suppress the promotion that won't impact other areas?

Benny

  • DavidSeager
    DavidSeager
    64 Posts

    Re: Why are Definition Documents Promoted?

    ‏2014-03-20T21:15:15Z  

    Initial promotion will pull in anything that is related to the object being transitioned, and send it across to the runtime. This is why the definition docs are promoted.

    You can stop promotion following a relationship using the ignore-relationship element in the promo config file. See http://pic.dhe.ibm.com/infocenter/sr/v8r0/topic/com.ibm.sr.doc/rwsr_promotion_config_transitions.html for details.

    However it will only ignore the targets of the relationship if they are in a different governed collection. Generally when you add something that is not governed to a relationship on a governed object, that added object gets put into the governed collection of the object you add it to. Therefore I suspect your definition documents will be governed by the service version and cannot be excluded.

    So if you want to exclude them, you will need to govern them into some lifecycle (and exclude the relationship). The Asset lifecycle is simple and is a good one to use. Add a rule to the triggers.xml file of the configurable modifier to govern your binary documents into the Asset life cycle. http://pic.dhe.ibm.com/infocenter/sr/v8r0/topic/com.ibm.sr.doc/cwsr_config_mod.html

  • Benny.Higdon
    Benny.Higdon
    9 Posts

    Re: Why are Definition Documents Promoted?

    ‏2014-03-21T23:06:29Z  

    Initial promotion will pull in anything that is related to the object being transitioned, and send it across to the runtime. This is why the definition docs are promoted.

    You can stop promotion following a relationship using the ignore-relationship element in the promo config file. See http://pic.dhe.ibm.com/infocenter/sr/v8r0/topic/com.ibm.sr.doc/rwsr_promotion_config_transitions.html for details.

    However it will only ignore the targets of the relationship if they are in a different governed collection. Generally when you add something that is not governed to a relationship on a governed object, that added object gets put into the governed collection of the object you add it to. Therefore I suspect your definition documents will be governed by the service version and cannot be excluded.

    So if you want to exclude them, you will need to govern them into some lifecycle (and exclude the relationship). The Asset lifecycle is simple and is a good one to use. Add a rule to the triggers.xml file of the configurable modifier to govern your binary documents into the Asset life cycle. http://pic.dhe.ibm.com/infocenter/sr/v8r0/topic/com.ibm.sr.doc/cwsr_config_mod.html

    Thanks for the reply.

    I am familiar with the promotion configuration but I wasn't sure if the relationship being used for the definition documents might be used for something else that we shouldn't be excluding.

    The configurable modifier is an interesting idea but at the time that the documents are loaded into WSRR, I don't think that you would know that they're going to be used as definition documents (you only know that when the relationship is created).  I'll do some research (i.e., Google) but if if anyone knows any good existing resources (e.g., developerWorks articles), I'd appreciate the leads.

    Thanks.