<ResultHandler>
Section:
Job (Task Agent)
Required:
If <Job> includes has_result_data="true"
Value type:
None
Default:
Defined in jobconfig files
Product:
Creo Elements/Direct Model Manager, Creo Elements/Direct Drawing Manager
Description
The result handler defines what to do with the job results. A <ResultHandler> must be defined if the <Job> tag includes has_result_data="true".
Syntax
<ResultHandler java_class="">
ClashJobResultHandler
Specialized result handler that checks in the result of the Recalculate (Clash Analysis) task and updates the Clash Analysis object in the database.
StoreToDatabaseJobResultHandler
Stores a job's result files in the database.
<TargetLocation> - The value determines whether to save the job result as a file in WM_FILE or a related file in WM_RELATED_FILE (default).
<ChoiceValue> - Defines a possible value for the target location.
EmailJobResultHandler
Sends out the job results in an e-mail.
<EmailFiles>
<To>
<Subject> - The e-mail subject line.
<Body> - The e-mail body.
SaveToFileSystemJobResultHandler
<TargetDirectory> - The directory on the server side where the job result files are stored.
CompoundJobResultHandler is a special job result handler that combines multiple job result handlers. Defining a combination of job result handlers displays all of the choices in the New Task dialog.
The value of the ResultHandlerOption tag determines the default selection of the result handler.
true - Selected
false - Not selected
* 
Nested CompoundJobResultHandlers are not supported!
Example
<ResultHandler java_class="com.osm.automation.StoreToDatabaseJobResultHandler">
<TargetLocation format="MODEL">WM_RELATED_FILE
<ChoiceValue>WM_RELATED_FILE</ChoiceValue>
<ChoiceValue>WM_FILE</ChoiceValue>
</TargetLocation>
</ResultHandler>
Example of a CompoundJobResultHandler
<ResultHandler java_class="com.osm.automation.CompoundJobResultHandler">
<ResultHandlerOption name="MailOnFailureOption" ignore_errors="false">true
<ResultHandler java_class="com.osm.automation.EmailJobResultHandler">
<DisplayName>Send e-mail in case of failures</DisplayName>
<EmailFiles>
<Subject>Model check had failures</Subject>
<Body> Model check had failures for '{1}'. Annotated model is attached.</Body>
</EmailFiles>
</ResultHandler>
</ResultHandlerOption>
<ResultHandlerOption name="SaveToFileSystem" ignore_errors="false">true
<ResultHandler java_class="com.osm.automation.SaveToFileSystemJobResultHandler">
<DisplayName>Save annotated model to server directory</DisplayName>
<TargetDirectory>C:\taskagent</TargetDirectory>
</ResultHandler>
</ResultHandlerOption>
</ResultHandler>
Was this helpful?