Code Mapping Not Functioning

Last modified by Erik Bakker on 2024/09/03 10:52

In this document, we will use the actual root cause analysis information to make a generic view that can be used if you run into the same or similar problem. Finally, the document will describe the situation, the problem, the analysis, and the result.

Should you have any questions, please get in touch with academy@emagiz.com.

1. Situation

Data must be processed correctly, and the code mapping must be executed as expected.

2. Problem

In most cases, when a code mapping is missing in an environment, this is due to a mismatch between what the user sees in Manage and what the runtime "knows." On the runtime level, we cache all code mappings to make the retrieval of code mappings performant when used in a transformation. A consequence is that when you alter a code mapping, this is not directly updated in the cache (as is the case for new code mappings and the removal of code mappings). In this specific case, the problem was that the user forgot to refresh the cache of the runtime. A restart of the infra flow is necessary to refresh the runtime cache, as this holds the cache.

3. Analysis

3.1 Reproduction

After making the first analysis, it was considered that the cache was not refreshed after altering a code mapping. Reproducing this in a test model resulted in an identical problem.

3.2 Analysis

The reproduction provided insight into why the code mapping was not performing as expected.

4. Result

Once the infra of the flow is restarted after alerting the code mapping, the problem is not expected to occur. As you cannot directly restart an infra flow in eMagiz, there are two ways to achieve the same result.

  • The first is to execute a "restart runtime" action via Deploy Architecture or the on-premise server.
  • Secondly, you could deploy a new version of the infra (via the Releases functionality). This will have the same effect.

5. Suggested Additional Readings