NetWeaver BPM: Invalid Mapping Parts detected
[Business Process Management] [Galaxy] [m] [Process Composer] [SAP NW BPM]
Symptom
You are operating in SAP NetWeaver BPM Process Composer and had updated a referenced user interface (UI) beforehand. In order to see the changed reflected in the BPMN process model you opened the task, *deleted* the old UI and finally imported the same UI again.
As a result (and depending on the number of defined mappings on human activity level) the so called “problems view” of the Process Composer gets filled with multiple entries like this one:
Invaid MappingPart detected. Target of this mapping is not exists.
(Use QuickFix to delete invalid MappingPart)
<fully_qualified_project_name>/src/<some_bpmn_artifact> <some_ID>
Mappings that existed before on the human activity are gone.
Other terms
Galaxy, SAP NW BPM, Business Process Management, Process Composer, Mapping, Reimport, Invalid Mapping Parts
Reason and Prerequisites
The reason for this behavior is that the old UI got explicitly deleted beforehand. This causes that the internally used data types get removed as well. Reimporting a new UI – even if it is the same – will force the IDE to generate new data types. So even if they look the same as before their internal IDs changed.
As a result existing mappings point to non existing entities and thus get invalid.
Solution
In order to get rid of the error the Process Composer provides a quick fix for each error which removes the invalid mapping. As this might get time consuming in case of multiple mappings paragraph (1) explains a workaround to quickly get rid of all errors. In addition paragraph (2) will explain how to avoid these situations in the future.
(1) Remove the errors quickly:
In case there are several hundred mapping errors applying the quick fixes on each item individually might cause a huge time loss.
In that situations it could be more easy to open the mapping editor of the task that caused the error. As the mappings do not have a ‘visible target’ anymore they won’t get displayed. Anyhow: The editor window should indicate that the model was changed (by displaying a little asterisk beside the process name). Save the editor and the mapping editor should overwrite the non exiting mappings. As a result all invalid mappings related to this activity should be removed from the problems view.
(2) Avoid this situation in the future:
In order to avoid such situations, but still being able to see changes that have been made in a referenced UI, apply the following steps:
- Extend the UI as desired
- Save & Build the DC that contains it
- Switch to the BPM project
- Open the task that used the updated UI
- Important: DO NOT (!) delete the existing entry!
(This is the part that caused the problems)
- Instead open the import wizard directly and select the same UI again
- Once completed save the changes made in the task editor.
Even though it looks like nothing changed in the first place internally the data types did not get removed and newly created, but only updated.
Finally switch to the process model and select the human activity from the diagram that references the updated task. You should now be able to see the changes you made at the UI context which is used in the input and output mapping (Sometimes there is a refresh problem so that selecting the properties view of a different activity is needed first).
In case you did a compatible change, all old mappings should be preserved and the extensions you made should be added to the data type.
In case you deleted parts from the UI interface that existed before and were used in a mapping you will – again – encounter the error as described in the symptom. In this case it is valid as you won’t be able to see the element in the mapping editor anymore. So applying the quick fix in the problem view is the fastest and easiest way to get rid of this invalid mapping.