« Return to Thread: does flowscript also support sht like setTimeout and setInterval ??

does flowscript also support sht like setTimeout and setInterval ??

by Robby Pelssers-4 :: Rate this Message:

| View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi guys,

 

I was bulk processing DITA maps and topics from flowscript and noticed that following code is executed parallel.  So basically the cocoon.processPipelineTo returns immediately so it seems.  This results in max sessions reached to XMLDb and I run into an exception.  Just checking what is best way to put some delay in the execution.

 

function generateValuePropositions() {

   var id_collection = Collection.fromArray(getJson('getCommaSeparatedBasicTypeIds'));

   print('Starting generation of ' + id_collection.getLength() + ' value propositions!!');

   id_collection.forEach(

       /** we write the map and topics for each id **/

       function(id){

           cocoon.processPipelineTo("write-map-and-topics/" + id, null, new Packages.java.io.ByteArrayOutputStream());

       }

   );

}

 

Kind regards,

Robby

 « Return to Thread: does flowscript also support sht like setTimeout and setInterval ??