Hi all
sometimes it is not given to discuss with Sender and Receiver about a good Interface architecture. We all know the wonderful sentence: Sender and Receiver Interface can not be modified so please PI developer do the needful 🙂

Also with AEX single stack we can not use ccBPM and will avoid to use BPM for such a technical stuff.

Below you will see different solutions which can help you to find your specific way.

There are multiple ways how to do this

– with UDF

– with SAP Standard BEANs

– with Transform Function in Response Mapping







 

 

 


To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Adam Kiwon

    Dear Daniel,
    nice contribution!
    Please find a blog explaining the bean approach here already (believe it or not I also got positive feedback from former SAP colleagues although the comment of the blog is not very positive): https://blogs.sap.com/2015/10/08/sync-async-soap2idoc-with-sap-pro-wout-bpm .

    However, I would not recommend any of the other approaches.
    A UDF to perform a Lookup is not meant to be sending asynchronous messages. It is not a good design.
    Handling the empty response with a Java Mapping (which is basically what you do using the transform method) is quite nice, however you are loosing the source message and would have to pass over some values via adapter modules if necessary…

    Best regards,
    Adam

    (0) 
  2. Daniel Güntner Post author

    Hi Adam

    I totally agree with you that not each approach will be wonderful.

    As I wrote, this is only a way to solve problems if the whole Interface design between Sender and Receiver has bad design J

     

    In case of keep values from input massage, in the runtime for final response in the OperationMapping, you can use Container or the DynConf:

     

    UDF Quelltext Set

    public String setDynConf(String namespace, String key, String value, Container container) throws StreamTransformationException{

    DynamicConfiguration dc = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

    DynamicConfigurationKey dck = DynamicConfigurationKey.create(namespace, key);

    dc.put(dck, value);

    return “”;

    }

     

     

     

    UDF Quelltext Get

    public String getDynConf(String namespace, String key, Container container) throws StreamTransformationException{

    DynamicConfiguration dc = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

    DynamicConfigurationKey dck = DynamicConfigurationKey.create(namespace, key);

    String value = dc.get(dck);

     

    return value;

    }

     

    BR

    Daniel

    My approach with this Blog is to have all opportunities for such “bridges” in one blog so it is wonderful that you have shared your Link here J

     

    (1) 

Leave a Reply