VWorks software uses the
ControllerQuery method in conjunction with the IWorksController
Query method to provide the means for two plugins to communicate with each other. (See
“Query method” .)
VWorks software acts as the intermediary between the source plugin and the destination plugin by receiving and forwarding the plugins’ queries and responses in the input and output parameters of these two methods.
Interplugin communication enables two plugins to work together as a team. For plugins to exchange information, they must be able to understand the queries they receive from each other and respond appropriately. The developers of the two plugins are responsible for defining and parsing the contents of the XML documents that are passed between the plugins (with
VWorks software as the intermediary). The developers must define their own mutually agreed-upon values for the
Parameter elements’
Name and
Value attributes that are contained in the following XML blocks:
The ControllerQuery XML block contains the Query element and all its children. This XML block includes the query from the source plugin.
The Query element contains one
Parameters element and has the following attributes:
The Parameter element has the following attributes:
The following sample code is a query from Plugin A for Plugin B that is received by
VWorks software as a string in the
Query parameter of the IWorksController
Query method. (See
“Query method” .)
VWorks software then passes the query to Plugin B in the IWorksController
Query parameter of the
ControllerQuery method.
The ControllerResponse XML block contains the Response element and all its children. This XML block includes the query response from the destination plugin.
The Response element contains one
Parameters element and has the following attributes:
The ControllerResponse XML block’s Parameter element must have the same attributes as the ControllerQuery XML block’s
Parameter element. See
“Parameter element” .
The following sample code is the query response from Plugin B that is received by
VWorks software as a string in the
QueryResult parameter of the
ControllerQuery method.
VWorks software then passes the query response to Plugin A in the
QueryResult parameter of the IWorksController
Query method. See
“Query method” .