Derived settable associations
(Replacing message template with parser tag) |
(Updated Edited template to July 12, 2025.) |
||
Line 14: | Line 14: | ||
Here is the sample model to be loaded into the designer: [[:File:DerivedSettableExample.modlr]] | Here is the sample model to be loaded into the designer: [[:File:DerivedSettableExample.modlr]] | ||
[[Category:Associations]] | [[Category:Associations]] | ||
{{Edited|July|12| | {{Edited|July|12|2025}} |
Revision as of 05:48, 20 January 2025
This page was created by Lars.olofsson on 2021-02-18. Last edited by Stephanie on 2025-01-22.
Derived attributes & associations are read-only, but you can also have writable associations that update other attributes or links when they themselves are set.
Read here about how that works on attributes: Derived settable attributes.
OCL for reading Class2selection:
self.Class2
EAL for the writing Class2Selection:
self.Class2 := vInputParameter; self.SelectionLog := self.SelectionLog + DateTime.Now.asString + ': '+ vInputParameter.Name + '\r\n'
The most common use case for this is to execute "extra" code for recalculating other persisted values based on the new value of a change to a link.
Here is the sample model to be loaded into the designer: File:DerivedSettableExample.modlr