Bug 80307 - Validation Rules
Summary: Validation Rules
Status: NEW
Alias: None
Product: MDT.UML2
Classification: Modeling
Component: Core (show other bugs)
Version: 1.1.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: UML2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, helpwanted
: 128266 (view as bug list)
Depends on: 321605
Blocks: 402806
  Show dependency tree
 
Reported: 2004-12-06 15:45 EST by Kenn Hussey CLA
Modified: 2016-04-15 05:11 EDT (History)
7 users (show)

See Also:


Attachments
ported existing validation rules from old api to new (68.62 KB, patch)
2006-03-08 13:56 EST, James Bruck CLA
Kenn.Hussey: iplog+
Details | Diff
additional validation rules (40.00 KB, patch)
2006-03-15 10:30 EST, James Bruck CLA
no flags Details | Diff
more validation rules (41.84 KB, patch)
2006-03-24 16:18 EST, James Bruck CLA
Kenn.Hussey: iplog+
Details | Diff
patches for Behavior and Interface (12.31 KB, patch)
2006-03-28 15:05 EST, James Bruck CLA
no flags Details | Diff
combined patch for operation, behavior, port (17.10 KB, patch)
2006-03-28 17:23 EST, James Bruck CLA
Kenn.Hussey: iplog+
Details | Diff
Patch for profile and package (11.69 KB, patch)
2006-03-29 12:05 EST, James Bruck CLA
Kenn.Hussey: iplog+
Details | Diff
combinedFragment and ExecutionSpecification (12.24 KB, patch)
2006-03-29 15:39 EST, James Bruck CLA
Kenn.Hussey: iplog+
Details | Diff
MessageOperations (11.00 KB, patch)
2006-03-31 10:35 EST, James Bruck CLA
Kenn.Hussey: iplog+
Details | Diff
connectorOperations validation rules updated (8.21 KB, patch)
2006-05-08 10:19 EDT, James Bruck CLA
no flags Details | Diff
validation patch for extension ends (3.41 KB, patch)
2006-05-12 14:00 EDT, James Bruck CLA
no flags Details | Diff
patch that implements several validations (75.26 KB, patch)
2007-11-29 05:55 EST, Javier Muñoz CLA
no flags Details | Diff
Update for ActorOperations (4.57 KB, patch)
2007-12-12 15:11 EST, James Bruck CLA
no flags Details | Diff
Update for ActivityEdgeOperations (3.73 KB, patch)
2007-12-12 15:13 EST, James Bruck CLA
no flags Details | Diff
Update for AssociationOperations (5.48 KB, patch)
2007-12-12 16:55 EST, James Bruck CLA
no flags Details | Diff
Patch for class RegionOperations (4.56 KB, patch)
2013-03-09 06:47 EST, Ansgar Radermacher CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenn Hussey CLA 2004-12-06 15:45:13 EST
Complete the generation and implementation of validation rules from the UML 2.0 
source model.
Comment 1 Kenn Hussey CLA 2006-02-16 16:25:28 EST
*** Bug 128266 has been marked as a duplicate of this bug. ***
Comment 2 James Bruck CLA 2006-03-08 13:56:20 EST
Created attachment 35921 [details]
ported existing validation rules from old api to new

Patch for some of validation rules ... more to come.
Comment 3 James Bruck CLA 2006-03-15 10:30:44 EST
Created attachment 36338 [details]
additional validation rules

additional validation rules
Comment 4 James Bruck CLA 2006-03-24 16:17:57 EST
Comment on attachment 36338 [details]
additional validation rules

modified
Comment 5 James Bruck CLA 2006-03-24 16:18:48 EST
Created attachment 36914 [details]
more validation rules
Comment 6 Kenn Hussey CLA 2006-03-28 13:27:08 EST
The changes from attachment 3 [details] have been committed (with modifications).
Comment 7 James Bruck CLA 2006-03-28 15:05:18 EST
Created attachment 37131 [details]
patches for Behavior and Interface

Patch for Behavior and Interface
Comment 8 James Bruck CLA 2006-03-28 17:23:30 EST
Created attachment 37153 [details]
combined patch for operation, behavior, port

combined patch for operation, behavior, port
Comment 9 James Bruck CLA 2006-03-29 12:05:12 EST
Created attachment 37217 [details]
Patch for profile and package
Comment 10 James Bruck CLA 2006-03-29 15:39:52 EST
Created attachment 37236 [details]
combinedFragment and ExecutionSpecification
Comment 11 James Bruck CLA 2006-03-31 10:35:45 EST
Created attachment 37419 [details]
MessageOperations
Comment 12 Kenn Hussey CLA 2006-04-05 17:09:15 EDT
The changes from attachment 37153 [details], attachment 37217 [details], attachment 37236 [details] and attachment 37419 [details] have been committed to CVS.

