Process Timers – Controlling the time in which your process executes by Jose Rodrigues

clip_image002

 

Following up a series of questions around setting timers in the Oracle Community forums, I decided to write this article to try and guide their use and how these can be used to control process execution.

Let’s start!

The Use Case

We’ll begin by setting up the scenario in which we’ll have to control our process flow.

Imagine that you want to have a part of your process that executes immediately if the current time is between 08:00am and 04:00pm (16:00 hours for us Europeans), or wait until 08:00am if it’s outside that interval.

It’s frequent to have some kind of control in parts of the processes, for instance when you want to send SMS to your customers. You certainly don’t want to do it at 03:00am.

How will we make this?

We should use a Catch Timer event, of course, and XPATH’s DateTime functions to check the current time and to set the timer to way for next morning’s 08:00.

The Catch Timer event has several ways to be configured (triggered at specific dates and times, on a specific schedule – every day at 10:28:00 (repeatable), or in a time cycle – every 2 minutes), but we’ll focus on the one where we configure the timer to wait for a specific time and date. More on the others perhaps in another article.

We’ll illustrate the use of timers with an example process. You can, of course, adapt it to your needs.

Defining the execution conditions

So you start by defining a gateway that will split the execution between:

  • Immediate
  • Wait for 08:00am
    • This will have to be split into prior to midnight and after midnight. but for now, we’ll consider the scenario of only two options.

So, you set the expression on the conditional flow that will do the immediate execution, leaving the condition that must wait for 08:00 as the unconditional (default) branch.

The expression should be something like this: Read the complete article here.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

Advertisements

About Jürgen Kress
As a middleware expert Jürgen works at Oracle EMEA Alliances and Channels, responsible for Oracle’s EMEA Fusion Middleware partner business. He is the founder of the Oracle SOA & BPM and the WebLogic Partner Communities and the global Oracle Partner Advisory Councils. With more than 5000 members from all over the world the Middleware Partner Community is the most successful and active community at Oracle. Jürgen manages the community with monthly newsletters, webcasts and conferences. He hosts his annual Fusion Middleware Partner Community Forums and the Fusion Middleware Summer Camps, where more than 200 partners get product updates, roadmap insights and hands-on trainings. Supplemented by many web 2.0 tools like twitter, discussion forums, online communities, blogs and wikis. For the SOA & Cloud Symposium by Thomas Erl, Jürgen is a member of the steering board. He is also a frequent speaker at conferences like the SOA & BPM Integration Days, JAX, UKOUG, OUGN, or OOP.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: