4 Replies Latest reply on Jan 12, 2017 1:00 AM by Laubender

    Stop SOAP initiated running task

    quauquarres

      Somebody had posted the same question (Re: Stop SOAP initiated running task) at InDesign forums, but received no replies. Since I was told few developers go to those forums, I'm posting here instead.

       

      Is there any way to stop a task initiated by SOAP? For short tasks, it doesn't really matter, but for long scripts with take minutes (or even hours depending on the amount of data), sometimes stopping them after they started is desirable. In my case, I'm using InDesign Server CC 2015 and PHP to send SOAP requests to the server.

       

      Thanks in advance

       

      Quoting the OP in the other thread:

      Hello,

       

      Is there a way to stop a task initiated via SOAP (using java for the SOAP client and javascript for the Indesign server scripting) from running?

      One of the scenarios is when the calling program is terminated (either manually or unexpectedly) or when the network experiences some problems and the connection is disconnected, I would like to stop the task from continuing.

       

      We are generating intensive processing (e.g generating documents and merging multiple documents) and generation may take some time especially when dealing with large tables( tables with 1000 rows) with is using a bit of the processing and memory. I would like a way to stop/terminate the task itself (and not  need to restart/stop indesign server to avoid quitting other tasks)

       

      I have tried to establish a same session using the same session id so I can somehow mark a variable that will stop execution at certain points but indesign server throws an error back to the soap client that the session has already been established.

       

      Please advise if there is a way for stopping a task in indesign server or a way to make 2 different SOAP calls have the same session? (do I need to use the same service object / stub object?) Tried both but it seems I may be missing some step.

       

      Btw, using Windows Server 2012 and Indesign Server cs6

       

      Thanks