I've never been totally happy with the behaviour of a Process when you set it for "Background" operation by putting a number in the "Run in the background" option for that Process in the Configuration Tool. I've been trialling an alternative method which seems to behave OK and wanted to sanity check it with the community.
Method is
Create BO BackgroundRun with attributes
- ExecString (PLAINTEXT 200+chars)
- Started (TIMESTAMP)
Create Process BackgroundRun
FIND BackgroundRun WHERE BackgroundRun.Started IS UNDEFINED
BackgroundRun.Started=CURRENT_TIMESTAMP
EXEC_STRING BackgroundRun.ExecString
Add entry to Scheduler to call BackgroundRun Process
BackgroundRun
I let this run every minute but you could add time restraints to the scheduler or specific attributes to define when you want the process to be run
To "queue" a process for BackgroundRun simply create a new BackgroundRun
CREATE BackgroundRun WITH BackgroundRun.ExecString='PersonProcess'
BackgroundRun.ExecString can be a Process Name
PersonProcess
or if can combine a FIND action and a Process Name to put specific objects in context
FIND Person WHERE Person.Due = CURRENT_DATE PersonProcess
This seems to work OK. A benefit to me is there is no delay for the user. All that is required is a single CREATE action. I normally do a DISPLAY QUESTION before creating the BackgroundRun object and perhaps a DISPLAY MESSAGE afterward to tell them whats happening. Anyone see a problem?