on 04-03-2024 11:54 AM
Hello Experts, Cloud Integration , SAP Integration Suite,
I have stored properties in content modifier and trying to apply NON-XML condition in router to check the length.
But its giving an error as Invalid format of condition expression.
Property as below:
( ${property.C4C_ContactID} = null or ${property.C4C_ContactID.trim().length()} = '0' ) and ( ${property.userId} = null or ${property.userId.trim().length()} = '0' )
Kindly help me to understand what is wrong in above condition.
Thanks,
Ravi
Hi Ravi,
you cannot combine multiple and / or operators in the same expression using parantheses.
I would suggest to use a small groovy script, check the C4C_ContactID and userId there and put the result in a property. After that, use this property in your router condition.
Best regards
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Chris for response. I thought I made some mistake in condition.
With Groovy Its working fine.
import com.sap.gateway.ip.core.customdev.util.Message;
def Message processData(Message message)
{
def propertyMap = message.getProperties();
def userId = propertyMap.get("userId");
def C4C_ContactID = propertyMap.get("C4C_ContactID");
def result;
if ((userId == null || userId.length() == 0) && (C4C_ContactID == null || C4C_ContactID.length() == 0)){
result = "true"
message.setProperty("result", result); }
else{ result = "false"
message.setProperty("result", result); }
return message;
}
User | Count |
---|---|
78 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.