You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases, editing one variable within web-components will edit another variable making it impossible to distinguish them
Expected Behavior
Update to a variable should be propagated to the same variable in other places in the document, but not to different variables
Current Behavior
Example with the copyright license template:
Both licensor and licensee variables have type AccordParty which seems to confuse the algorithm responsible for propagating variable changes. TemplateMark holds on to the licensee and licensor variables, but those are expanded (since they are complex types) before generating the CiceroMark.
CiceroMark, TemplateMark, and Model
Model
asset CopyrightLicenseContract extends AccordContract {
/* the effective date */
o DateTime effectiveDate
/* licensee */
o AccordParty licensee
o String licenseeState
o String licenseeEntityType
o String licenseeAddress
/* licensor */
o AccordParty licensor
o String licensorState
o String licensorEntityType
o String licensorAddress
...
We need to distinguish between the name of the field to be updated when editing, and the name of the variable in the model (field name in the owning type). For complex types, those are two different things.
Perhaps we should set elementType in the CiceroMark for this example to AccordParty and the name should be licensee -- it is then up to the editor/transformation to decide on the best way to edit or render the complex type (e.g. we could use a popup with Concerto form for some complex types). In the default case that means editing or rendering the identifier (String).
We will need to distinguish between --> AccordParty and AccordParty because we would use different editors for those.
However, the variable partyId is of type String. This could make pop ups difficult to handle.
Also, how would that work when a type has multiple variables (e.g., an Address)?
The bottom line is that you need more context (how did you get to that one variable).
Bug Report 🐛
In some cases, editing one variable within
web-components
will edit another variable making it impossible to distinguish themExpected Behavior
Update to a variable should be propagated to the same variable in other places in the document, but not to different variables
Current Behavior
Example with the copyright license template:
Both
licensor
andlicensee
variables have typeAccordParty
which seems to confuse the algorithm responsible for propagating variable changes. TemplateMark holds on to thelicensee
andlicensor
variables, but those are expanded (since they are complex types) before generating the CiceroMark.CiceroMark, TemplateMark, and Model
Model
CiceroMark
TemplateMark
Possible Solution
We need to distinguish between the name of the field to be updated when editing, and the name of the variable in the model (field name in the owning type). For complex types, those are two different things.
Perhaps we should set
elementType
in the CiceroMark for this example toAccordParty
and the name should belicensee
-- it is then up to the editor/transformation to decide on the best way to edit or render the complex type (e.g. we could use a popup with Concerto form for some complex types). In the default case that means editing or rendering the identifier (String).We will need to distinguish between
--> AccordParty
andAccordParty
because we would use different editors for those.However, the variable
partyId
is of type String. This could make pop ups difficult to handle.Also, how would that work when a type has multiple variables (e.g., an Address)?
The bottom line is that you need more context (how did you get to that one variable).
Context
Please see accordproject/web-components#197 for complete context
The text was updated successfully, but these errors were encountered: