Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Due to some maintenance operations, stambia.org will be switched to read-only mode during the 13th November. It will be possible to read and download, but impossible to post on the forums or create new accounts. For any question please contact the support team.

Topic-icon Question Integrate more than file

More
01 Sep 2015 17:39 #1 by Anas
Anas created the topic: Integrate more than file
Hello,

I want to integrate more than xml file at the same time using "XML_Validator", I use for this "WaitFile" and in the parameter WAIT_FILE_NB_FILES I put -1, the problem is in the "XML_Validator", I can't give it the path of the new file, how can I solve this problem ?

regards
More
01 Sep 2015 18:01 #2 by Thomas BLETON
Thomas BLETON replied the topic: Integrate more than file
Hi,
What is "XML_Validator" ? How is it executed ?
What kind of link did you place between WaitFiles and "XML_Validator" ?
Surely a screenshot of your process will help understanding :)
More
01 Sep 2015 19:17 - 01 Sep 2015 19:24 #3 by Anas
Anas replied the topic: Integrate more than file
Hi,
In the edition expression of componnent 'Scripting' i made the :

factory = javax.xml.validation.SchemaFactory.newInstance(" www.w3.org/2001/XMLSchema ") ;
sourceentree = new org.xml.sax.InputSource(new java.io.FileInputStream("${../XsdPath}$"));
sourceXSD = new javax.xml.transform.sax.SAXSource(sourceentree);
schema = factory.newSchema(sourceXSD);
validator = schema.newValidator() ;
validator.validate(new javax.xml.transform.stream.StreamSource(new java.io.File("${../XmlPath}$"))) ;





this is used to validate a XML file with Schema XSD.
the problem: I put a static path, I don't konw how can I use a dynamic one which we find in the File wait ?



i already tried using variables.
Thank you,
Attachments:
Last Edit: 01 Sep 2015 19:24 by Anas.
More
02 Sep 2015 13:20 #4 by Anas
Anas replied the topic: Integrate more than file
Hi,
In other way, there is any way to retrieve the File name one by one, to make our treatment and at the end we start it with the next file ?
More
02 Sep 2015 14:07 - 02 Sep 2015 14:07 #5 by Thomas BLETON
Thomas BLETON replied the topic: Integrate more than file
FileWait can be used as source for a Bind link.
Please see this article for more information : www.stambia.org/index.php/doc/80-process...s-on-a-list-of-files
:{FILE_DIR}: will contain the path to the file's directory, and :{FILE_NAME}: will contain the file name.

Important : the target action has to be a single action, or an Execute delivery. It cannot be a subprocess (this will work in a future version, but not currently).
Last Edit: 02 Sep 2015 14:07 by Thomas BLETON.
More
03 Sep 2015 13:10 #6 by Anas
Anas replied the topic: Integrate more than file
Thank you for your answer, it's helpful,
I have another question: how can I retrieve :{FILE_NAME}: from Execute delivery in the process under it ?
More
03 Sep 2015 14:04 #7 by Thomas BLETON
Thomas BLETON replied the topic: Integrate more than file
In the example of the article, the value is passed through the ExecuteDelivery property fileName, and the process can use the ${~/fileName}$ parameter.
Add a property to the ExecuteDelivery action, and it will be passed to the called delivery.
More
03 Sep 2015 16:47 #8 by Anas
Anas replied the topic: Integrate more than file
Thank you
It's helpful