The remainder of the validation rules will be implemented in a future release i.e. 2.1).
Comment 13 James Bruck CLA 2006-05-08 10:19:18 EDT
Created attachment 40586 [details]
connectorOperations validation rules updated
Comment 14 James Bruck CLA 2006-05-12 14:00:31 EDT
Created attachment 41343 [details]
validation patch for extension ends
Comment 15 Kenn Hussey CLA 2007-05-14 09:51:22 EDT
Deferring to a future release.
Comment 16 Javier Muñoz CLA 2007-11-29 05:55:15 EST
Created attachment 84050 [details]
patch that implements several validations

This patch some implements validations in several elements (Actor, Association, InitialNode, Parameter, etc.)
Comment 17 Kenn Hussey CLA 2007-12-04 11:16:47 EST
Thanks for the contribution, Javier! James will look into having these changes committed (pending IP review) as soon as possible.
Comment 18 James Bruck CLA 2007-12-04 18:34:01 EST
The patch is under review now.
Comment 19 Javier Muñoz CLA 2007-12-05 06:44:26 EST
I am very happy to have the chance of contributing to this so exciting project. So I'm willing to provide more patches implementing validations in the future.

I don't know if this is the most suitable place to ask but, is there any plan to use in the future the OCL compiler that is (or will be) provided by the OCLTools project (http://wiki.eclipse.org/OCLTools)?
Comment 20 James Bruck CLA 2007-12-06 11:45:07 EST
Thanks for the contribution!

Some general comments:
 - code can be compressed in some areas for example in MergeNodeOperations..

  boolean isValid = true;
  isValid = mergeNode.getOutgoings().size() == 1;
  if (!isValid) {}

-  In UseCaseOperations, I don't believe there is a need for the following:

	Proposed: 
          List<Association> assocList = new ArrayList<Association>();
		if (useCase.getAssociations() != null) {
			assocList.addAll(useCase.getAssociations());
		}

		for (Association association : assocList) {

        I believe the original is ok since null is not returned.

        Original:
	for (Association association : useCase.getAssociations()) {

- The customized UML code formatter could be used to make consistent use of indentation.


Looks good!

I will create an update with suggested 'tweaks' and we can discuss further.
Comment 21 James Bruck CLA 2007-12-12 15:11:45 EST
Created attachment 85114 [details]
Update for ActorOperations
Comment 22 James Bruck CLA 2007-12-12 15:13:57 EST
Created attachment 85115 [details]
Update for ActivityEdgeOperations

source or target could be owned by an activity node within some activity.
Comment 23 James Bruck CLA 2007-12-12 16:55:54 EST
Created attachment 85127 [details]
Update for AssociationOperations

re-wrote the validation rules to match OCL more closely.
Comment 24 James Bruck CLA 2007-12-12 17:05:39 EST
Hi Javier,

Please have a look at the suggested alternative patches for ActorOperations, ActivityEdgeOperations and AssociationOperations.

- James. 
Comment 25 Javier Muñoz CLA 2007-12-17 06:36:41 EST
 Thank you for reviewing the code. Your modifications clearly improve it. Nothing to say by my side, but thank you.

 Javier.
Comment 26 Javier Muñoz CLA 2008-04-24 09:46:55 EDT
Hi! Any plan to commit soon the new validations in the CVS?
Comment 27 James Bruck CLA 2008-04-24 10:15:22 EDT
Hi Javier,

As it stands, the patch you created cannot be committed because it is incomplete and requires more work.

I had made some updates to your patch (for ActorOperations, ActivityEdgeOperations and AssociationOperations) but the remainder of your original patch needs to be updated before I can commit it.

Please resubmit your patch with updates to the remaining validation rules so that they more closely match the code style that already exists.
Also please double check the correctness of the remaining validation rules that you submitted as some of them are incomplete.

Use the 3 updates that I submitted as suggestions on re-writting the remaining ones.

I'll be happy to commit the patch once it is updated.

Cheers,

- James.
Comment 28 Ansgar Radermacher CLA 2013-03-09 06:47:14 EST
Created attachment 228168 [details]
Patch for class RegionOperations

A small patch that implements validation rules for regions
Comment 29 Kenn Hussey CLA 2013-03-09 08:52:50 EST
(In reply to comment #28)
> Created attachment 228168 [details]
> Patch for class RegionOperations
> 
> A small patch that implements validation rules for regions

Thanks for the contribution! I'll look into committing these changes immediately following M6.
Comment 30 Kenn Hussey CLA 2013-03-20 17:58:31 EDT
(In reply to comment #29)
> (In reply to comment #28)
> > Created attachment 228168 [details]
> > Patch for class RegionOperations
> >
> > A small patch that implements validation rules for regions
> 
> Thanks for the contribution! I'll look into committing these changes immediately
> following M6.

OK, I've committed/pushed changes to the 'master' branch in git. Note that I didn't apply the patch as-is because it was missing custom messages (which all of the other implemented validation rules have) and needed to be formatted to be consistent with UML2 style conventions. Ansgar, please take those into account should you consider submitting implementations for other constraints in the future. Thanks!