Rules for Service Mapping
You can create mapping between attributes and operations of entity and external services.
See: Service Mapping

Local persistency (Persistency tab page) must be deactivated before mapping to external services.
Before mapping service operations, consider the following:
● The database structure of remotely persisted objects (RFC and WS) cannot be changed in CAS. You should model your service attributes according to these structures so that you can readily map operations.
● The object ID of the external object must be returned after executing the CRUD operation read. This is required internally by CAF Core. Verify that the external service you wish to map returns the ID.
In most cases, the basic CRUD (create, read, update, delete) operations have similar mappings. When mapping CRUD operations, refer to the table below.
Operation |
Input Message Attributes |
Output Message Attributes |
Description |
create |
Key, mandatory and default attributes |
None |
Requires only the absolute minimum of parameters for the entity to be created. If you need to set additional parameters, you can do it with the update operation. No output is needed because if the operation is not successful, it will throw an exception. |
read |
Key |
All attributes |
Requires the GUID key attribute to identify the business entity. |
update |
All attributes |
None |
Requires the key attributes to identify the business entity All other attributes are required because any of them might have been changed. No output is needed because if the operation is not successful, it will throw an exception. |
delete |
Key |
None |
Requires the key attributes to identify the business entity No output is needed because if the operation is not successful, it will throw an exception. |
readByCustomKeys |
Custom keys |
All attributes |
Works the same way as the read operation, but uses a custom key to identify the business entity. |

CAF Core first creates an empty object before it can be updated. This can lead to problems during operation mapping.
So that an update operation can be successfully executed without first identifying the empty object, set the input parameter mandatory to true in the Attributes tab page of the service you are modeling. This will guarantee that all create input parameters are received from the external service as needed.
In the Operations tab page and table of the service you are mapping, there is a list of all mappings for the selected operation. You can set constants which are assigned to the target attribute if a null value is returned after the mapping.
To do this, enter the constant in the target attribute Fixed Value field. The Is Null checkbox indicates that there is no value in the Fixed Value field. If Is Null is unchecked and the Fixed Value field is empty, an empty string will be returned as value.
Symbol |
Description |
|
You can only perform the following types of mapping: ● Input mapping – entity service operation input parameters are mapped to external service operation input parameters. ● Output mapping – external service operation output parameters are mapped to entity service operation output parameters. |
|
You cannot map input to output or output to input parameters. |
|
You can map one attribute to several attributes. |
|
You cannot map several attributes to one attribute.
|
|
You can map only simple attributes to simple attributes. |
|
You cannot map simple attributes to complex collections attributes and vice versa. |
|
To map complex collections, you need to map at least one of their attributes. The collection mappings are implicit and are only created automatically to limit the collection of subattributes mapping. |
|
You cannot map references between entities (relationship parameters). All the relationships are stored locally. The references are not displayed as attributes in the operation messages at all. |