Job web services
Use the JobAPI web service to add activities to jobs or to withdraw preempted jobs.
The primary methods of this web service add new activities to jobs. They differ in how groups and users are assignment new activities.
addActivityFromPatternAndAssignToUseraddActivityFromPatternAndAssignToQueueaddActivityFromPatternAndAutoAssign
Specify the activities that you add using activity patterns. Users define activity patterns in the administrative data of your PolicyCenter instance. An activity pattern is a template that sets default values for new activities.
Common parameters in the job APIs
The common parameters for the primary methods are listed below.
- Public ID of the job. To get the public ID, use the helper method findJobPublicIdByJobNumber.
- Public ID of the activity pattern. To get the public ID, use the method ActivityPattern.finder.getActivityPatternByCode("pattern-code").
- Activity fields, as a
gw.webservice.pc.pc1000.gxmodel.activitymodel.types.complex.Activity
object.
Use an instance of the XML type
Activityto initialize activity fields that activity patterns do not cover.
Note the following characteristics about the parameters to the Job APIs.
- Activity patterns must not be designated “automated only.”
- Activity patterns must
be available for the type of jobs to which you try to add the activities.
Otherwise, Guidewire throws the exception
EntityStateException. - Users of the web services
user must have the permissions
VIEW_JOBandCREATE_ACTIVITY. Otherwise, Guidewire throws the exceptionPermissionException. - Parameters, such job IDs,
activity pattern IDs, user IDs, queue IDs, and group IDs, must refer
to existing entity instances. Otherwise, Guidewire throws the exception
DataConversionException.
Helper methods of the job APIs
The JobAPI web service provides the following helper methods.
findJobPublicIdByJobNumber– Given a job number, returns the public ID of the job. Use the public ID as a parameter to other methods of the Job APIs.withdrawJob– Withdraws preempted jobs.
