File System Adapter

Mirjana's picture

Xpath - Check filename attribute after FSA multiple collect

Write the rule that will check if the filename has an extension .inv or .sls, and depending on that will be extracted in a separate folders.
The Process Data:
         <FSA_Document1 SCIObjectID="serverName:38a97b0b:12bf942739e:1144" filename="ConcatSLS2.sls"/>
         <FSA_Document2 SCIObjectID="" filename="ConcatINV2.inv"/>
The wrong XPath used in the rule is:
contains(string('FSA_Document',//loop_counter/text(),' ',SCIObjectID/text()), string('.sls')
… and it does not work!!!
To check if the filename attribute in FSA_Document[n] element contains ‘inv’ or ‘sls’, XPath should be like this:
That would be interpreted as:
… check if the attribute ’filename’ (@filename)
… inside of the element which name is FSA_Document[n] (composed dynamically by concat function)
… contains ‘.sls’ string
Result will be boolean, true or false, and depending on that FSA extraction folder can be set .
Syndicate content