Gosu classes for jobs
The Gosu job code contains most of the programming logic for the job (policy transaction). In Studio, you can view the code for each job type by navigating to . The types of files that make up the job code are:
- Job Class – Each job type defines a subclass of the
JobProcess class. For example,
SubmissionProcess.gs ultimately extends the
JobProcess class. This class defines the steps
of a job. It also defines the core functionality and core properties of the job,
such as request quote or bind. The job class is marked as
@Export, so you can modify the class directly.Be careful when you modify the job class because it is the primary controller for how jobs work. Modifications can easily cause the job process to break.
For information about classes, see Classes.
- Job Subclass – Rather than modifying the job class directly,
you can indirectly change or adds methods and properties to the job by defining a
subclass. You may find it easier to maintain changes in a subclass rather than the
job class because the subclass contains your code only. For example, to create a subclass for the submission class, you create a file such as YourCompanySubmissionProcess.gs that extends the SubmissionProcess class:
class YourCompanySubmissionProcess extends SubmissionProcess { ... }Be careful when you modify a subclass because it modifies the job process and can easily cause the job process to break.
If you create a subclass, you must modify the job process customization plugin. For more information, see Job process creation plugin.
- Enhancement – You can use a Gosu enhancement to add methods
and properties to a class. These methods and properties are available to all objects
of the enhanced type. The default application contains some enhancements to the job
entities, and you may modify these or add your own enhancements. Enhancements often
contain code that is not the core functionality of the job and that you can
customize to meet your business needs.
If you need to modify the enhancement for the submission class, edit
SubmissionEnhancment.gsx.
See also
