Example of handling errors when merging
Basically, an error will occur if there is a conflict between changes to the same field value or deletion of a model. In most cases, the error can be resolved by following the steps below.
Error handling example
List of countermeasure examples
- Solution 1: Make the model values the same between the corresponding branches and merge them.
- Delete the corresponding model in the branch where the corresponding model is not deleted, etc.
- Solution 2: Merge back the revision that edited the applicable model.
- Reverting the model to a revision that has not been deleted, etc.
- Workaround 3: Manually reflect the contents of the corresponding branch so that they are consistent.
Correspondence between error code and countermeasure example
Correspondence between the error code shown in Error message and the corresponding example is shown in the table. Please fix the error for reference.
Error code | Solution example |
---|---|
e0001 | Solution 2 |
e1001 | Examples 1 to 3 |
e1002 | Examples of actions 2 and 3 |
e2001 | Examples 1 to 3 |
e2002 | Examples 2 and 3 |
e3000 | Solution 2 |
e4001 | Examples 1 to 3 |
e4002 | Solution examples 1 to 3 |
e4003 | Solution examples 1 to 3 |
e4004 | Solution 2 |
e5000 | Solution 2 |
e6001 | Solution examples 1 to 3 |
e6002 | Examples 1 to 3 |
e6003 | Solution examples 1 to 3 |
e9001 | Examples of actions 1 and 2 |
e9002 | Examples of actions 1 and 2 |
The above example shows an example of how to prevent the ID of an element from changing.
Image of countermeasure example
As shown in the figure below, assume that the current branch (own) and the specified other branch (other) are being developed in parallel, and at some point an error occurs when merging other into own.
Solution 1 : Make the model values the same for each corresponding branch
By fixing the conflicting values between branches to the same value, you can now merge. For example:
- For the field value of the model, make the value of the own branch the same as the field value of the other branch.
- For model field values, make the value of the other branch the same as the value of the own branch.
- Delete the corresponding model in the branch where the corresponding model is not deleted.
Solution 2 : Merge back the revision that edited the model
Merge back to a non-conflicting revision between branches. Continue to re-reflect the points you undo as intended. For example:
- Undo and merge the revision in which the corresponding model was deleted.
Solution 3 : Manually reflect the contents of the corresponding branch so that they are consistent
Manually reflect the contents of the other branch (other) specified in the current branch (own) as intended. For example:
- Keep the own branch as it is, and reflect the changes of the other branch to the own branch one by one.
Examples of specific coping procedures
Specific steps for action example 1 are shown below.
- Check the details of the error
//Example error message when values in the Description field collide
[ERROR:e1001] Model "Follow" is conflicted.
File : UseCaseModel-A.nmdl
Id : dfeab440-43ff-47d3-aec0-887e82b5e746
"Description" field is conflicted : own is "XX to", other is "YY to".
- The above assumes an example where any field's value changes collide.
- The error content indicates that there was a conflict with the model named "Following".
- Additionally indicates that changing the value of the
Description
field conflicts.- In the own branch, the value is changed to "XX".
- In the other branch, we changed the value to "YY".
- To be able to merge this without conflicts, it must be aligned with the value of your own branch or other branch.
- Identify the model you want to modify
After confirming the error content, identify the model to be corrected. Please use the Id
of the error content to identify the model.
- Open the model file and locate it by searching for the
Id
of the model (only JSON format files are possible).
- Fix model values to avoid conflicts
Once you have identified the model you want to modify, modify it as follows:
-
a) directly modify the contents of the JSON formatted file
If your own branch looks like the one below, change the value of the
Description
field to the value of the other branch, "yy done".{
"Id": "dfeab440-43ff-47d3-aec0-887e82b5e746",
"EntityType": "Entity",
"Name": "Adaptive run (ADAPTIVE)",
"MetamodelId": "122fabe8-c00b-422d-be66-59e86fd79d1b",
"Metamodel": "Use case",
"Fields": {
"Name": "Adaptive run (ADAPTIVE)",
"Description": "XX", //Rewrite to "YY"
}
}, -
b) Modify the value of the corresponding field of the corresponding model in the editor.
For example, show the
Details
view of the model and rewrite the value of theDescription
field.