Liquent InSight Rendering Business Service Reference Guide
Business services are conceptually the same as Windows DLLs in that they have functions that take input and output parameters. The difference lies in how a business service is invoked.
Instead of being called directly from client code, a request is submitted to the Vista framework which then executes the business service asynchronously on the client’s behalf. This request is known as a “job ticket” and is an XML packet that identifies the business service and the specific requests to be executed by the business service. In business service terminology a “request” is analogous to a DLL function. Requests, like DLL functions, have typed parameters that are name-value pairs.
Basic Job Tickets
Basic Tickets For example, say you have a business service named “math” and it has a request named “calculatesquare-root” which takes an input parameter named “number” and has an output parameter named “square-root”. The job ticket would look like the following:
<math>
<request name="calculate-square-root">
<number type="integer">144</number>
</request>
</math>
After execution the job ticket would be:
<math>
<request name="calculate-square-root">
<number type="integer">144</number>
<square-root type="double">12</square-root>
</request>
</math>
The important thing to note in this example is that the top-level (i.e., root) node identifies the business service and its child node is the request. The XML attribute “name” contains the specific request name. The child nodes of the request node are the parameter values. Any output parameters will be added when the request is executed. More than one request can be made of a business service.
The following is possible:
<math>
<request name="calculate-square-root">
<number type="integer">144</number>
</request>
<request name="calculate-square-root">
<number type="integer">65</number>
</request>
<request name="is-prime-number">
<number type="integer">11</number>
</request>
</math>
With results:
<math>
<request name="calculate-square-root">
<number type="integer">144</number>
<square-root type="double">12</square-root>
</request>
<request name="calculate-square-root">
<number type="integer">65</number>
<square-root type="double">8.06</square-root>
</request>
<request name="is-prime-number">
<number type="integer">11</number>
<prime type="bool">1</prime>
</request>
</math>
The top-level node allows for optionally specifying information about the ticket (i.e., submitter, product, job name, and priority). For example:
<math submitter="John" product="ProductX" job-name="Test" priority="1">
<request name="calculate-square-root">
<number type="integer">144</number>
</request>
</math>
The submitter, product, and job name attributes are used to identify the job ticket. Their values are user defined. These values will appear in the Domain Manager application. The Domain Manager will allow the user to filter the jobs displayed based on these values.
The priority attribute will determine the priority level at which the job ticket will be executed. However, this only applies if the business service is configured to be priority-based (as opposed to FIFO). Priorities can be from 1 to 10 with 1 being the highest. If no priority is specified then a priority of 5 is assumed.