Index Changes
This is version 32. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

The Scheduler Binding Component (BC), powered by OpenSymphony Quartz, affords scheduling capability to kick off (consume) other JBI component providers, for example a BPEL Service Engine.

Like other Binding Components such as File or JMS, in order to use Scheduler BC one has to first create a WSDL Document defining the Scheduler binding and then use it to construct a BPEL service to act as a provider endpoint. When the scheduler triggers, a message will be sent to the Business Process and it'll be incumbent on the business logic implemented there to perform an appropriate task.

INCUBATOR Status

Feature Freeze estimated for late Feb '09 in preparation for release in GF ESB Update 1

Milestones and Schedule

Please note that this plan and the content of the milestones are subject to change at any time.
Changes can be due to issues encountered with a particular piece of functionality, feedback we receive about implementation which may cause design and/or functional changes, strategy changes, etc.

Milestones

Milestone Begins Ends Status Theme
M1 09/17/08 Complete Introduction of Scheduler in Service Engine form
M2 09/18/08 10/17/08 Complete Scheduler refactored as Binding Component
M3 10/20/08 11/12/08 Complete Quartz Cron Trigger functionality added
M4 11/13/08 12/05/08 Complete Implementation of pivotal Systemic Qualities
M5 12/08/08 12/19/08 Complete SchedulerBC Fuji/IFL enabling
M6 01/05/09 01/23/09 Complete Monitoring for Scheduler
M7 01/27/09 03/06/09 Complete Adding Hybrid Trigger capability
FEATURE FREEZE 03/06/09 Feature freeze targeting GlassFish ESB 2.1
M8 03/07/09 04/03/09 Planned Database persistency for Quartz Trigger jobs
M9 04/06/09 05/15/09 Planned Dynamic definition of Triggers
M10 05/18/09 06/19/09 Planned Monitoring/Managing MBean for Scheduler dynamic triggers

All Open Issues

List of all open SchedulerBC issues


Milestone 1

Key Deliverables

  • Introduction of Scheduler in Service Engine form: Delivered 09/09/08
    • Scheduler presented as a NetBeans project allowing creation of Quartz Simple Trigger artifacts
    • When project is built, WSDLs are exposed that can be implemented by a Business Process that needs to be triggered
    • Blogged here and here


Milestone 2

Key Deliverables

  • Scheduler refactored as Binding Component to improve usability: Delivered 10/17/08
    • Scheduler Service Binding (WSDL) created via WSDL Wizard
    • Support for Quartz Simple Trigger
    • Blogged here


Milestone 3

Key Deliverables

  • Quartz Cron Trigger functionality added: Delivered 11/12/08
    • Support now includes Quartz Cron (a la Unix crontab) Triggers, in addition to Simple (interval-based) Triggers
    • Blogged here


Milestone 4

Key Deliverables

  • Implementation of pivotal Systemic Qualities: Delivered 12/05/08
    • Logging: FINEST through SEVERE Java Util Logging Levels now discriminately instrumented for SchedulerBC
    • Application Configuration: Allows the Administrator type configurations for SchedulerBC to be specified at deployment tyime
    • Application Variables: Enables confidential information such as passwords to be parameterized in the triggering message and only specified at deployment time
    • Blogged here


Milestone 5

Key Deliverables

  • SchedulerBC Fuji/IFL enabling: Delivered 12/19/08
    • Enable SchedulerBC to function as a Fuji Binding Service and accessible also via IFL (Integration Flow Language)
    • Blogged here, here and here


Milestone 6

Key Deliverables

  • Monitoring for Scheduler: Delivered 01/23/09
    • Key Scheduler specific statistics available via Monitoring MBeans
    • Blogged here


Milestone 7

Key Deliverables

  • Adding Hybrid Trigger capability: Delivered 03/06/09
    • Provide a combination of a Quartz Cron Trigger with a Simple Trigger such that tasks like do something every 30 minutes Monday through Friday between 9:30AM and 5:00PM can be accomplished
    • Blogged here


Milestone 8

Key Deliverables

  • Database persistency for Quartz Trigger jobs: Planned
    • Currently Quartz Trigger jobs are just stored in RAM such that if a job fails to trigger (perhaps due to a provider endpoint fault), the job cannot be recovered/re-sent if the Service Assembly is shutdown
    • With database persistency (only JDBC friendly databases like MySQL will be initially supported), these trigger jobs can be re-sent so that usecases like transfer $50 from my checking account to savings every Friday can be safely accomplished using SchedulerBC


Milestone 9

