Advertisement
inderwin

Untitled

Feb 18th, 2024
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.42 KB | None | 0 0
  1.     import com.sap.gateway.ip.core.customdev.util.Message;
  2.     import java.util.HashMap;
  3.  
  4.    
  5.     def Message processData(Message message) {
  6.     def body = message.getBody(String);
  7.     def isEmpty = false;
  8.     if ( body == null || body.isEmpty() ) {
  9.         isEmpty = true
  10.     }
  11.     print("isEmpty is " + isEmpty)
  12.     map = message.getProperties();
  13.     message.setProperty("EmptyPayload", isEmpty);
  14.    
  15.     return message;
  16. }
  17.        
  18.  
  19.    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement