Bug 1332569

Summary: Timer start event is triggered before a process form is submitted
Product: [Retired] JBoss BPMS Platform 6 Reporter: Jozef Marko <jomarko>
Component: Business CentralAssignee: Maciej Swiderski <mswiders>
Status: CLOSED NOTABUG QA Contact: Jozef Marko <jomarko>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: jomarko
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: 2016-05-04 12:04:03 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:

Description Jozef Marko 2016-05-03 13:28:50 UTC
Description:
Processes with timer start events are executed before the process form is submitted. Thus, it is not possible to use variables values from the process form.

Version-Release number of selected component (if applicable):
6.3.0.CR2

Steps to Reproduce:
1. Create new project
2. Create new business process and define there variable: xyz:String
3. Model process as: TimerStart -> ScriptTask -> EndEvent
4. Set time cycle for TimerStart: 10s
5. Set script for ScriptTask: System.out.println(xyx);
6. Save process
7. Build and deploy project
8. Go to process definitions
9. Start the given process
10. Form with field for xyz will appear
11. See output of application server
12. Submit the form from step 10.


Actual results:
In the step 10, null will appear every 10 seconds

Expected results:
In the step 10, nothing will appear
After  the step 12, in the console the proper variable value will appear

Additional info:

Comment 1 Maciej Swiderski 2016-05-04 11:54:39 UTC
Jozef,

this works as designed, timer start event are expected to fire automatically without any user interaction - the time defined in the timer definition is from the time of deployment. So as soon as you deploy, jBPM will scan all processes and if found any timer start events it will register it for automatic execution.

In you case you defined timer start event with cycle timer definition 10s - this means new process instance will be created every 10 seconds regardless user doing any actions. That's how process instances started by timer should behave.

If you need any more information, just let me know. Once you feel confident please close this bz as it does work as designed.

Comment 2 Jozef Marko 2016-05-04 12:04:03 UTC
Thanks Maciej.