9 Replies Latest reply: Mar 11, 2014 8:17 PM by Riaan.Ingram RSS

Scheduler Proxy/BPEL

Rishu Sharma Newbie
Currently Being Moderated

Hi All,

 

I have a requirement where in my OSB proxy reads from a JMS Q and write to a table. From this table every day at 5 PM, whatever records are present , I need to fetch them and send as an email to a third party system.

 

Can you help me out on how I can create a scheduler OSB proxy/ BPEL process  which gets triggered  every day  at 5 PM and send an email.Major preference I would like to give to OSB  scheduler process.

 

 

Thanks and Regards,

Rishu Sharma

  • 1. Re: Scheduler Proxy/BPEL
    dSourav Newbie
    Currently Being Moderated

    Please go through below link. It might help you to create a soa scheduler.

    http://www.oracle.com/technetwork/middleware/soasuite/learnmore/soascheduler-186798.pdf

     

    Thanks,

    Sourav

  • 2. Re: Scheduler Proxy/BPEL
    dSourav Newbie
    Currently Being Moderated

    Scheduling is not supported in OSB out-of-box. You may need to find a way to invoke OSB service as and when you want. In other words, use scheduling feature of other components (weblogic/BPEL/DB or any other custom application) and invoke OSB service from that component.

    Hope this helps...

  • 3. Re: Scheduler Proxy/BPEL
    991448 Journeyer
    Currently Being Moderated

    You can design the proxy service as follows:-

    1. Define a proxy service based on a dummy wsdl.

    2. Define a java callout to read from the JMS queue and call it from your proxy service.

    3. Use Quartz soa scheduler to invoke your proxy service at 5:00 PM everyday. http://www.oracle.com/technetwork/middleware/soasuite/learnmore/soascheduler-186798.pdf

  • 4. Re: Scheduler Proxy/BPEL
    Riaan.Ingram Explorer
    Currently Being Moderated

    You can also use the TimeToDeliverOverride setting on another JMS queue to schedule a trigger for another OSB proxy that consumes messages from this JMS queue and subsequently polls the table to look for any new records. So in this scenario your first OSB Proxy Service that reads from a JMS Q and inserts into the table can also then thereafter produce a single "trigger" JMS message on an alternative JMS queue which had previously had it's TimeToDeliverOverride set to "* * * 16 * * *" in the admin console. This "trigger" JMS message is then consumed by an OSB JMS consumer proxy that polls the table for changes - it will receive the message at the time specified in the TimeToDeliverOverride setting.

     

    For more detail see: Developing a WebLogic JMS Application

  • 5. Re: Scheduler Proxy/BPEL
    Rishu Sharma Newbie
    Currently Being Moderated

    Thanks all for your reply.

    Rian-I think TimeToDeliverOverride property will not work here, since the value which will be specified for parameter -TimeToDeliverOverride in the weblogic Q  will be static, ie 15 min or 20 min. So every message coming in that q  will wait for that specific period.But I want this parameter to be dynamic based on the message produce time and hence should be diff for diff messages arriving in the Q since at the end of the day , I want all records to be picked up at 10 pm and sent as an email.

  • 6. Re: Scheduler Proxy/BPEL
    Riaan.Ingram Explorer
    Currently Being Moderated

    Hi, you get two types of TimeToDeliverOverride's, a "Relative" Time-to-Deliver Override and a "Scheduled" Time-to-Deliver Override. The scheduled option will allow picking up and emailing at 10pm if there were a trigger record on new separate trigger queue with correct  "Scheduled" Time-to-Deliver Override. Just create the new separate queue and concurrent jms proxy that polls it. The new proxy takes/gets the message at 10pm, polls the DB (JCA DB adapter), sends the email, populates a new message back on the trigger queue and sleeps. Next day at 10pm the process repeats.

     

    Hope that helps.

  • 7. Re: Scheduler Proxy/BPEL
    Rishu Sharma Newbie
    Currently Being Moderated

    thanks Riaan for your reply. I need  the trigger every day at 6 AM and 10 PM. Can you please let me know what Scheduled" Time-to-Deliver Override pattern should I put in the JMS Q I am not able to understand the jms Scheduled" Time-to-Deliver Override patterns at the below link -

     

    Managing Your Applications - 12c Release 1 (12.1.1)

     

    Please help..

    Thanks and Regards,

    Rishu

  • 8. Re: Scheduler Proxy/BPEL
    Rishu Sharma Newbie
    Currently Being Moderated

    Rian,

     

    I even tried putting Time-to-Deliver Override ="* * * 16 * * *" in the jms Q and then restarted the server. But still message is getting picked up from the Queue as soon as message is fed into the Queue. Could you please let me know if i am missing any thing here ?

     

    Thanks ,

    Rishu

  • 9. Re: Scheduler Proxy/BPEL
    Riaan.Ingram Explorer
    Currently Being Moderated

    Hi, make sure the time-To-Deliver override is not being set at the Connection factory or the message producer isn't sending this header.

     

    Pause consumption of messages on the queue, insert the message and ensure it's got a delivery time jms header when you look at it.

     

    Other than that the only thing i can recommend is creating a new Q from scratch with the correct setting and pointing production and consumption to it.

     

    Riaan

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points