Junaid
Junaid

Reputation: 45

Scheduling in WSO2 ESB

I done interfacing of my on-premise system with my cloud system. I used developer studio for all calls and mappings and i deployed my CAR file on ESB Server which also creates a Proxy Service

I want to schedule my project/proxy service so that after regular intervals interfacing will be executed automatically.

I am unable to schedule as while navigating to ESB > Scheduled Tasks as while creating a new task it is asking for many input parameters for "org.apache.synapse.startup.tasks.MessageInjector" and error is "When task implementation is set to MessageInjector class, message property value must not be empty."

Pls. help how i can simply schedule my interfacing/proxy service through ESB

Upvotes: 1

Views: 443

Answers (1)

Jorge Infante Osorio
Jorge Infante Osorio

Reputation: 2153

take a look to this sample. As you can see I define:

<?xml version="1.0" encoding="UTF-8"?>
<task xmlns="http://ws.apache.org/ns/synapse"
      name="UpdateName"
      class="org.apache.synapse.startup.tasks.MessageInjector"
      group="synapse.simple.quartz">
   <trigger cron="0/15 * * * * ?"/>
   <property name="proxyName" value="testTask"/>
   <property name="message">
      <moc:QRY_SELECT_SRH_EMPLEADO xmlns:moc="http://www.example.org/mockWS/">
         <INT_ID>gero et</INT_ID>
      </moc:QRY_SELECT_SRH_EMPLEADO>
   </property>
   <property name="soapAction"
             value="http://www.example.org/mockWS/QRY_SELECT_SRH_EMPLEADO"/>
   <property name="injectTo" value="proxy"/>
</task>
  1. The class name I use.
  2. The cron to set the interval.
  3. The proxy name I want to invoke.
  4. The message I send to the proxy
  5. The soap action to define the operation inside the proxy service.

Upvotes: 1

Related Questions