Key Deliverables

  • Dynamic definition of Triggers: Planned
    • The SchedulerBC can also be a Service Provider and accept requests to CRUD (Create/Read/Update/Delete) triggers
    • This capability affords usecases like a BPEL processing a loan request can set up a scheduler to notify applicant of status in a timely manner


Milestone 10

Key Deliverables

  • Monitoring/Managing MBean for Scheduler dynamic triggers: Planned
    • Develop MBean APIs for Monitoring/Managing (CRUD) of dynamically defined triggers

Architecture

As mentioned above, the Scheduler BC follows pretty much the same modus operandi as other BCs in that all its configuration is persisted in the corresponding WSDL Document. The latter is then used to define a Business Process that will receive the triggering message and do something appropriate.

Source Code

Issue Tracker

The Scheduler BC works pretty much the same as any other, such as File BC. However, with the recent WSDL Binding Wizard changes across the board for all BC's, it's worth mentioning how to create a deployment for a Scheduler BC triggering a BPEL to write to a File BC.

Create a Scheduler WSDL Document

  • Launch the WSDL Binding Wizard by right-clicking over the Process Files folder of a BPEL project and select New | WSDL Document
    • Or equivalently, select New | Other | ESB (Category) | Binding (File Type) from the Process Files context menu

  • Enter an appropriate File Name for the WSDL, choose Concrete WSDL Document for the WSDL Type, select SCHEDULER from the Binding drop-down box and press Next

  • To create a Simple trigger, choose Simple from the Add combo box or if so already, simply press the + (plus) button, key in appropriate data and press Add Simple Trigger button when done

  • Optionally, define a custom date and time format to be used with the scheduler; this format is used both to interpret date and time values persisted in the Scheduler's WSDL as well as displaying the date and time in the message sent to the endpoint being triggered

  • Compose the Format by selecting from the various date/time component Pattern drop-down boxes, as well as typing other literals; all the while a Sample text field illustrates what the date and time will look like

  • As a comparison to Simple trigger that sends a message at periodic intervals of time, let's create a Cron trigger that does so at particular moments in time. Start by choosing Cron from the Add combo box

  • We'll start off with a very simple Cron trigger to fire the top of every minute, that is, at the zeroth second.  Appropriately fill in Name, Description and Message fields and then select the Second (1) tab if not already done.  Select the Just on Second choice if not already so and the associated spinner to set the second-of-the-minute will be automatically enabled and set this to 0.  (Note, the respective controls in the other choices are only enabled if that choice is selected.)  This is the only condition that needs to be defined because all the others are already defaulted appropriately (verifiable in the Cron Expression text field (see CronExpression JavaDoc here) and so you can simply press Add Cron Trigger button

  • Although a more complicated Cron Expression generally takes a longer period to run than a demo affords, for illustration sake, let's define one that reminds Americans to vote in the General Election.  This is typically the first Tuesday in November every four years, and let's say poll opens at 8:00:00 AM.  Start by selecting the Second (1) tab and Just on Second choice, and setting the second spinner to zero (0)

  • Set the Just on Minute spinner to 0, Just on Hour spinner to 8, of the Minute (2) and Hour (3) tabs respectively

  • Select the Day-of-Week (6) tab and select choice On the and drop down settings First and TUE

  • Having done so, the Day (4) tab is automatically set to No specific Day of the month because the Quartz Scheduler API requires it to be mutually exclusive with Day-of-Week

  • Select the Month (5) tab and choose Just on Month and month 11 (November)

  • Finally, we need to specify the optional Year (7) tab by checking on the option box and then select the Starting on Year choice, setting year to 2008 and the repeating every to 4

  • Press Finish and the new Scheduler WSDL editor appears

Create a File WSDL Document

  • Similarly, right click over the Process Files folder again, select New | WSDL Document and this time create a FILE Binding Concrete WSDL Document of Type Write and press Next

  • Specify the respective fields and click Finish

Create a BPEL and Connect the Components

  • Create a new BPEL in the same Process Files folder and drag and drop the Scheduler WSDL to approximately the middle of the Ports column left of the BPEL canvas

  • If it appears, OK the ensuing dialog confirming creation of Partner Link to represent the Scheduler BC consuming endpoint

  • Similarly, drag and drop the File WSDL to the right column

  • Again, if the ensuing dialog appears, click the Swap Roles button since this time the BPEL is the consumer of the service the File BC provides

  • Create Receive, Assign, and Invoke activities in the BPEL and Edit the Receive activity to select the Partner Link representing the Scheduler BC

  • Press the Create button to create an Input Variable for the Scheduler operation by accepting all the default values in the pop-up dialog (not shown) and hit OK here

  • Similarly edit the Invoke activity and also create an Input Variable for the File BC operation

  • Double click on the Assign activity to bring up the Mapper and concatentate the FireTriggerOperationIn | Properties | SchedulerBC | Inbound | Trigger Date and FireTriggerOperationIn | schedPart fields and map to part1 of the File input variable, WriteIn, and Save All your work

