Skip to main content

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 codeSolution example
e0001Solution 2
e1001Examples 1 to 3
e1002Examples of actions 2 and 3
e2001Examples 1 to 3
e2002Examples 2 and 3
e3000Solution 2
e4001Examples 1 to 3
e4002Solution examples 1 to 3
e4003Solution examples 1 to 3
e4004Solution 2
e5000Solution 2
e6001Solution examples 1 to 3
e6002Examples 1 to 3
e6003Solution examples 1 to 3
e9001Examples of actions 1 and 2
e9002Examples 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.

base

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.

case01

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.

case02

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.

case03

Examples of specific coping procedures

Specific steps for action example 1 are shown below.

  1. 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.
  1. 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).
  1. 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 the Description field.

    form