Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1141619

Summary: Boundary event should not be attached to Script Task in JBDS for jBPM
Product: [Retired] JBoss BPMS Platform 6 Reporter: ksuzumur
Component: Eclipse ToolingAssignee: Kris Verlaenen <kverlaen>
Status: CLOSED EOL QA Contact: Jozef Marko <jomarko>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.2CC: bpms-support, ksuzumur, kverlaen, mbaluch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:13:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description ksuzumur 2014-09-15 03:46:29 UTC
Description of problem:
Boundary event should not be attached to Service Task in BPMN2 Diagram Editor.

Version-Release number of selected component (if applicable):
JBPM 6.0.2
JBDS 7.1.1

How reproducible:
Attach a boundary event to a service task

Steps to Reproduce:
1. Create a script task
2. Attach a boundary event timer to the script task
3. You can see the following error in console, but there is no error in JBDS.
----
java.lang.IllegalArgumentException: Boundary events are supported only on StateBasedNode, found node: org.jbpm.workflow.core.node.ActionNode [ScriptTask_3]
----

Actual results:
We can attach the boundary event timer to the script task.

Expected results:
We can NOT attach the boundary event timer to the script task.

Additional info:
Bug 994408 - jBPM engine does not support boundary event on Service Task

Comment 2 Kris Verlaenen 2014-09-15 11:34:43 UTC
Note that the description refers to Service Task in some cases, but the issue is about the Script Task, not the Service Task.

Comment 3 Robert (Bob) Brodt 2014-09-26 17:40:07 UTC
Does this mean that Script tasks are NEVER expected to cause a timeout?

Comment 5 Robert (Bob) Brodt 2014-09-29 13:12:58 UTC
Sorry for being unclear...what I wanted to say was: I don't understand why timer events are not supported by jBPM on Script Tasks - isn't it possible that a script MAY time out? If so, wouldn't it be necessary to have a timer event that can handle that timeout?

Comment 6 Kris Verlaenen 2015-01-19 15:23:52 UTC
Correct (at least in the current situation).  Script tasks are executed using the engine thread.  They should not quick and immediate.  Otherwise they will block the engine.  Also, even if a timer would fire it would be prevented from triggering as another thread (executing the script) would still be active.  It would be much better to model long-running scripts using a service task and using async execution for the script, in which timers could be used as well.

Comment 7 Robert (Bob) Brodt 2016-01-22 14:59:08 UTC
Fixed in 1.2.3 (Mars) and 1.3.0 (Luna) versions of BPMN2 Modeler.
User is prevented from adding a Timer Boundary Event to a Script Task. Also, a Timer Event Definition can not be added to an existing Boundary Event attached to a Script Task.

Comment 9 Robert (Bob) Brodt 2016-03-23 15:10:52 UTC
I have verified this as also fixed in BPMN2 Modeler versions for
Luna: 1.1.6.CR1-v20160318-1403-B1303
Mars: 1.2.4.CR1-v20160318-1302-B107
Neon: 1.3.0.Beta1-v20160318-1302-B41

Comment 10 Jozef Marko 2016-04-06 06:08:40 UTC
Verified on:
jbds-9.1.0.CR1_jbdsis-9.0.0.CR1
jbtis-4.3.0.CR1
BPMN2 Modeler - 1.2.4.Final-v20160330-1625-B110