Bug 1138987 - Cannot define timer scripting language (eg. Cron) via JBDS BPMN2 Editor
Summary: Cannot define timer scripting language (eg. Cron) via JBDS BPMN2 Editor
Status: VERIFIED
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Eclipse Tooling
Version: 6.0.2
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ER3
: 6.1.0
Assignee: Kris Verlaenen
QA Contact: Jozef Marko
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-07 09:05 UTC by Stelios Kousouris
Modified: 2018-01-30 12:35 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed:


Attachments (Terms of Use)

Description Stelios Kousouris 2014-09-07 09:05:17 UTC
Description of problem:
I define a start Timer node in JBDS BPMN2 Editor. When I define duration or cycle the languages available are either JAVA/MVEL. This means I cannot define cron

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

How reproducible:


Steps to Reproduce:
1. From the pallette in the JBDS drag the start timer node in the editor
2. Go to the properties and event tab, setting cycle/duration
3. Script languages are either JAVA/MVEL

Actual results:


Expected results:


Additional info:

In order to define "cron" I had to modify manually the XML and add the language. Then the timer works as expected.

    <bpmn2:startEvent id="StartEvent_1" name="">
      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
      <bpmn2:timerEventDefinition id="TimerEventDefinition_1">
        <bpmn2:timeCycle xsi:type="bpmn2:tFormalExpression" id="FormalExpression_2" language="cron">2m</bpmn2:timeCycle>
      </bpmn2:timerEventDefinition>
    </bpmn2:startEvent>

Comment 2 Robert (Bob) Brodt 2014-11-20 14:31:20 UTC
It looks like this extension is not BPMN2 compliant since the spec only specifies:

"The return type of the timeCycle and timeDuration attributes MUST conform to the ISO-8601 format for date and time representations."

The spec does not make provisions for a "script language" in these Expression values, hence Java, MVEL or any other non-standard script language is not supported by the BPMN2 spec.

That said, I will go ahead and add a text field to the Timer Event Definition property sheet to allow entry of an arbitrary language specification.

Comment 3 Robert (Bob) Brodt 2014-11-20 17:03:01 UTC
Fixed with the following build IDs:

1.1.1.201411201651 Luna
1.0.3.201411201651 Kepler

Comment 4 Jozef Marko 2015-01-27 10:21:06 UTC
Hi Bob. Feature for adding language specification works. But if I want to use added language for event definition, it doesn't work properly.

Way to reproduce:
1. Create simple process starting with 'Timer Start Event'
2. In 'Timer Event Definition Details' add new language. Name: 'cron' URI: 'http://some.unique.cron.uri'
3. Then fill 'Timer Event Definition Details' like this: Timer Type: 'Interval', Value: '0/1 * * * * ?', Language: 'cron'
4. Save process
5. Bpmn2 file will contain something like this:
...
<bpmn2:startEvent id="StartEvent_3" name="Start Event 3">
      <bpmn2:timerEventDefinition id="TimerEventDefinition_2">
        <bpmn2:timeCycle xsi:type="bpmn2:tFormalExpression" id="FormalExpression_5">0/1 * * * * ?</bpmn2:timeCycle>
      </bpmn2:timerEventDefinition>
</bpmn2:startEvent>
...
6. Again open 'Timer Event Definition Details', field Language will be empty
7. Fill Language again to 'cron' and save process
8. Now bpmn2 file contains desired values like this:
...
<bpmn2:startEvent id="StartEvent_3" name="Start Event 3">
      <bpmn2:timerEventDefinition id="TimerEventDefinition_2">
        <bpmn2:timeCycle xsi:type="bpmn2:tFormalExpression" id="FormalExpression_5" language="cron">0/1 * * * * ?</bpmn2:timeCycle>
      </bpmn2:timerEventDefinition>
</bpmn2:startEvent>
...

Expected results:
Bpmn2 file like in 8. after first saving in 4.

Reproduced on jbds-8.0.2.GA_jbdsis-8.0.0.CR1.earlyaccess - BPMN2 Modeler 1.1.1.201501081320

Comment 5 Robert (Bob) Brodt 2015-01-27 17:14:23 UTC
OK, sorry about that. Should be fixed now in Luna build 1.1.1.201501271701 available here:

http://download.eclipse.org/bpmn2-modeler/updates/luna/1.1.1/

Comment 6 Jozef Marko 2015-02-04 12:59:23 UTC
Verified on BPMN2 Modeler 1.1.1.201501282123

Comment 7 Jozef Marko 2015-02-04 13:03:11 UTC
Notice, that language="cron" in this source code:

<bpmn2:startEvent id="StartEvent_3" name="Start Event 3">
      <bpmn2:timerEventDefinition id="TimerEventDefinition_2">
        <bpmn2:timeCycle xsi:type="bpmn2:tFormalExpression" id="FormalExpression_5" language="cron">0/1 * * * * ?</bpmn2:timeCycle>
      </bpmn2:timerEventDefinition>
</bpmn2:startEvent>

corresponds to language URI, not to language name.

Comment 8 Robert (Bob) Brodt 2015-02-05 02:16:11 UTC
Not sure what your point is here. Is this good, bad or not an issue? In other words, do I need to fix something? ;)

Comment 9 Jozef Marko 2015-02-05 05:58:15 UTC
Bob, everything is ok. It is only note for myself. I will mark this BZ as verified, when some newer JBDS with newer BPMN modeler will be available.

Comment 10 Jozef Marko 2015-02-13 10:24:58 UTC
BPMN2 Modeler 1.1.1.201501282123 NOT included in jbds-8.0.2.GA_jbdsis-8.0.0.CR2

Comment 11 Jozef Marko 2015-04-02 11:53:58 UTC
Verified on jbds-8.1.0.CR1_jbdsis-8.0.1.CR1 - BPMN2 Modeler 1.1.2.Final


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