Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8518131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:53:52+00:00 2026-06-11T05:53:52+00:00

I have a little problem I can’t solve so far. In BPEL I want

  • 0

I have a little problem I can’t solve so far. In BPEL I want to create an onAlarm eventHandler which fires immediatly (i.e. the “for” element is set to ‘PT0S’) and repeats every 2 seconds. This eventHandler shall contain a counter which increments every time the alarm fires.

The question is: How to initialize the counter? If the variable will be initialized within the onAlarm scope the value would not increment anymore. In the “normal” control flow the value also cannot be initialized, because it is not defined if the process or the onAlarm scope runs first. So I would get every now and then an uninitializedVariable exception.

My solution would be to not initialize the variable neither in the process scope nor in the onAlarm scope, but create a faultHandler wherein the variable will be initialized and afterwards the onAlarm flow will be executed. Problem is every uninitializedVariable execution will be caught now by this faultHandler and there may be another too.

So is there another possibility to deal with this problem or can I somehow find out which variable wasn’t initialized properly so the faultHandler can get two control flows?

The solution should work on every BPEL engine.

Thanks, Michael

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T05:53:53+00:00Added an answer on June 11, 2026 at 5:53 am

    You can initialize a variable with a default value on its definition using a from-spec just like in an assignment. See section 8.4.1 of the spec for the details.

    A default initialization can look like this:

    <variables>
        <variable name="Default" type="xsd:int" >
            <from>5</from>
        </variable>
    </variables>
    

    This should work as eventHandlers are installed after the start activity of a process has completed. By then, the variables defined in the root scope have already been initialized. To quote the spec, section 12.1:

    Scope initialization consists of instantiating and initializing the
    scope’s variables and partner links; … If a scope contains an
    initial start activity then the start activity MUST complete before
    the event handlers are installed.

    So much for spec. I think nobody can tell whether this “works on every BPEL engine”. As far as I know, it works on bpel-g, Orchestra and EasyBPEL, but not on Apache ODE or OpenESB.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a little problem I can't figure out how to solve. I have
I have a little problem and i can not find how to solve it.
I have a little problem which I have no clue how to solve. I
I have a little problem and hope that you can help me. I want
I have a little problem and I'm hopping that you can help me solve
I have a little problem that I can't figure out how to solve. I
I have a little problem with autoconf, I know that you can use configure.ac
i have a little problem, i'm searching, but i can't found what i need,
I have little unusual problem to solve. I need some hint or links to
I have a little problem, I hope U can help me;) Trouble is, that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.