Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Configure relationship constraint for enforcement at runtime

Hello,

I have a requirement to associate 2 assets, but the enforcement that the association must exist is not when the assets are submitted, instead, it is when one of the assets transition from one stage to the next in its life cycle. My questions are:
1) Should I define a relationship constraint at all (since I believe I need to create a custom policy to enforce the relationship anyway)
2) Should I define a relationship constraint when configuring the asset type, but make that relationship optional (so that it is not enforced when the asset is submitted)
3) How does the "Allow only these relationships" checkbox come into play in my situation?

For example: let's assume I have a "SOA Service" and a "XML Schema" asset types. I want an instance of an "SOA Service" to be associated with 1 or more instances of "XML Schema" assets, but not until the "SOA Service" asset transitions into the Specification stage. Prior to that, the "SOA Service" asset goes through an Identification stage which does not need the association to be established. So:
1) Do I create the relationship constraint in the definition of the "SOA Service" asset type at all? (Or such a relationship constraint does not even need to exist?)
2) Do I create a relationship constraint specifying an "SOA Service" asset "uses" "at least 0" "XML Schema" asset? By having the cardinality to be 0, I can avoid the RAM Server enforcing that the association exists when an "SOA Service" asset is first created (at Identification stage).
3) How does the "Allow only these relationships" checkbox affect what I have to do?

Finally... is the right way to enforce that the association will be established is through a custom policy?

Thanks

0 votes



2 answers

Permanent link
I think the best configuration is as follows

1) Add a relationship constraint of "at least 0" with the correct relationship and type. This will make it easier for the user to add the relationship as the option will be presented on the submit wizard under the relationships tab. It does not create an enforcement of the relationship though.

2) You should only check the "Allow only these relationships" checkbox if you do not want to allow the user to create other types of relationships.

3) In the lifecycle, add the built in 'Relationship Validation Policy' to the identified state. You can configure it so that it will fail unless the relationship you want is present.

4) In the transition from the Identification to the Specification state specify that the 'Relationship Validation Policy' must be approved. This will ensure that the asset can not enter the Specification state until the relationship is present.

0 votes


Permanent link
A constraint on the type implies that a relationship "has" to exist at submission time - this may not be the case even in the specified state.

Using a 0 (optional), makes it simpler on the UI to add that relationship.


I assume that the specification will be related to other asset/types ... so if you specify 0 constrains on them and want to inhibit other relationships, use that "Allow only these rel."

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Jan 24 '12, 12:57 p.m.

Question was seen: 3,813 times

Last updated: Jan 24 '12, 12:57 p.m.

Confirmation Cancel Confirm