Hide Forgot
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:
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.
Thanks Maciej.