on 2022 Sep 07 8:19 AM
Hi Experts,
I am facing anissue with my one of custom function in message mapping getting the below error.
I am attaching the Groovy script which i am using inmessage mapping.
Please help me to get this solved.
Error Detailscom.sap.xi.mapping.camel.XiMappingException: Runtime exception during processing target field mapping /IdamFuture/Employee[3]/Position_Status. The root message is: Exception:[com.sap.aii.mappingtool.tf7.rt.BehaviorInvocationException: No signature of method: org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.$() is applicable for argument types: (Script26$_customFunc_closure2) values: [Script26$_customFunc_closure2@73be52b8] Possible solutions: is(java.lang.Object), any(), get(java.lang.String), any(groovy.lang.Closure), use([Ljava.lang.Object;), wait()] in class com.sap.aii.mappingtool.tf7.ScriptHandler method customFunc[2018-04-01T00:00:00.000, 2018-03-26T00:00:00.000, SR, com.sap.aii.mappingtool.tf7.rt.Context@542db07] No signature of method: org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.$() is applicable for argument types: (Script26$_customFunc_closure2) values: [Script26$_customFunc_closure2@73be52b8] Possible solutions: is(java.lang.Object), any(), get(java.lang.String), any...Hi Abdul,
The variables toDate and begin should be of Date type and not String.
def format = new SimpleDateFormat("yyyy-MM-dd")
def toDate = format.parse(format.format(new Date()))
def begin = format.parse(startDate)
def duration, output
use(groovy.time.TimeCategory) {
duration = toDate - begin
}
if( Timetype == 'SR' && duration.days >= 28 ){
output = "Long Term Sick"
}
else if( Timetype == 'ML' ){
output = "Maternity"
}
else{
output = " "
}
return output
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
65 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
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.