on 02-22-2017 10:45 AM
Hi Everyone,
I wanted to check if it is possible to create a value mapping in HCP-IS where the Source Agency and Target Agency are identified at runtime rather than having to manually enter these at design time? I know this is possible in PI/PO but I cant get it to work in HCP-IS.
In my graphical mapping, I have tried using the standard Value Mapping function, from the drop down boxes, I tried setting the Source Agency as SenderParty and Target Agency as ReceiverParty. Also, in my iFlow, I have named my Sender endpoint the same as my Source Agency and Receiver endpoint the same as my Target Agency (as defined in the my value mapping). However this didn't seem to work.
Am I missing something here?
Thanks,
Krishneel
In HCI message mapping, with standard "valuemap" function currently it is not possible to perform dynamic value mapping. However you could create a new custom groovy script function (in message mapping or in iflow script) and use value mapping API (refer documentation guide) to perform the same. Roughly the script function would like the one below.
import com.sap.it.api.ITApiFactory;
import com.sap.it.api.ITApi;
import com.sap.it.api.mapping.ValueMappingApi;
def String dynamicValueMap(String sAgency, String sSchema, String tAgency, String tSchema, String key){
def service = ITApiFactory.getApi(ValueMappingApi.class, null);
if( service != null) {
return service.getMappedValue(sAgency, sSchema, key, tAgency, tSchema);
}
return null;
}
Hope it helps 🙂
Vishnu Prasath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Vishnu, the code you gave worked fine 🙂
At runtime (in a groovy script) is it also possible to get the names of the Sender and Receiver endpoints?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.