Tuesday Feb 24, 2009

Scheduler is going Hybrid!

Hybrid trigger that is!  In addition to Simple and Cron, there is now Hybrid which is essentially a Cron trigger beginning a Simple trigger that ends after a specified duration.  This allows scheduling tasks like download a sales receipts file by FTP from a store franchise, Monday through Friday from 9AM to 5PM on the hour trying repeatedly at 2 minute intervals for 10 minutes (just in case a particular store is a bit off schedule in having a data file available precisely at 9:00AM for example).

  • From the Scheduler Control and Triggers panel, pick Hybrid from the Add combo box:

  • Define the Cron Expression that will determine when the Simple trigger will begin, the Duration, number of Repeat's, and Interval between repeats:

  • For demo purpose, it's impractical to use the aforementioned schedule so let's just abbreviate it to trigger on the five of every hour that is at :00, :05, :10, etc and for a 2 minute duration with a 30 seconds interval:

  • After defining the File BC binding and customary BPEL Process and deploying the respective Service Assembly, we get results like this:

  • If you wish to try of this new Hybrid trigger, use a Scheduler component build on or after 25 February 2009 using JNLP launch or JAR download.

Wednesday Jan 07, 2009

Trigger metadata moved to NM properties to facilitate BC to BC in Fuji

Previously, metadata (such as the trigger Name, Group and Date) and the actual triggering message were both encapsulated in the XML message sent to the provider endpoint.  However, this necessitates extra intermediary processing in Fuji IFL if the metadata were not desired when connecting the Scheduler binding directly to another such as File.  Thus, SchedulerBC now transmits metadata via Normalized Message Properties (NM Properties) and the triggering message solely represents the message part sent to the provider.  If however trigger metadata is still required in say a BPEL business logic, then they can be accessed via the BPEL Mapper Properties node under the respective BPEL variable as illustrated below:

Monday Dec 22, 2008

Fuji Scheduler Quickstart Instructions

This section used to be called Adding Scheduler To Existing Fuji Environment and intended for the Fuji acquainted, but since M4 is the next Milestone, it has become too unwieldy to do patching.  Everything is now pre-bundled into a pre-release fujifelix-1.0-M4-SNAPSHOT.jar so there aren't copious bundles to download anymore, so here are the few steps required:

  1. Extract fujifelix-1.0-M4-SNAPSHOT.jar
  2. Install scheduler-archetype-1.0-M4-SNAPSHOT.jar into pertinent Maven repository:

  3. Delete the .index directory in the Maven repository to ensure the newer Scheduler Archetype is used when the repository is next indexed
  4. Install Fuji IFL Support NB Plugin
  5. Install Fuji Server NB Plugin

Friday Dec 19, 2008

Jumpin' on the Fuji Bandwagon

It's here!  SchedulerBC now works with Fuji and IFL (but the binaries aren't completely part of the next Fuji M4 milestone release yet, so you'll have to get them from here)!  The following instructions show how to run SchedulerBC in NB 6.1 using IFL.  Skip any steps, of course, that you have already done:

  1. Install JDK 1.6 from here and enusre that JAVA_HOME environment variable points there
  2. Install Apache Maven 2.0.9 from here by:
    • Unpacking apache-maven-2.0.9-bin.zip into folder of your choice
    • Setting environment variables MAVEN_HOME=...\\apache-maven-2.0.9 and MAVEN_OPTS=-Xmx512m -XX:MaxPermSize=256m
    • Ensuring you're using a fresh Maven repository by pointing the <localRepository> element to it in the {user home directory}\\.m2\\settings.xml file (for example on Windows C:\\Documents and Settings\\username\\.m2\\settings.xml)
  3. Install NetBeans 6.1 IDE with Patch 4 available from either the GlassFish ESB or OpenESB Installer (latter has problems when mapping with NM Properties so use GlassFish ESB until further notice) available here
  4. Install Maven2 3.1.5 NBM Plugin from the NetBeans Update Center

  5. Go to Tools | Options | Miscellaneous | Maven 2 and direct NetBeans to always use the external Maven for building projects

    and that Local Repository field is set to the chosen Maven repository mentioned above.
  6. Install NetBeans IFL Support Plugin available here
  7. Install NetBeans Fuji Server Plugin available here
  8. Go to Tools | Options | Miscellaneous | Fuji and set Fuji Archetypes Version to 1.0-M4-SNAPSHOT:

  9. Install the Scheduler Archetype (download here) into pertinent Maven repository:

  10. Delete the .index directory in the Maven repository to ensure the newer Scheduler Archetype is used when the repository is next indexed
  11. Install pre-release Fuji Milestone 4 from fujifelix-1.0-M4.jar by extracting to a directory of your choice
  12. Add a new Fuji Server by going to Services window (tab) clicking on the Fuji Servers node and Add Server. Set both Root Directory and Working Directory to the directory where fujifelix-1.0-M4.jar was extracted.  Afterwards, right-click Start to start the new Fuji Server node.
  13. The remaining instructions creates and runs a simple Fuji Integration Application project:

  14. Create a new Maven project (without existing POM):

  15. Select the Fuji Integration Application Archetype:

  16. Enter the desired project Project Name, Project Location, and Group Id:

  17. HINT, you MUST be connected to the internet before you press Finish to create the project because there are lots of artifacts that need to be downloaded from all sorts of Maven repositories on the net.

    KNOWN ISSUE, the first time you create a Fuji Integration Application Archetype project, the project will be named <Badly formed Maven project>.  Don't despair, this will rectify itself once the first IFL file has been defined and Generate Service Artifacts done.

  18. Open the IFL Files node and edit the pre-created app.ifl IFL (Integration Flow Language) file and type in the IFL as shown below:

  19. Save the file and click on the green arrowhead button in the IFL editor toolbar (shown in above screenshot) to generate service artifacts for the project; this is how you configure the Binding services such as scheduler and file
  20. Next, configure the binding services by expanding the Service Config Files node as shown below and editing the respective service.properties files.  They typically are ready to run as-is, unless you want to customize their behavior.

    For File service:

    For Scheduler service, we're going to use the new hybrid so comment out the default simple section and uncomment the hybrid:

  21. For this demo, we do need to modify the File binding so that the output file is appended to:

  22. Select Clean and Build for the project:

  23. Select Deploy... for the project; not Run:

  24. Almost done...you now have to start the deployed service assembly in the Services window (tab) under the Fuji Servers | Fuji M4 SNAPSHOT Server | Service Assemblies | SchedulerF4Demo node (path appropriately adjusted per your choices):

Congratulations!   You should now see in the output file specified for the file service:


Edward Wong


« June 2016