-
1. Re: Improvig timer
fady.matar Nov 20, 2007 8:12 AM (in response to camunda)Most probably a feature like a cron job definition would do the job resulting in something like:
<timer name="uniquetimername1" repeat="* * 5" transition="nextNode"/>
-
2. Re: Improvig timer
tom.baeyens Nov 20, 2007 11:18 AM (in response to camunda)cool feature proposal. i would propose to add an attribute duedatetime with the following syntax:
where
duedatetime:= [day] space timeday:= (relativeday | absoluteday) relativeday:= today (+|-) [0..9]* [business] day(s) absoluteday:= dd/mm/yyyy time:= HH:mm[:ss]
(the date formats should be configurable in the businesscalendar.properties)
i proposed a separate attribute to ease the distinction between the currently supported delay-based format and the new format parsing
does that make sense ?
no not yet. just realized that we need to separate between relative dates and times and absolute dates and times. so my proposal above is not good enough, but it shows the direction in which i want to think.
if you want please, propose something more complete and clean. -
3. Re: Improvig timer
brittm Nov 29, 2007 2:51 PM (in response to camunda)Like most folks, I guess, I've implemented an ActionHandler to dynamically modify due dates on tasks and timers. And like you mention Tom, there typically needs to be a dynamic date/time reference from the process instance as well as a static modifier...such as
<timer name="xyz" baseDateTime="#{someJava.util.Date}" addDuration="1 business day"></timer>
Use case: I have an established deadline for a customer install, and this task/timer needs to come due 1 business day ahead of that deadline...<timer name="xyz" baseDateTime="#{deadlineDate}" addDuration="-1 business day"></timer>
or the same for a task...<task name="xyz" baseDateTime="#{deadlineDate}" addDuration="-1 business day" .../>
-Britt -
4. Re: Improvig timer
kukeltje Nov 30, 2007 11:13 AM (in response to camunda)why not something like
<timer name="xyz" duedate="#{deadlineDate} - 1 business day"></timer>
That can be implemented without any schemachanges!!! so could easily be done in version 3.3 (or even a 3.2.3) -
5. Re: Improvig timer
brittm Dec 2, 2007 1:17 PM (in response to camunda)Ronald, I like it.
So then we would have a duedate attribute with one of the following:
1) EL expression
2) jBPM calendar duration with an optional operator (+/-)
3) or both separated by a +/- operator
Do you require the EL to evaluate to a java Date, java Calendar, String, or something else? Perhaps handling all three would be the right option.
-Britt -
6. Re: Improvig timer
kukeltje Dec 3, 2007 5:39 AM (in response to camunda)Handling all three would not be difficult.... I'll give it a try tonight. It's fairly simple in jBPM to change each attribute to accept an EL. Changing the subprocessname e.g. to accept an EL instead of a fixed string, that was 10 lines of code.
-
7. Re: Improvig timer
camunda Dec 3, 2007 6:08 AM (in response to camunda)Yeah, would be a cool thing to have! I am quite interested in the results...
What's still missing is the time issue, so Ronalds proposal could be extended a bit:<timer name="xyz" duedate="#{deadlineDate} - 1 business day AFTER 09:00"></timer>
Or something like that... Let's see what the project team which needs it at the moments says...
But I also like the idea not to introduce new attributes, so no schema changes are required. This can may be done in jbpm 4!
By the way: britt, can you send me a short mail, I have a off forum question for you: bernd.ruecker@camunda.com -
8. Re: Improvig timer
kukeltje Dec 3, 2007 7:21 PM (in response to camunda)I just came home a little later than expected (1:20 insted of 10:00). So I won't be able to try something. But tomorrow I might. Now first some sleep.
-
9. Re: Improvig timer
tom.baeyens Dec 4, 2007 4:26 AM (in response to camunda)"kukeltje" wrote:
I just came home a little later than expected (1:20 insted of 10:00). So I won't be able to try something. But tomorrow I might. Now first some sleep.
you're getting old
:-) -
10. Re: Improvig timer
kukeltje Dec 5, 2007 6:05 AM (in response to camunda)please checkout cvs.... initial version checked in late last night (03:30, so not getting old..... ;-))
also some testcases but small issues remain (will make a jira issue for this tonight)
- Only date, no Calendar yet and String will never be suported by me (due toformatting things)
- a minus for an old style due date is now possible but leads to duedates in the past.... suggestion on how to handle these? e.g. throw an error
- only on timer, not on task due date yet
- not tested in combination with repeats
oh and btw...
- '65 years - 2 hours - 10 minutes' does not work nor with plusses. I did not know that
- duration does not take leapyears into account. +65 years does miss 16 days (in my case ;-)), but this was already the case and not caused by me (might even be a java issues) -
11. Re: Improvig timer
tom.baeyens Dec 5, 2007 6:14 AM (in response to camunda)great addition! thanks. can you add a brief description to the userguide about it ?
is there a jira issue for this ? make sure to set the fix version to 3.2.3. that way it will appear in the release notes.
if the resulting date is in the past, you can just ignore it without throwing an error. -
12. Re: Improvig timer
tom.baeyens Dec 5, 2007 6:15 AM (in response to camunda)"kukeltje" wrote:
(03:30, so not getting old..... ;-))
ah. that's more like it :-) ...even if you have to sleep till noon the day after :-) -
13. Re: Improvig timer
kukeltje Dec 6, 2007 6:56 AM (in response to camunda)Jira issue: http://jira.jboss.com/jira/browse/JBPM-1097
I'll make another jira issue for the documentation..... and assign it to myself -
14. Re: Improvig timer
kukeltje Dec 6, 2007 7:06 AM (in response to camunda)the jira issue was already there btw.... and once you know how to do it, it is fairly easy to add EL awareness to any jBPM attribute.
And no, I did not sleep till noon, 08:30 I was on my way to work by motorbike