Deploy a Composite Application for Scheduler BC -> BPEL -> File BC

  • Create a new Composite Application project and drag and drop the BPEL project onto the CASA Editor canvas

  • Hit the Build (hammer) button twice (second time to get rid of progress label...known issue)

  • Right click over the CASA project and select Deploy (you must have a running Glass Fish server with Scheduler Binding Component installed already of course) and you should be getting results in C:\temp\output.xml like this:
12 November 2008 at 3:47:31 PM: Do you need more money Joe?
12 November 2008 at 3:48:00 PM: Top of the Minute to you Hank Paulson, please send more money!
12 November 2008 at 3:48:31 PM: Do you need more money Joe?
12 November 2008 at 3:49:00 PM: Top of the Minute to you Hank Paulson, please send more money!
12 November 2008 at 3:49:31 PM: Do you need more money Joe?
12 November 2008 at 3:50:00 PM: Top of the Minute to you Hank Paulson, please send more money!

Scheduler Binding WSDL Document Syntax

Here's what the above WSDL looks like:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:sched="http://schemas.sun.com/jbi/wsdl-extensions/scheduler/"
    name="schedEZLoans" targetNamespace="http://j2ee.netbeans.org/wsdl/bpelSubPrimeOrBust/schedEZLoans" xmlns:tns="http://j2ee.netbeans.org/wsdl/bpelSubPrimeOrBust/schedEZLoans" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
    <wsdl:types/>
    <wsdl:message name="TriggerEventMessage">
        <wsdl:part name="schedPart" type="xsd:string"/>
    </wsdl:message>
    <wsdl:portType name="TriggerPortType">
        <wsdl:operation name="FireTriggerOperation">
            <wsdl:input name="inMsg" message="tns:TriggerEventMessage"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="TriggerBinding" type="tns:TriggerPortType">
        <sched:binding group="schedEZLoans" date-format="dd MMMM yyyy &apos;at&apos; h:mm:ss a"/>
        <wsdl:operation name="FireTriggerOperation">
            <sched:operation mode="static"/>
            <wsdl:input name="inMsg">
                <sched:trigger name="SendLoanApplicationStatus" type="simple" enabled="true" description="Trigger sending loan application status to Joe The Plumber" repeat="indefinite" interval="60000" message="Do you need more money Joe?"/>
                <sched:trigger name="AskForBailoutMoney" type="cron" enabled="true" description="Trigger requesting more bailout billions from Feds" cron-expr="0 * * * * ?" message="Top of the Minute to you Hank Paulson, please send more money!"/>
                <sched:trigger name="VoteTheScoundrelOut" type="cron" enabled="true" description="Remind Americans to vote to save the economy" cron-expr="0 0 8 ? 11 3#1 2008/4" message="Back away from the remote, get up and go vote!"/>
            </wsdl:input>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="TriggerService">
        <wsdl:port name="schedEZLoans_TriggerPort" binding="tns:TriggerBinding">
            <sched:active-period starting="now" ending="never" timezone="America/Los_Angeles"/>
        </wsdl:port>
    </wsdl:service>
    <plnk:partnerLinkType name="schedEZLoans">
        <!-- A partner link type is automatically generated when a new port type is added. Partner link types are used by BPEL processes. 
In a BPEL process, a partner link represents the interaction between the BPEL process and a partner service. Each partner link is associated with a partner link type.
A partner link type characterizes the conversational relationship between two services. The partner link type can have one or two roles.-->
        <plnk:role name="TriggerPortTypeRole" portType="tns:TriggerPortType"/>
    </plnk:partnerLinkType>
</wsdl:definitions>

Systemic Qualities (QoS)

  • Please refer to this blog

Binaries

In order to try out the Scheduler BC:

  • You'll need to run the latest official OpenESB or GlassFish ESB Installer for the desired platform from here (as of 9 December 2008)
  • Otherwise, official a-la-carte binaries are available:
    • Scheduler WSDL Binding Extension NetBeans plug-in (you may need to rename it back to a .nbm extension after downloading)
    • Scheduler BC GF plug-in

Mailing List

For questions and comments, please subscribe to an appropriate list at OpenESB Mailing Lists.

Contacts

Number of visits: 3

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This particular version was published on 27-Jan-09 14:15 PM, -0800 by EdWong