Skip to main content

Example of error handling during merging

Basically, if there is a conflict between changes in the same field value or deletion of a model, an error will occur. In many cases, the error can be resolved by the following remedies.

Error handling example

List of countermeasures

  • Action example 1: Make the model values the same between the relevant branches and merge them.
    • Delete the model in the branch where the model has not been deleted, etc.
  • Action example 2: The revised revision of the corresponding model is returned and merged.
    • Return the model to the revision that has not been deleted, etc.
  • Action example 3: Manually reflect the contents of the relevant branch so that they are consistent.

Correspondence between error code and countermeasure example

The table below shows the correspondence between the error codes shown in Error Messages and the countermeasures. Please eliminate the error for reference.

Error codeAction example
e0001Countermeasure 2
e1001Countermeasures 1-3
e1002Countermeasures 2-3
e2001Countermeasures 1-3
e2002Countermeasures 2-3
e3000Solution 2
e4001Countermeasures 1-3
e4002Countermeasures 1-3
e4003Countermeasures 1-3
e4004Solution 2
e5000Solution 2
e6001Countermeasures 1-3
e6002Countermeasures 1-3
e6003Countermeasures 1-3
e9001Countermeasures 1-2
e9002Countermeasures 1-2

The above is an example of how to deal with the problem that the element ID does not change.

Image of countermeasure example

As shown in the figure below, assume that development progresses in parallel with the current branch (own) and the specified other branch (other), and at some point an error occurs when merging other with own.

base

Solution 1: Make the model values the same between the relevant branches

You can merge by modifying the conflicting values between the branches to the same value. For example, take the following actions.

  • For the field values in the model, make the values in the own branch the same as the field values in the other branch.
  • For the field values in the model, make the values in the other branch the same as the values in the own branch.
  • Delete the model in the branch where the model has not been deleted.

case01

Solution 2: Return and merge the revised revision of the model.

Revert and merge to revisions that do not conflict between branches. The points returned in succession will be reflected as intended. For example, take the following actions.

  • Undo and merge the revision that the model was deleted.

case02

Action example 3: Manually reflect the contents of the relevant branch so that they are consistent.

Manually reflect the contents of the other branch specified in the current branch (own) as intended. For example, take the following actions.

  • Keeping the own branch as it is, reflect the changes in the other branch to the own branch one by one.

case03

Example of specific action procedure

The specific action procedure for action example 1 is shown below.

  1. Check the error details
//Example error message when the values in the Description field collide
[ERROR: e1001] Model "following running" is conflicted.
File: UseCaseModel-A.nmdl
Id: dfeab440-43ff-47d3-aec0-887e82b5e746
"Description" field is conflicted: own is "XX", other is "YY".
  • The above assumes an example when the value changes of any field collide.
    • The error content indicates that there was a conflict in the model named "following run".
    • In addition, it indicates that the change in the value of the Description field is in conflict.
      • In the own branch, the value is changed to "XX".
      • In the other branch, the value is changed to "YY".
  • To be able to merge this without conflict, it must be aligned with the values in the own branch or the other branch.
  1. Identify the model you want to modify

After checking the error details, identify the model to be corrected. Use the error content Id to identify the model.

  • Open the model file and search for and identify the model's Id (only JSON format files are possible).
  1. Correct the model values so that they do not collide

After identifying the model you want to modify, modify it as follows.

  • a) Directly modify the contents of the JSON format file

    If your own branch looks like this, rewrite the value in the Description field to the value in the other branch," YY ".

    {
    "Id": "dfeab440-43ff-47d3-aec0-887e82b5e746",
    "EntityType": "Entity",
    "Name": "Following (ADAPTIVE)",
    "MetamodelId": "122fabe8-c00b-422d-be66-59e86fd79d1b",
    "Metamodel": "Use case",
    "Fields": {
    "Name": "Following (ADAPTIVE)",
    "Description": "XX", //Rewrite to "YY"
    }
    },
  • b) Correct the value of the corresponding field of the corresponding model in the editor.

    For example, display the details view of the model and rewrite the value in the Description field.

    form