Job number generator plugin

The IJobNumberGenPlugin job number generator plugin interface is responsible for generating a job number. The base configuration plugin implementation in the Gosu JobNumberGenPlugin class is for demonstration purposes only. You must replace the built-in implementation with your own version of the plugin before moving your system into production.

The interface method genNewJobNumber takes an array of parameter strings and returns a non-null unique identifier string for the job.

The input parameter strings do not have a Guidewire-defined meaning, and you can customize the use of these parameters in user interface code that calls this plugin. You can change the Gosu code to pass values other than the default value of null.

The JobNumberGenPlugin plugin is the built-in implementation of this interface. This plugin checks for job numbers that already exist, and generates a new random value. The value is randomly generated using the procedure described below.

  • The first five digits increment a counter. This counter is reset at server restart.
  • The last five digits are random.

For example, in a single server startup, job numbers increase. The first job is 00000<random5>, the second is 00001<random5>, the third is 00002<random5>, and so on. When the server restarts, the counter resets to zero, and therefore job numbers do not reflect creation time. When the counter reaches the limit of five digits, the counter increases to six digits. Therefore, the plugin returns 11 digit job numbers.