11.07.2015 Views

webMathematica™ Wolfram - Wolfram Research

webMathematica™ Wolfram - Wolfram Research

webMathematica™ Wolfram - Wolfram Research

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

webMathematica User Guide 117The evaluateQueued tag actually creates a job object and places it into a queue. The job hasan id that can be used to work with it later, and this can be found with the var attribute. Whenthe job actually runs, it uses the pool set by the pool attribute; if this is not found, then it willuse the standard URL mapping used by the evaluate tag.varpoolthe name of a page variable to hold the job idthe pool to use for the compuationAttributes of the evaluateQueued tag.The actual computation of the body of the evaluateQueued tag proceeds very similarly to theevaluate tag. The computation can make use of many of the MSP functions, for example,saving image files and constructing URLs. It also has access to all the request parameters thatcame with the request. However, it does not have access to an HTTP request object, and so itcannot make use of an HTTP session.Interacting with the QueueOne key way that you can interact with the queue is using the var attribute of the evaluateÖQueued tag. This can be passed around the various web pages you want to work with, either asa request parameter or by saving in an HTTP session. An example, which starts a calculation,and then offers a link to another page passing the var as a request parameter, is shown below.longCalculation[]Get results here.The var attribute is actually a variable that holds a reference to the id of the job object. web-Mathematica offers an expression language function that helps to find the job.There are a number of things you can do with the job object. You can find out its state, whetherit has started, finished, etc... You can find out its input and also the result, if it has finished.You can also cancel the job.It is also possible to access the job object via the Mathematica syntax, when the kernel isinitialized the symbol MSP`Utility`$Job is assigned to the job. Some functions for workingwith the job in both the expression language and Mathematica are shown below.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!