Define a custom work item type
Before you begin
Procedure
- Open Guidewire Studio.
-
Add a new entity for your custom work item type:
- In the Studio Project window, expand .
- Right-click Entity, and then select .
-
In the
Entitydialog box, enter the appropriate values.For example, if creating a new work item entity calledMyWorkItem, enter the following values:Field Example value Entity MyWorkItem Entity Type entity Desc Custom work item Table myworkitem Type keyable Accept all the other default values in the dialog box. - Click OK.
-
Set the entity to implement the correct work item delegate:
-
In the toolbar, in the drop-down list next to the green plus button,
, select implementsEntity. -
In the panel of fields on the right, select
WorkItemfrom the name drop-down list.
-
In the toolbar, in the drop-down list next to the green plus button,
-
Add a soft reference to the unit of work for your custom work queue:
-
Select the column
field type in the drop-down list next to the green plus button,
.
Studio inserts a new column element in the element table. -
In the panel of fields on the right, enter the entity name for the unit
of work for the name value.
For example, if the unit of work is an instance of an Activity object, add the following values at the panel at the right:
Field Example value name Activity type Activity nullok false
-
Select the column
field type in the drop-down list next to the green plus button,
- (Optional) Add other fields to your custom entity as meets your business needs.
What to do next
Whenever you define a custom work item for a work queue, your custom work queue class must implement the createWorkItem method to write the work item to the queue.
