Returning Results

From Apache OpenOffice Wiki
Jump to: navigation, search

Once a synchronous job has finished its work, it returns its result using the any return value of the execute() method. An asynchronous jobs send back the result through the callback method jobFinished() to its The returned any parameter must contain a sequence< > with the following elements:

Elements of the Job Return Value
Deactivate boolean. Asks the job executor to disable a job from further execution. Note that this feature is only available if the next event is triggered by the job executor or the event broadcaster. If it comes, for example, from the dispatch framework using an URL with an <alias> argument, the deactivation will be ignored.This value should be used carefully if the Environment-EnvType is "DISPATCH", because users will be irritated if clicking a UI element, such as an Add-On menu entry, has no effect.
SaveArguments sequence< >. Must contain a list of job specific data, which are written directly to the Arguments list into the job configuration. Note: Merging is not supported. The list must be complete and replaces all values in the configuration. The necessary data can be copied and adjusted from the JobConfig element of the execution arguments.
SendDispatchResult If a job is designed to be usable in the dispatch framework, this contains a struct, which is send to all interested dispatch result listeners.

Tip: This value should be omitted if Environment-EnvType is not "DISPATCH".

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages