BSE Services
Actions are performed on behalf of other parts of the software. BSE Services must be implemented using a BSE Services Framework. All BSE Services share these common attributes:
- The service can be started and stopped manually on a specific application server. The service can be started automatically when the BSE becomes active.
- One instance per application server is started for the BSE.
BSE Services Parameters (ttaad8100m000)
The BSE Services Parameters (ttaad8100m000) session shows a check box indicating whether the BSE Services functionality is enabled. The Framework User field is mandatory and you must specify a super user. The DB available timeout is default 45 seconds.
The bshell of an ipc_info
entry to use is only visible
on Windows. It must contain a value. The default value is: bshell
.
When the BSE Services is activated:
- Standard BSE Services are added automatically, such as the Job Scheduler.
- Correct resources are written to
$BSE/lib/defaults/jobd
. - Correct resources are written to
$BSE/lib/defaults/all
. - The BSE Services Parameters table is ttaad800.
BSE Service Framework
BSE Services are implemented using a BSE Services Framework
BSE Services Framework Status (ttaad8101m000)
Running BSE Services are monitored. The BSE Services Framework Status (ttaad8101m000) session shows the status per host.
The BSE Service Framework status can be:
- Starting
- Started
- Stopping
- Stopped
- Error
If the BSE Services Framework cannot be started, the status is
set to
Error
. For instructions to solve the issue, see the $BSE/log/log.ttaad8210m000
log file.
BSE Services (ttaad8110m000)
Use this session to manage the BSE Services.
The administrator can add, configure, and start or stop services. The BSE Services (ttaad8110m000) session shows the service session code and description. With the Automatic Start check box you can specify whether the service must be started automatically.
BSE Services table – ttaad810
From this session you can start the BSE Services by Application Server (ttaad8111m000) session. Per host you can see the started BSE Service on a specific application server and the BSE Service status.
BSE Services by Host table – ttaad811
The BSE Service status can be:
- Starting
- Started
- Stopping
- Stopped
- Error
If a BSE Service terminates, either normal or abnormally, the
status of this BSE Service is updated. BSE Services that terminate abnormally
(crash), are restarted twice. If a BSE Service keeps terminating, the status of
the BSE Service is updated to
Error
.
For instructions to solve the issue, see the log file for the BSE Service: $BSE/log/log.<BSE Service session code>
. The BSE Service must be restarted manually.
Windows jobd.exe service
If LN is
deployed on a UNIX or Linux OS, the jobd.exe
is replaced by a startup script in the $BSE/etc
directory.
On Windows when the OS boots, the jobd
service is started automatically. The jobd.exe
is a porting set binary. The binary can start a bshell running any
session the moment the application server becomes online. This is configured
through the startsession
and stopsession
resources in $BSE/lib/defaults/jobd
.
The Activate Job Daemon (ttaad5206m000) session is used by default as the start session.
The Cancel Job Daemon (ttaad5207m000) session is used by default as the stop session.
If jobdbshell
is set, it points to an entry in $BSE/lib/ipc_info, default $BSE/bin/ntbshell.exe
.
Starting and stopping BSE Services on Windows
On Windows, this process is started by the jobd.exe
Windows Service when the application server becomes online.
The BSE Services tables are read and the specified BSE Services are started. These processes keep running until the bshell exits. The BSE Services by Application Server table is checked every five seconds to see if there are BSE Services to start. BSE Services with the Starting status are started. In this way a manual start of a BSE Service on a specific application server is supported.
No automatic restart of the bshell is done when the bshell stops unexpectedly.
Starting and stopping BSE Services on UNIX or Linux OS
If LN is deployed on a UNIX or Linux OS, you cannot
use jobd.exe
. Instead, you can use these scripts in the
$BSE/etc
directory to start and stop the
services:
- rc.start_bseservices
- rc.stop_bseservices
To automate the process:
- Include rc.start_bseservices in the rc.start script.
- Include rc.stop_bseservices in the rc.stop script.
Job Scheduler
When BSE Services is enabled, the Job Scheduler is implemented as a BSE Service.
The Job Scheduler is a BSE service. When a job is queued, the Job Schedule data is added to the Scheduled Jobs (ttaad520) table. The Job Scheduler starts a job in a separate bshell. The job process reports whether it was successful.
Scheduled jobs are placed in a Scheduled Jobs table.
The ttaad520 table stores Job Schedule data per job and company, including status information.
The ttaad520 table contains these fields:
- Job
- Company
- User : the user for whom to run the job.
- Next Execution Date
- Status : Waiting , Starting , Running, Failed to Start
- Hostname : the Host on which the job is started
- Bshell ID : the PID of the bshell in which the started job runs
When the job is (temporarily) deactivated, the corresponding record in the Scheduled Jobs table is removed
Job Scheduler Service (ttaad5220m000)
The Scheduled Jobs table is checked every 60 seconds by the Job Scheduler Service. When a job must be started, the Job Scheduler Service starts this job in the correct company.
Started jobs run with the LN user specifics of who created the job. When the job process is started successfully, the scheduled job receives the Starting status.
If the job process cannot be started, the scheduled job receives the Failed to Start status. A new attempt to start the job is done in the next iteration
Job process
When the job process starts, it updates the Scheduled Jobs table. The job receives the Running status.
When the job process ends, it updates the Scheduled Jobs table:
- In case of a periodical job, the Next Execution Date is updated.
- In case of a non-periodical job, the scheduled job is removed.
Job data
All job management is done with the Job Data (ttaad5500m000) session. At some points the Scheduled Jobs table is updated:
- When a job is queued, a new record is inserted.
- When a job is canceled, the record is deleted.
- When a job is modified, the record is updated.
Activate Job (ttaad5203m000)
When started by the Job Scheduler Service, this session updates the scheduled job when the job starts. The bshell pid and the hostname are set.
When the job finishes, the session updates or deletes the scheduled job:
- In case of a periodical job, the new execution date is set.
- In case of a non-periodical job, the scheduled job is deleted.