Bug 811986 - Timer cycle does not work
Summary: Timer cycle does not work
Keywords:
Status: CLOSED DUPLICATE of bug 801093
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5
Version: BRMS 5.3.0.GA
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Kris Verlaenen
QA Contact: Jiri Locker
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-12 13:12 UTC by Jiri Locker
Modified: 2012-04-23 19:03 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-12 13:33:03 UTC
Type: Bug


Attachments (Terms of Use)

Description Jiri Locker 2012-04-12 13:12:11 UTC
Description of problem:
Timer defined like this:

> <bpmn2:timerEventDefinition>
>   <bpmn2:timeCycle xsi:type="bpmn2:tFormalExpression">#{time}</bpmn2:timeCycle>
> </bpmn2:timerEventDefinition>

does not trigger repeatedly in #{time} intervals. It only delays the process execution for #{time} an then never triggers again.

Version-Release number of selected component (if applicable):
ER5

How reproducible:
always

Actual results:
Timer only waits for the value of timeCycle element and does not trigger repeatedly.

Expected results:
Timer should trigger repeatedly in time intervals specified by the timeCycle element.

Additional info:

Comment 1 Jiri Locker 2012-04-12 13:33:03 UTC

*** This bug has been marked as a duplicate of bug 801093 ***

Comment 2 Kris Verlaenen 2012-04-12 13:54:24 UTC
Note that the format that is used internally in the BPMN2 file looks like this:
<timeCycle>500ms###1s</timeCycle>

So if you want a timer to trigger repeatedly, you should not just specify a delay but also a period after which it should repeat.

Comment 3 Jiri Locker 2012-04-13 09:26:24 UTC
Looks like a nice little hack, but I not sure if it is a good idea to keep this "feature" after turning jBPM into a product. There are several issues:

1, it is not mentioned in the documenation

2, it is not intuitive

   When I write <timeCycle>1s</timeCycle> I expect the timer to trigger repeatedly each 1s. If I wanted to specify an initial delay duration that is different from the timeCycle, I would probably prepend one more timer with <timeDuration>500ms</timeDuration>, because BPMN 2.0 requires that only one of [timeCycle, timeDuration, timeDate] is used inside timer node (they are mutually exclusive).

   The idea to make it possible to specifiy both delay and cycle inside timeCycle element sounds interresting but let's make it optional:
   * 1s means "fire each 1s" (now means "wait for 1s and than do nothing", but this is what timeDuration is intended for)
   * 500ms###1s means "wait for 500ms and then fire each 1s" (works now)

3, the format is not allowed by process form validation for String inputs

   I have <timeCycle>#{cycle}</timeCycle> timer definition where cycle is a process input variable of type String. I cannot set cycle to "500ms###1s" because the process form considers the value invalid.


Note You need to log in before you can comment on or make changes to this bug.