Posts

Showing posts from September, 2023

teak seed to plant treatment online information

 https://www.google.com/search?q=alternate+soaking+and+drying+for+48+hours+each+for+12+to+15+days+teak+seeds&rlz=1C1ONGR_enIN993IN993&oq=alternate+soaking+and+drying+for+48+hours+each+for+12+to+15+days+teak+seeds&aqs=chrome..69i57.3402j0j7&sourceid=chrome&ie=UTF-8#vhid=YSXt7aT_JqMPlM&vssid=l&ip=1

air laying tips : how to propagate plants easily.

 https://youtu.be/km0UkqxL7Js

xml validator and edi validator system exception message variables

Image
how to user validator  router  --->                         ----> (default)  see the blog content for sample error message ( directly go to exceptoin / not)  exception sub process. example:https://blogs.sap.com/2018/09/18/cloud-integration-working-with-xml-validator/ SAP_ Xml ValidationResult  property. ${property.SAP_EDIValidationResult} not contains 'error' Operator Example = ${header.SenderId} = '1' != ${header.SenderId} != '1' > ${header.SenderId} > '1' >= ${header.SenderId} >= '1' < ${header.SenderId} < '1' <= ${header.SenderId} <= '1' and ${header.SenderId}= '1' and ${header.ReceiverId} = '2' or ${header.SenderId}= '1' or ${header.ReceiverId}= '2' contains ${header.SenderId} contains '1' not contains ${header.SenderId} not contains '1' in ${header.SenderId} in '1,2' not in ${header.SenderId} not in '1,2' regex ${header.SenderId} reg...

sap exception subprocess property variables:

Image
  Name Value CamelCreatedTimestamp Fri Sep 22 16:14:35 UTC 2023 CamelExceptionCaught com.sap.it.rt.edi.exception.EDIValidatorException: Validation failed. Please check attachment (EDI Validator Error Document) CamelExternalRedelivered false CamelFailureEndpoint direct://edi_validator_TimerEventDefinition_408960 CamelFailureRouteId Process_1 CamelFatalFallbackErrorHandler [Process_1] CamelMessageHistory [DefaultMessageHistory[routeId=route35, node=to78], DefaultMessageHistory[routeId=Process_1, node=removeHeaders38], DefaultMessageHistory[routeId=Process_1, node=CallActivity_960_1275036039175034], DefaultMessageHistory[routeId=Process_1, node=CallActivity_4_1275036040422549], DefaultMessageHistory[routeId=Process_1, node=to...

xslt cpi errors are gound after deployment ,but not in simulation.

 test

xpath supposed to pick only node, from multiple nodes?

Image
 

xslt 2.0 xpath expression

--------------- if (//book/price < 10) then   'Very Cheap' else if (//book/price < 20) then   'Affordable' else if (//book/price < 30) then   'Reasonably Priced' else   'Expensive' if (//book/price < 10) then 'Very Cheap' else if (//book/price < 20) then  'Affordable' else if (//book/price < 30) then   'Reasonably Priced' else 'Expensive' ----------------------- if (//book/price < 20) then   'Affordable' else   'Expensive' ----------------------------- ----------------  <?xml version="1.0" encoding="UTF-8"?> <bookstore>   <book>     <title>The Great Gatsby</title>     <price>15.99</price>   </book>   <book>     <title>To Kill a Mockingbird</title>     <price>12.50</price>   </book>   <book>     <title>War and Peace</title>     <pr...

groovy xpath evalution

Image
 

groovy log payload

import com.sap.gateway.ip.core.customdev.util.Message; import java.util.HashMap; def Message processData(Message message) {        def logEnabled = message.getProperty("enableLog") as String;    if(logEnabled == "true") {         def body = message.getBody(java.lang.String) as String;                                  def headers = message.getHeaders() as Map<String, Object>;         def properties = message.getProperties() as Map<String, Object>;            def propertiesAsString ="\n";         properties.each{ it -> propertiesAsString = propertiesAsString + "${it}" + "\n" };             def headersAsString ="\n";         headers.each{ it -> headersAsString = headersAsString + "${it}" + "\n" };       ...

manvidya payload read , without using split * * not working, replaced split with tokenize

 import com.sap.gateway.ip.core.customdev.util.Message import groovy.util.XmlParser import java.util.HashMap; import java.util.*; def Message processData(Message message) {             def body = message.getBody(java.lang.String) as String       //  body=body.replaceAll("\\*","#")              def lines = body.split('\n') // Split the second line by '*' delimiter (escape the asterisk *) def fields = lines[1].tokenize('*') // Modify the 5th field (index 4) to substring the first 4 characters fields[5] = fields[5][0..3] // Reconstruct the second line with modified field lines[1] = fields.join('*') // Join the lines back to form the output string  def outputString = lines.join('\n')  message.setBody(outputString) //message=message1;     return message } /* import com.sap.gateway.ip.core.customdev.util.Message import groovy.util.XmlParser import java.util.HashMap; import java.util.*...

Manuvidya change request , not worked with * split alternative is

Image
reading csv file as array ; checking specific row and verifying coloums and modifying data and  resending back,  no xml convertion; read as array as lines; checking require index and change its content.  see the output file import com.sap.gateway.ip.core.customdev.util.Message import groovy.util.XmlParser import java.util.HashMap; import java.util.*; def Message processData(Message message) {             def body = message.getBody(java.lang.String) as String         body=body.replaceAll("\\*","#")              def lines = body.split('\n') // Split the second line by '*' delimiter (escape the asterisk *) def fields = lines[1].split("#") // Modify the 5th field (index 4) to substring the first 4 characters fields[5] = fields[5][0..3] // Reconstruct the second line with modified field lines[1] = fields.join('#') // Join the lines back to form the output string  def outputString = lines....

compare array and arraylist of groovy ; arrayList is alway useful

  Operation Array ArrayList Initialization def arr = [1, 2, 3] def list = [1, 2, 3] as ArrayList Create Empty def arr = [] as int[] def list = new ArrayList() Add Element Not directly supported list.add(element) or list << element Add Multiple Elements Not directly supported list.addAll([element1, element2]) Access Element by Index arr[index] list[index] Modify Element by Index arr[index] = value list[index] = value Remove Element by Index Not directly supported list.remove(index) Remove Element by Value Not directly supported list.remove(value) Check if Empty arr.isEmpty() list.isEmpty() Get Size arr.size() list.size() Iterate (for-each loop) for (element in arr) for (element in list) Iterate (for loop) for (i = 0; i < arr.size(); i++) for (i = 0; i < list.size(); i++) Contains Element element in arr element in list Sort (In-place) arr.sort() list.sort() Sort (Create Sorted Copy) def sortedArr = arr.sort(false) def sortedList = list.sort(false) Join Elements into Stri...