From dev-return-103648-apmail-cocoon-dev-archive=cocoon.apache.org@cocoon.apache.org Thu May 24 12:56:52 2012 Return-Path: X-Original-To: apmail-cocoon-dev-archive@www.apache.org Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EAD23970C for ; Thu, 24 May 2012 12:56:52 +0000 (UTC) Received: (qmail 82194 invoked by uid 500); 24 May 2012 12:56:52 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 82117 invoked by uid 500); 24 May 2012 12:56:52 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 82098 invoked by uid 99); 24 May 2012 12:56:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2012 12:56:51 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [57.67.164.70] (HELO be1ssnxpe2.nxp.com) (57.67.164.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2012 12:56:43 +0000 Received: from eu1rdcrdc1vw040.exi.nxp.com ([134.27.176.148]) by be1ssnxpe2.nxp.com (8.14.4/8.14.4) with ESMTP id q4OCuKxw009165 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Thu, 24 May 2012 14:56:20 +0200 Received: from eu1rdcrdc1wx032.exi.nxp.com ([134.27.179.186]) by eu1rdcrdc1vw040.exi.nxp.com ([134.27.176.148]) with mapi; Thu, 24 May 2012 14:56:20 +0200 From: Robby Pelssers To: "dev@cocoon.apache.org" Date: Thu, 24 May 2012 14:56:18 +0200 Subject: does flowscript also support sht like setTimeout and setInterval ?? Thread-Topic: does flowscript also support sht like setTimeout and setInterval ?? Thread-Index: Ac05rJycAsB4q3/URDim5bkt0XcvWg== Message-ID: <927C66C0775CCA43B88EB1E3006614B31255CEC5@eu1rdcrdc1wx032.exi.nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_927C66C0775CCA43B88EB1E3006614B31255CEC5eu1rdcrdc1wx032_" MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7724,1.0.260,0.0.0000 definitions=2012-05-24_06:2012-05-24,2012-05-24,1970-01-01 signatures=0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_927C66C0775CCA43B88EB1E3006614B31255CEC5eu1rdcrdc1wx032_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi guys, I was bulk processing DITA maps and topics from flowscript and noticed that= following code is executed parallel. So basically the cocoon.processPipel= ineTo returns immediately so it seems. This results in max sessions reache= d 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 =3D Collection.fromArray(getJson('getCommaSeparatedBas= icTypeIds')); print('Starting generation of ' + id_collection.getLength() + ' value pr= opositions!!'); 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 --_000_927C66C0775CCA43B88EB1E3006614B31255CEC5eu1rdcrdc1wx032_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

= Hi guys,

&nb= sp;

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

 

function generateValuePropositions() {

   var id_collection =3D Collection.fromArray(getJ= son('getCommaSeparatedBasicTypeIds'));

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

   id= _collection.forEach(

   &= nbsp;   /** we write the map and topics for each id **/

       function(id)= {

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

       }=

   );

}

 

Kind regards,

Robby

<= /div>= --_000_927C66C0775CCA43B88EB1E3006614B31255CEC5eu1rdcrdc1wx032_--