Solicit

A solicit operation starts a transaction. It outputs one or more fields to SPARKL and waits for a response.

Example XML code Notes

<solicit 
    name="CheckPrime"
    service="Sequencer"
    clients="MathTeacher"
    fields="n">
    <response 
        name="Yes"
        fields="YES"/>
    <response
        name="No"
        fields="NO"/>
</solicit>
A solicit can have several alternative responses. It can, however, be served by only one response per transaction.

For example, every time n is output, CheckPrime responds with either Yes or No.

Attributes

A solicit operation must have a name, a service that implements it, and some fields the operation outputs. Optionally, one or more client services can be specified on the solicit that can trigger it.

name

The name of the component. Other components use this name to reference the component.

service

The service that implements the operation. The implementing service is referenced by its name.

clients

A space-separated list of services that can trigger the operation, thus starting a transaction. The services are referenced by name.

fields

A space-separated list of fields received or output by the operation subject. Depending on the type of operation, they can be input or output fields. The fields are referenced by their name.

Children

A solicit must take one or more responses as its children. Depending on the service and client specified for the solicit, the operation can have one or more properties for additional functionality or triggering conditions too.

prop

A property can contain a script, bind fields to parameters, and so on. Most properties are specific to a SPARKL extension.

response

A response is a direct child of a solicit operation. A response must have a name and it has to reference one or more fields that come back as a response to the solicit.