Steve,
You need to transpose the rows/columns of your equality constraint. The set comparison constraints (equality,exclusion,subset) require compatible columns, while the editor enters one row at a time. So, use the following gesture to add the equality constraint:
-
Click the equality constraint on the toolbox
-
Click the design surface to add the equality constraint and activate the editor for the first row. Note that if you drag off the toolbox instead of using the click-click gesture, then you'll need to double-click the new shape to activate the editor.
-
Click the top constraint in 'PayItemPrototype is the origin of PayItemType'
-
Double-click the second constraint to commit the first row of the constraint and activate an editor for the second row.
-
Click the left role of 'PayItemPrototype is categorized as PayItemCategory'.
-
Double-click the left role of 'PayItemType is categorized as PayItemCategory'.
-
Press escape or click on the diagram surface to cancel the editor for the next row (which you're not adding).
You will now have an equality constraint without errors.
Note that the second role sequence of the equality constraint contains roles from multiple fact types, so a join path is required to relate the two roles in the path. In this case, the join path is trivial because the opposite role players share an object type. If you open the .orm file as xml, you'll see additional join path xml for the sequence row sequence. Join paths are currently a work in progress, and we have not yet publicly introduced the path editor we've been using internally for several months now. This will allow formal entry of join paths, fact type derivation rules, subtype derivation rules, and restricted constraints (constraints that apply under tighter conditions than 'all role players'). We'll introduce the editor when the verbalization and dynamic validation are complete (in about a month). DDL and other artifact generation for these constructs will follow as the year progresses.
Although the join path in this case is implicit and currently in the model, it is not verbalize, so the verbalization for this equality constraint is currently incomplete:
For each PayItemPrototype and PayItemType,
that PayItemPrototype is the origin of that PayItemType if and only if that PayItemPrototype is categorized as some PayItemCategory.
does not relate the multiple fact types in the second role sequence and should be
For each PayItemPrototype and PayItemType,
that PayItemPrototype is the origin of that PayItemType if and only if that PayItemPrototype is categorized as some PayItemCategory and that PayItemType is categorized as that PayItemCategory.
Although some verbalizations with join paths will be close, none of them will be correct until I'm done integrating the join paths into the constraint verbalization. If an implicit join path cannot be automatically generated, then you will see a 'join path required' error in the current tool, but you won't be able to do anything about it.
-Matt