berthe
18th August 2004, 16:04
Hi,
while running a job, BW Messages may pop up. The job stops running until a user interacts. How can this be changed, without changing any session?
Thanks in advance!
Berthe
NPRao
18th August 2004, 18:56
Berthe,
Whats the BW error ? an error can result due to multiple reasons - data out of range, array out of bounds, transaction errors, lock or resource contentions etc.
In general, there shouldnt be any UI for batch/jobs.
BaanERP Application Software Engineering Guides
Guidelines for jobs
--------------------------------------------------------------------------------
Jobs are used to run a process or print session at a certain time (only once or periodically) for one or more of the following reasons, for example,
To avoid a system-resource-consuming session to decrease the system performance when you do not want it.
To make sure that no other users are updating data that you want to process (day end processing).
To have a defined system status at a certain time, for example, just before a database backup.
The job handling is a tools function.
To run a session in job mode the user has to choose Make Job and fill in the form fields. The session will continue in the script section choice cont.process (so this section must exist). When starting a subsession or activating another session, the section choice.run.job of the invoked script will be executed: field sections and form sections will not be executed !
In a process or print session, user interaction is not allowed (e.g. raise questions) after the "before choice" section. Messages can be redirected to a file whose name can be configured when you carry out the Job.
To avoid user interaction after this section, consider arranging the user interaction earlier in the program flow, or remove the interaction by using defaults, parameters, or reports. If, in BaanERP, you use dal.set.error.message() (DALHOOKERRORS), make sure that they are intercepted in the script and redirected to an error report.
In job mode, the standard program (BaanERP: 4GL Engine) sets the job.process variable to true. This can be used as extra condition in the program.
Example
if not job.process then
to.form(2)
endif
If a fatal error occurs, the standard program must be informed by setting the standard program variable job.process.error to true.
Example
before.program:
if not parameters.present then
job.process.error = true
stop()
endif
choice.cont.process:
after.choice:
execute(print.data)
choice.print.data
on.choice:
if not tccom.dll0010.open.report(1, "", 1) then
|* display is not allowed as device
job.process.error = true
endif
|* no statements hereafter, the standard program (BaanERP: 4GL Engine) takes over
|* control and detects the job.process.error
The job will then continue, abort, or restart the same session depending on the job start up configuration in tools.
Be aware that the printing should be done in the choice print.data section. The reason is that the output device, when the session is started in job mode, will not be initialized outside the choice.print.data.
monica1
23rd August 2004, 13:35
In our system the jobs only run when the name of it has 6 characters.