Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "SMILA/Documentation/QueueWorker/Router"

(Tasks)
Line 63: Line 63:
  
 
== Tasks ==
 
== Tasks ==
<source lang="xml">
+
See [[SMILA/Documentation/QueueWorker/Tasks|Router/Listener Tasks]]
<Synchronize Filter="no-filter"/>
+
</source>
+
Executes synchronization of Record with [[SMILA/Documentation/Usage_of_Blackboard_Service|Blackboard]] service. Optional Filter attribute point that Record should be filtered before next step.
+
 
+
<source lang="xml">
+
  <Process Workflow="AddPipeline"/>
+
</source>
+
Executes BPEL [[SMILA/Documentation/Pipelets_and_ProcessingServices|Pipeline]].
+
 
+
<source lang="xml">
+
<Send BrokerId="broker1" Queue="SMILA.connectivity">
+
  <SetProperty Name="doSomething">really do something</SetProperty>
+
</Send>
+
</source>
+
Send Record to JMS queue. Broker connection with correspondent BrokerID should be specified in [[SMILA/Documentation/QueueWorker/BrokerConnectionService|Broker Connection Service]] configuration. "SetProperty" tag used for setting additional properties to JMS Message used for storing Record in queue. It may be useful for next processing by [[SMILA/Documentation/QueueWorker/Listener|Listener]] service for selection "Rule" with [[SMILA/Documentation/QueueWorker/Router#Condition|Condition]] tag.
+
 
+
[[Category:SMILA]]
+

Revision as of 08:24, 14 November 2008

What is Router

The main goal of Router is to put Record into JMS queue but it also make any Queue Worker specific tasks like executing BPEL piplene.

Interface

public enum Operation { 
  ADD,
  DELETE,
  NONE
}
public interface Router extends QueueWorker {
  void route(Record record, Operation operation) throws RouterException;
}

Configuration

Schema: "org.eclipse.smila.connectivity.queue.worker/schemas/QueueWorkerConfig.xsd" Location: "configuration/org.eclipse.smila.connectivity.queue.worker/RouterConfig.xml"

Configuration is a list of routing rules.

Configuration Sample

<RouterConfig xmlns="http://www.eclipse.org/smila/queue"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="schemas/QueueWorkerConfig.xsd"
>
 
  <Rule Name="Default ADD Rule">
    <Condition>Operation='ADD'</Condition>
    <Task>
      <Synchronize Filter="only-attributes"/>
      <Send BrokerId="broker1" Queue="SMILA.connectivity"/>
    </Task>
  </Rule>
 
  <Rule Name="Default DELETE Rule">
    <Condition>Operation='DELETE'</Condition>
    <Task>
      <Synchronize Filter="no-filter"/>
      <Send BrokerId="broker1" Queue="SMILA.connectivity">
        <SetProperty Name="doSomething">really do something</SetProperty>
      </Send>
    </Task>
  </Rule>
 
</RouterConfig>

Condition

Processing Rule is found by value of Condition tag. Condition is a String whose syntax is based on a subset of the SQL92 conditional expression syntax pointed in JMS specification. [| spec]

For Router it operates with two properties

  • Operation
  • DataSourceID


Tasks

See Router/Listener Tasks

Back to the top