Define a custom work item type

Before you begin

Before starting to define a custom work item type, review Work queues and work item entity types.

Procedure

  1. Open Guidewire Studio.
  2. Add a new entity for your custom work item type:
    1. In the Studio Project window, expand configuration > config > Extensions > Entity.
    2. Right-click Entity, and then select New > Entity.
    3. In the Entity dialog box, enter the appropriate values.
      For example, if creating a new work item entity called MyWorkItem, 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.
    4. Click OK.
  3. Set the entity to implement the correct work item delegate:
    1. In the toolbar, in the drop-down list next to the green plus button, , select implementsEntity.
    2. In the panel of fields on the right, select WorkItem from the name drop-down list.
  4. Add a soft reference to the unit of work for your custom work queue:
    1. 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.
    2. 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
  5. (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.