allocateWorkItemToWorld

This function allows the user to allocate one or more work items to any available user. The allocated work item is removed from the current user’s work item list, and appears in the work item list of the recipient, with a state of Allocated.

Executing this method causes a dialog similar to the following to be displayed, either in the parent block, or in a dialog, depending on the value passed in the parent parameter:

This method has two signatures: one to allocate a single work item, and one to allocate multiple work items.

This component publishes the closeAssignWorkItems event. The application should subscribe to this event to detect when user has clicked either the OK or Cancel button. At that time, assignments, if any, will have been completed.

Ideally, the component will be displayed modally. If you choose to display it non-modally and allow the same work item to appear in multiple instances, keep in mind that only the first of those to perform an assignment of that work item will succeed. Other instances will get an exception.

Syntax

allocateWorkItemToWorld(id,
                        version,
                        state,
                        workType,
                        parent);
allocateWorkItemToWorld(workItems,
                        workType,
                        parent);

Parameters

  • id - (integer) A work item ID, identifying the work item to allocate to another user.
  • version - (integer) Specifies the version number of the work item you want to allocate. The version number indicates how many times the work item has changed state. The version number starts at 0 when the work item is created, and is incremented by one each time it changes state.
  • state - (String) Identifies the state of the work item you want to allocate. The possible states are:
    • ALLOCATED
    • PENDED
  • workType - (constant) Identifies whether the work item(s) being allocated belong to the current user’s work set or are from a work set the current user supervises. The possible values are:
    • com.tibco.wcc.components.WorkViews.TYPE_MYWORK
    • com.tibco.wcc.components.WorkViews.TYPE_SUPERVISEDWORK
  • parent - (Object) (optional) Identifies the General Interface component where the interface is to be loaded. If omitted, the interface is loaded in a dialog.
  • workItems - (Array<Objects>) These identify the work items to be allocated. Each Object in the array must have the following properties, identifying an existing work item (see above for definitions):
    • workItemId (integer)
    • workItemVersion (integer)
    • state (String)

Returns

none