Projects:ProcessScheduler/FunctionalSpecifications
Process Scheduler - Functional Specifications
Overview
Openbravo is a collection of User Interfaces Units as Windows, Processes, etc. These units allow performing business operations, as creating a product, generating a report, etc.). Processes are system actions that are requested by the user who provides auxiliary parameter values to execute the action.
This action is executed in one shot and finished with success or failure message.
It can return an output.
The Process Scheduler will provide Openbravo with a user-configurable tool that integrates with Openbravo pages and security. It is a centralized tool that enables Openbravo users to manage batch processes.
When the Process Scheduler begins, it connects to the Openbravo database, initializes itself and then polls the Process Request table searching for queued requests to process. If it finds any, the Process Scheduler Server Agent gathers the data that defines the process and then starts it at the designated time.
Process Scheduler Architecture:
Purpose
With your Openbravo application, you have certain processes, batch programs, reports, and so on, that you want to perform behind the scenes of your online system. Running reports, posting journal entries, or executing during the night a heavy treatment are all examples of processes that you most likely want to perform independently of your Openbravo application.
The Process Scheduler will provide Openbravo application with a user-interface tool that integrates with Openbravo pages and Openbravo security. Through this integration, the Process Scheduler will enable users to request and monitor batch processes.
Object | Importance |
---|---|
Execute a Report in Background | 1 |
Schedule a Business Process | 2 |
Schedule a Report | 4 |
Schedule an Administrative task | 3 |
Scope
This specification covers the following major areas:
- Schedule a Process to run on any date or time interval that your business requires, such as monthly, daily, hourly, or even by the minute.
- Schedule recurring Process.
- Create Set of processes to run several processes, and, conditionally, schedule successive processes based on the status of a previous process in the job
- Monitor a scheduled Process.
- Setup the Security.
References
Design Considerations
Assumptions
Dependencies
The Process Monitor component of the Openbravo Process Scheduler will be implemented using Quartz Listener and Notification capabilities. The Process Scheduler will use the Quartz Scheduler, through the Quartz Listener.
Constraints
Glossary
Process – Single task, program, or routine, such as an Java or PLSQL program.
Set of Process – One or more processes of the same or different types that can run either in series or parallel.
Functional Requirements
User roles & profiles
System Administrator – The Administrator of the customer's Openbravo instance. The System Administrator is the person responsible for enabling, disabling and configuring the processes.
Openbravo User – Depending on his roles, an Openbravo user will be allow to execute the process and consult the possible output files.
Business Process Definition
Schedule a Process
The Process Scheduler is a tool that enables to manage Openbravo batch processes.
Running reports or posting journal entries are all examples of processes that you most likely want to perform independently of your application.
Application Page
For the process that already exists and can be launched from a button inserted in a page, a button “Background Run” option will be proposed to the user.
This button will open the Process Request page.
Process Request Page
You submit a Process request from the Process Request Dialog page in the Openbravo application by selecting Process Request.
Depending on your security authorizations, you can run background processes. The security that associates Role and process is developed in the chapter “Setup the Security”.
The user that launched the process will receive an alert when the run is terminated, whatever the status. If the process generates a report or a log file, these file will be associated to the alert or to the mail as a link.
If you just submit an ad hoc job request, typically you just need to create a recurrence entitled something like Once, and use it for process requests that are for a one-time or unique need.
On the other hand, there are other processes requests that you run on a regular basis like inventory.
Setup the Recurrency
After entering the timing (day and time), you need then to define the recurring time intervals of the Process that reflects your particular requirements.
This eliminates the possibility of anyone forgetting to submit a job request or incorrectly submitting one. Once you specify a Run Recurrence, the process request will continue the cycle until you manually stop it.
For instance, if you need to run a process every weekday at 5 P.M. that resolves all the transactions managed by your website, you could select the run recurrence definition at 5pm to schedule this process to run at the appropriate times. For the scheduled Processes, you will be able to create a Run Recurrence.
Set of processes
Process Scheduler gives you the ability to schedule one or more Processes as a group.
A Process is a single task, program, or routine, such as an Java or PLSQL program.
A Set of Processes comprised of a group of processes that all get submitted as a unit. A Set of Processes is defined as one or more processes of the same or different types that can run either in series or parallel.
All the processes of a set of process have the same timing option (that has been configured in the main Process Request page).
You can add processes in the set using the tab "Other Requests" of the Process Request main page.
Process Monitor
Process Monitor allows you to monitor the status of process requests that you’ve submitted by displaying a list of the currently logged requests and the request’s status.
Depending on your security authorization, you will be or not allowed to consult the whole information on the process requests.
Here are some of the tasks you can complete with Process Monitor:
- Refresh the Process Monitor so that it reflects all the current process requests being processed, regarding on the active filter.
- Select filtering options so that you only view the process requests that meet given criteria.
- View the individual processes or set of processes.
- Check the status of your submitted process requests.
- Cancel process instance that have been initiated or are currently processing.
Process status:
Num | Run Status | Importance | Status | Description |
---|---|---|---|---|
1.1 | Scheduled | Required | To be started | Status assigned to a new process request. The process instance will remain Scheduled until a Process Scheduler has picked up the new request. |
1.2 | Processing | Required | To be started | A status Processing indicates the program is running. |
1.2 | Successful | Required | To be started | The program has successfully completed. |
1.3 | Error | Required | To be started | The program associated with the process request encountered an error while processing transactions within the program. |
1.4 | Cancelled | Required | To be started | This status indicates that the process scheduler has successfully cancelled the process instance. |
1.5 | Canceling | Nice to have | To be started | A user has requested to cancel scheduling of a process instance, but the process scheduler has not yet completed the cancel. |
Cancel a Request
The user can cancel a process instance clicking on the button Cancel Process on the Process Monitor page.
To definitely cancel a Process Request (that could have a recurrence timing in the future), the user must unselect the Active check box present in the Process Request main page.
Setup the Security
- Security based on Role
The Process Scheduler fit the Openbravo standard security.
The user will be able to execute a process using the process scheduler if he owns the role associated to this process.
The same is true if a user wants to consult the process log through the Process Monitor.
The user that scheduled the process can reduce to him the right to consult the output files through the process monitor if he does not check the option Security based on Role on the process Request page.
This option allows all people sharing the same Role than the current user to consult the output files through the process monitor.
If this check box is not selected, only the current user will be allowed to consult the output files (log and report).
This option is activated by default.
User stories
- The Openbravo users note a decrease of performance of their production environment. John is a database administrator, he develops a PL/SQL script that brings back the response time of 50 specifics SQL sentence. Using the Process Scheduler, John schedules this scripts during 48 hours, every 30 minutes in order to confirm the impact of the net access on the database performance.
- The accounting service schedules financial reports every last day of the month.
- Marc is responsible of the database backups and schedules a batch process that starts the backup every night at 23h00.
- Marta is using the Process Scheduler to automatically generate invoices from the purchase orders every 2 hours.
- Roberto is Chief Executive Officer, he scheduled the sales and financial reports analysis every morning at 8h00 to have them ready to use when he arrives.
- Frank is using the process scheduler to run in background the heavy reports he needs. He will receive a mail with the report as an attachment when the process completes successfully.
Requirements based on business processes
Schedule a Process
Num | Requirement | Importance | Status | Comments |
---|---|---|---|---|
1.1 | Process | Required | To be started | The process to be run. |
1.2 | Security based on Rule | Required | To be started | This option allows all people sharing the same Role than the current user to consult the output files through the process monitor. This option is activated by default.
If this check box is not selected, only the current user will be allowed to consult the output files (log and report). |
1.3 | Active | Required | To be started | This option must be checked to allow the process running. |
1.4 | Notification | Nice to have | To be started | The user that ran the process (or all the users that belong to the same role) could be notified (alert, mail, etc.) that the process has completed successfully. |
Set of Processes
Num | Requirement | Importance | Status | Comments |
---|---|---|---|---|
1.1 | Run Mode | Required | To be started | Select Serial to have each job in your workflow run sequentially. Select Parallel if you don’t have a requirement for the processes to run in a certain order. If you select Parallel, the Run Always flags for all of the processes are selected. |
1.2 | Run Always | Required | To be started | Run Always allows the next job in the queue to run regardless of whether the previous job ran successfully. |
1.3 | Specific Parameters | Required | To be started | Depend on each Process.
|
Setup the Timing
Num | Requirement | Option | Importance | Status | Comments |
---|---|---|---|---|---|
2.1 | Run Now | N/A | Required | To be started | The process to run will start immediately, in Background mode. |
2.2 | Run Deferred | Run Date | Required | To be started | The date on which you want the process to run. |
2.3 | Run Deferred | Run Time | Required | To be started | The time at which you want the process to run. |
Setup the Recurrence
Num | Requirement | Option | Importance | Status | Comments |
---|---|---|---|---|---|
3.1 | Run Date | N/A | Required | To be started | The date on which you want the process to run. [Run Date]=[Current date] by default. |
3.2 | Run Time | N/A | Required | To be started | The time at which you want the process to run. [Run Time]=[Current Time] if not specified. |
3.3 | Each n Minutes | N/A | Required | To be started | You may choose to execute the process every 30 minutes, or 30 hours entering 30*60=1800. The interval in minutes should be specified. |
3.4 | Daily | Every work day | Required | To be started | A process can be executed every work day (from Monday to Friday). |
3.5 | Daily | Each n Days | Required | To be started | 5 days for example (n=1 by default if not specified). |
3.6 | Weekly | Specific Day | Required | To be started | You may choose one or more days on which to run a process. For instance, you can define the process to run every Friday or weekly every Monday, Wednesday, and Friday. |
3.7 | Weekly | Each n Weeks | Required | To be started | This option is available when you choose a Specific Day (3.6). You also can run it all the Wednesday every 3 weeks entering completing the Sub Option Each n Weeks (n=1 by default if not specified). |
3.8 | Monthly | Specific Day | Required | To be started | You can also specify a specific numerical date, for exemple the day 5th of each n months (see 3.11). |
3.9 | Monthly | Last Day of the Month | Required | To be started | No comment. |
3.10 | Monthly | First, Second, Third or Fourth | Required | To be started | You can set a recurrence of the 1st, 2nd, 3rd, 4th week day (of each n months see 3.11). |
3.11 | Monthly | Each n Months | Required | To be started | This option is available for the sections 3.8 and 3.9 and 3.10 (n=1 by default if not specified). |
3.12 | Daily, Weekly, Monthly | End after n recurrence | Nice to have | To be started | You can specify a specific number of recurrences for the scheduling activity. |
3.13 | Daily, Weekly, Monthly | End recurrence the Date D | Nice to have | To be started | You can specify a specific date for the scheduling activity. |
Process Monitor
Num | Requirement | Importance | Status | Comments |
---|---|---|---|---|
4.1 | Process | Required | To be started | The process to be run. |
4.2 | user | Required | To be started | The user that ran the process. |
4.3 | Run Deferred | Required | To be started | The current status of the process. |
4.4 | From Date | Required | To be started | Start of the process run.
|
4.5 | To Date | Required | To be started | End of the process run. |
Other
Num | Requirement | Importance | Status |
---|---|---|---|
2.1 | xx | Should have | Complete |
User Interface Mockups
Execute a Sales Report Background the application:
Setup the Timing – Run Now:
Setup the Timing – Run Deferred:
Setup Recurrence – Every n minutes:
Setup Recurrence – Daily, Each n days:
Setup Recurrence – Daily, Every work day:
Setup Recurrence – Weekly:
Setup Recurrence – Monthly, Last day of the month:
Setup Recurrence – Monthly, First, Second, Third, Fourth week day:
Process Monitor – Main Page:
Process Monitor – Search Page:
Process Monitor – Search Page:
You can get details about a particular process request by clicking the Row of the process you want to consult.
This opens the Process Detail page, where you can view such details as request parameters and output files.
Technical Requirements
Non-Functional Requirements
Open Discussion Items
- PMA: The User Interface presentation has still not been defined.
- PMA: The presentation and the technical way to embed the parameters in the page must be defined.
- PMA: The alerts should be defined using the standard setup of Openbravo (General Setup, Application, Alert Management).
- PMA: The technical solution to insert in the page the shortcuts linked to the process output files (for example Pdf file) must be solved.
- PMA: We need to define what kind of process can or can not be canceled.