com.tibco.n2.service.adapter.binding

## Interface WorkItemManagementService

- All Known Implementing Classes:
    WorkItemManagementService

      public interface WorkItemManagementService

  Interface to provide the `WorkItemManagementService` methods.

  ©2011 TIBCO Software Inc.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.tibco.n2.brm.api.WorkItem` | `allocateAndOpenNextWorkItem(java.lang.String resourceId)` Allocates and opens the next work item
    `com.tibco.n2.brm.api.WorkItem[]` | `allocateAndOpenWorkItem(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds, java.lang.String[] resources)` Allocates and opens a list of work items
    `com.tibco.n2.brm.api.WorkItem[]` | `allocateWorkItem(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds, java.lang.String[] resources)` Allocates a list of work items
    `com.tibco.n2.brm.api.ManagedObjectID[]` | `closeWorkItem(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds)` Closes a list of work items.
    `com.tibco.n2.brm.api.CompleteWorkItemResponseDocument.CompleteWorkItemResponse` | `completeWorkItem(com.tibco.n2.brm.api.ManagedObjectID workItemId, com.tibco.n2.brm.api.WorkItemBody workItemPayload, boolean getNextPiledItem)` Allocates and opens the next work item
    `java.lang.String[]` | `getOfferSet(com.tibco.n2.brm.api.ManagedObjectID workItemId)` Returns s list of resource guids for which the work item was originally offered.
    `com.tibco.n2.common.organisation.api.XmlModelEntityId[]` | `getOfferSetV2(com.tibco.n2.brm.api.ManagedObjectID workItemId, int apiVersion)` Returns an array of resource Model Entity IDs for which the work item was originally offered.
    `com.tibco.n2.brm.api.WorkItemHeader[]` | `getWorkItemHeader(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds)` Gets a list of work item headers for the supplied list of work item objects.
    `com.tibco.n2.brm.api.WorkItemBody[]` | `openWorkItem(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds)` Opens a work item
    `com.tibco.n2.brm.api.ManagedObjectID[]` | `pendWorkItem(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds, com.tibco.n2.brm.api.HiddenPeriod[] hiddenPeriods)` Pends a list of work items.
    `com.tibco.n2.brm.api.WorkItem[]` | `reallocateWorkItem(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds, java.lang.String[] resources, boolean[] revertData)` Reallocates a list of work items.
    `com.tibco.n2.brm.api.WorkItem[]` | `reallocateWorkItemData(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds, java.lang.String[] resources, com.tibco.n2.brm.api.WorkItemBody[] workItemPayload)` Reallocates a list of work items data.
    `com.tibco.n2.brm.api.ManagedObjectID` | `saveOpenWorkItem(com.tibco.n2.brm.api.ManagedObjectID workItemId, com.tibco.n2.brm.api.WorkItemBody payload)` Saves an open work item
    `com.tibco.n2.brm.api.ManagedObjectID[]` | `setWorkItemPriority(com.tibco.n2.brm.api.SetWorkItemPriority.WorkItemIDandPriority[] workItemPriorities)` Closes a list of work items.
    `boolean` | `skipWorkItem(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds)` Skips the supplied list of managed work item objects.
    `com.tibco.n2.brm.api.WorkItem[]` | `unallocateWorkItem(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds)` Unallocates a list of work items.

- - ### Method Detail

    - #### pendWorkItem

          com.tibco.n2.brm.api.ManagedObjectID[] pendWorkItem(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds,
                                                              com.tibco.n2.brm.api.HiddenPeriod[] hiddenPeriods)
                                                       throws com.tibco.n2.brm.services.InvalidWorkItemFault,
                                                              com.tibco.n2.brm.services.WorkItemFault,
                                                              com.tibco.n2.brm.services.InvalidVersionFault,
                                                              com.tibco.n2.brm.services.InternalServiceFault,
                                                              com.tibco.n2.brm.services.WorkItemAPIScriptCancelFault,
                                                              com.tibco.n2.brm.services.SecurityFault

      Pends a list of work items.
      Parameters:
        `workItemId` - an array of managed work item id to pend
      Returns:
        returns an array of work item managed objects throws RuntimeException
      Throws:
        `com.tibco.n2.brm.services.InvalidWorkItemFault`
        `com.tibco.n2.brm.services.WorkItemFault`
        `com.tibco.n2.brm.services.InvalidVersionFault`
        `com.tibco.n2.brm.services.InternalServiceFault`
        `com.tibco.n2.brm.services.WorkItemAPIScriptCancelFault`
        `com.tibco.n2.brm.services.SecurityFault`

    - #### closeWorkItem

          com.tibco.n2.brm.api.ManagedObjectID[] closeWorkItem(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds)
                                                        throws com.tibco.n2.brm.services.InvalidWorkItemFault,
                                                               com.tibco.n2.brm.services.WorkItemFault,
                                                               com.tibco.n2.brm.services.InvalidVersionFault,
                                                               com.tibco.n2.brm.services.InternalServiceFault,
                                                               com.tibco.n2.brm.services.WorkItemAPIScriptCancelFault,
                                                               com.tibco.n2.brm.services.SecurityFault

      Closes a list of work items.
      Parameters:
        `workItemId` - an array of managed work item id to unlock
      Returns:
        returns an array of work item managed objects throws RuntimeException
      Throws:
        `com.tibco.n2.brm.services.InvalidWorkItemFault`
        `com.tibco.n2.brm.services.WorkItemFault`
        `com.tibco.n2.brm.services.InvalidVersionFault`
        `com.tibco.n2.brm.services.InternalServiceFault`
        `com.tibco.n2.brm.services.WorkItemAPIScriptCancelFault`
        `com.tibco.n2.brm.services.SecurityFault`

    - #### reallocateWorkItem

          com.tibco.n2.brm.api.WorkItem[] reallocateWorkItem(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds,
                                                             java.lang.String[] resources,
                                                             boolean[] revertData)
                                                      throws com.tibco.n2.brm.services.InvalidVersionFault,
                                                             com.tibco.n2.brm.services.WorkItemFault,
                                                             com.tibco.n2.brm.services.InvalidWorkItemFault,
                                                             com.tibco.n2.brm.services.InternalServiceFault,
                                                             com.tibco.n2.brm.services.SecurityFault

      Reallocates a list of work items. For a work item it is possible to revert the work item payload to it's original state when offered.

      Parameters:
        `workItemIds` - array of work item objects
        `resources` - array of resources
        `revertData` - array indicating if data should be reverted to it's original state
      Returns:
        returns a `List` of work item objects
      Throws:
        `java.lang.RuntimeException`
        `com.tibco.n2.brm.services.InvalidVersionFault`
        `com.tibco.n2.brm.services.WorkItemFault`
        `com.tibco.n2.brm.services.InvalidWorkItemFault`
        `com.tibco.n2.brm.services.InternalServiceFault`
        `com.tibco.n2.brm.services.SecurityFault`

    - #### reallocateWorkItemData

          com.tibco.n2.brm.api.WorkItem[] reallocateWorkItemData(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds,
                                                                 java.lang.String[] resources,
                                                                 com.tibco.n2.brm.api.WorkItemBody[] workItemPayload)
                                                          throws com.tibco.n2.brm.services.InvalidWorkItemFault,
                                                                 com.tibco.n2.brm.services.WorkItemFault,
                                                                 com.tibco.n2.brm.services.InvalidVersionFault,
                                                                 com.tibco.n2.brm.services.InternalServiceFault,
                                                                 com.tibco.n2.brm.services.SecurityFault

      Reallocates a list of work items data.

      Parameters:
        `workItemIds` - array of work item objects
        `resources` - array of resources
        `workItemPayloadArray` - array of work item payloads
      Returns:
        returns a `List` of work item objects
      Throws:
        `java.lang.RuntimeException`
        `com.tibco.n2.brm.services.InvalidWorkItemFault`
        `com.tibco.n2.brm.services.WorkItemFault`
        `com.tibco.n2.brm.services.InvalidVersionFault`
        `com.tibco.n2.brm.services.InternalServiceFault`
        `com.tibco.n2.brm.services.SecurityFault`

    - #### getOfferSet

          java.lang.String[] getOfferSet(com.tibco.n2.brm.api.ManagedObjectID workItemId)
                                  throws com.tibco.n2.brm.services.InvalidVersionFault,
                                         com.tibco.n2.brm.services.InvalidWorkItemFault,
                                         com.tibco.n2.brm.services.InternalServiceFault

      Returns s list of resource guids for which the work item was originally offered.
      Parameters:
        `workItemId` - the work item id and version
      Returns:
        returns an array of resource guids throws RuntimeException
      Throws:
        `com.tibco.n2.brm.services.InvalidVersionFault`
        `com.tibco.n2.brm.services.InvalidWorkItemFault`
        `com.tibco.n2.brm.services.InternalServiceFault`

    - #### getOfferSetV2

          com.tibco.n2.common.organisation.api.XmlModelEntityId[] getOfferSetV2(com.tibco.n2.brm.api.ManagedObjectID workItemId,
                                                                                int apiVersion)
                                                                         throws com.tibco.n2.brm.services.InvalidVersionFault,
                                                                                com.tibco.n2.brm.services.InvalidWorkItemFault,
                                                                                com.tibco.n2.brm.services.InternalServiceFault

      Returns an array of resource Model Entity IDs for which the work item was originally offered.
      Parameters:
        `workItemId` - the work item id and version
      Returns:
        returns an array of resource Model Entity IDs (these have type and version information along with the GUIDs). throws RuntimeException
      Throws:
        `com.tibco.n2.brm.services.InvalidVersionFault`
        `com.tibco.n2.brm.services.InvalidWorkItemFault`
        `com.tibco.n2.brm.services.InternalServiceFault`

    - #### unallocateWorkItem

          com.tibco.n2.brm.api.WorkItem[] unallocateWorkItem(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds)
                                                      throws com.tibco.n2.brm.services.InvalidEntityFault,
                                                             com.tibco.n2.brm.services.InvalidWorkItemFault,
                                                             com.tibco.n2.brm.services.InvalidVersionFault,
                                                             com.tibco.n2.brm.services.InternalServiceFault,
                                                             com.tibco.n2.brm.services.SecurityFault

      Unallocates a list of work items. Work item must be in an allocated state before it can be unallocated.
      Parameters:
        `workItemIds` - an array of managed work item objects
      Returns:
        returns array of work item objects
      Throws:
        `java.lang.RuntimeException`
        `com.tibco.n2.brm.services.InvalidEntityFault`
        `com.tibco.n2.brm.services.InvalidWorkItemFault`
        `com.tibco.n2.brm.services.InvalidVersionFault`
        `com.tibco.n2.brm.services.InternalServiceFault`
        `com.tibco.n2.brm.services.SecurityFault`

    - #### allocateWorkItem

          com.tibco.n2.brm.api.WorkItem[] allocateWorkItem(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds,
                                                           java.lang.String[] resources)
                                                    throws com.tibco.n2.brm.services.InvalidWorkItemFault,
                                                           com.tibco.n2.brm.services.InvalidEntityFault,
                                                           com.tibco.n2.brm.services.InvalidVersionFault,
                                                           com.tibco.n2.brm.services.InternalServiceFault,
                                                           com.tibco.n2.brm.services.SecurityFault

      Allocates a list of work items

      Parameters:
        `workItemIds` - array of work item objects
        `resources` - array of resources
      Returns:
        returns an array of work item objects
      Throws:
        `java.lang.RuntimeException`
        `com.tibco.n2.brm.services.InvalidWorkItemFault`
        `com.tibco.n2.brm.services.InvalidEntityFault`
        `com.tibco.n2.brm.services.InvalidVersionFault`
        `com.tibco.n2.brm.services.InternalServiceFault`
        `com.tibco.n2.brm.services.SecurityFault`

    - #### allocateAndOpenWorkItem

          com.tibco.n2.brm.api.WorkItem[] allocateAndOpenWorkItem(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds,
                                                                  java.lang.String[] resources)
                                                           throws com.tibco.n2.brm.services.InvalidWorkItemFault,
                                                                  com.tibco.n2.brm.services.WorkItemFault,
                                                                  com.tibco.n2.brm.services.InvalidEntityFault,
                                                                  com.tibco.n2.brm.services.InvalidVersionFault,
                                                                  com.tibco.n2.brm.services.InternalServiceFault,
                                                                  com.tibco.n2.brm.services.OpenWorkItemLimitFault,
                                                                  com.tibco.n2.brm.services.WorkItemAPIScriptCancelFault,
                                                                  com.tibco.n2.brm.services.SecurityFault

      Allocates and opens a list of work items

      Parameters:
        `workItemIds` - array of work item objects
        `resources` - array of resources
      Returns:
        returns an array of work item objects
      Throws:
        `java.lang.RuntimeException`
        `com.tibco.n2.brm.services.InvalidWorkItemFault`
        `com.tibco.n2.brm.services.WorkItemFault`
        `com.tibco.n2.brm.services.InvalidEntityFault`
        `com.tibco.n2.brm.services.InvalidVersionFault`
        `com.tibco.n2.brm.services.InternalServiceFault`
        `com.tibco.n2.brm.services.OpenWorkItemLimitFault`
        `com.tibco.n2.brm.services.WorkItemAPIScriptCancelFault`
        `com.tibco.n2.brm.services.SecurityFault`

    - #### allocateAndOpenNextWorkItem

          com.tibco.n2.brm.api.WorkItem allocateAndOpenNextWorkItem(java.lang.String resourceId)
                                                             throws com.tibco.n2.brm.services.NoMoreWorkItemsFault,
                                                                    com.tibco.n2.brm.services.WorkItemFault,
                                                                    com.tibco.n2.brm.services.InvalidEntityFault,
                                                                    com.tibco.n2.brm.services.InternalServiceFault,
                                                                    com.tibco.n2.brm.services.OpenWorkItemLimitFault,
                                                                    com.tibco.n2.brm.services.WorkItemAPIScriptCancelFault,
                                                                    com.tibco.n2.brm.services.SecurityFault

      Allocates and opens the next work item

      Parameters:
        `resourceId` - resource id
      Returns:
        returns a work item object
      Throws:
        `java.lang.RuntimeException`
        `com.tibco.n2.brm.services.NoMoreWorkItemsFault`
        `com.tibco.n2.brm.services.WorkItemFault`
        `com.tibco.n2.brm.services.InvalidEntityFault`
        `com.tibco.n2.brm.services.InternalServiceFault`
        `com.tibco.n2.brm.services.OpenWorkItemLimitFault`
        `com.tibco.n2.brm.services.WorkItemAPIScriptCancelFault`
        `com.tibco.n2.brm.services.SecurityFault`

    - #### completeWorkItem

          com.tibco.n2.brm.api.CompleteWorkItemResponseDocument.CompleteWorkItemResponse completeWorkItem(com.tibco.n2.brm.api.ManagedObjectID workItemId,
                                                                                                          com.tibco.n2.brm.api.WorkItemBody workItemPayload,
                                                                                                          boolean getNextPiledItem)
                                                                                                   throws com.tibco.n2.brm.services.InvalidWorkItemFault,
                                                                                                          com.tibco.n2.brm.services.WorkItemFault,
                                                                                                          com.tibco.n2.brm.services.InvalidVersionFault,
                                                                                                          com.tibco.n2.brm.services.InternalServiceFault,
                                                                                                          com.tibco.n2.brm.services.WorkItemAPIScriptCancelFault,
                                                                                                          com.tibco.n2.brm.services.SecurityFault

      Allocates and opens the next work item

      Parameters:
        `ManagedObjectID` - workItemID
        `WorkItemBody` - workItemPayload
        `boolean` - getNextPiledItem
      Returns:
        returns a complete work item response object
      Throws:
        `java.lang.RuntimeException`
        `com.tibco.n2.brm.services.InvalidWorkItemFault`
        `com.tibco.n2.brm.services.WorkItemFault`
        `com.tibco.n2.brm.services.InvalidVersionFault`
        `com.tibco.n2.brm.services.InternalServiceFault`
        `com.tibco.n2.brm.services.WorkItemAPIScriptCancelFault`
        `com.tibco.n2.brm.services.SecurityFault`

    - #### openWorkItem

          com.tibco.n2.brm.api.WorkItemBody[] openWorkItem(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds)
                                                    throws com.tibco.n2.brm.services.InvalidWorkItemFault,
                                                           com.tibco.n2.brm.services.WorkItemFault,
                                                           com.tibco.n2.brm.services.InvalidVersionFault,
                                                           com.tibco.n2.brm.services.InternalServiceFault,
                                                           com.tibco.n2.brm.services.OpenWorkItemLimitFault,
                                                           com.tibco.n2.brm.services.WorkItemAPIScriptCancelFault,
                                                           com.tibco.n2.brm.services.SecurityFault

      Opens a work item

      Parameters:
        `workItemIds` - array of managed work item objects
      Returns:
        returns an array of work item body objects
      Throws:
        `java.lang.RuntimeException`
        `com.tibco.n2.brm.services.InvalidWorkItemFault`
        `com.tibco.n2.brm.services.WorkItemFault`
        `com.tibco.n2.brm.services.InvalidVersionFault`
        `com.tibco.n2.brm.services.InternalServiceFault`
        `com.tibco.n2.brm.services.OpenWorkItemLimitFault`
        `com.tibco.n2.brm.services.WorkItemAPIScriptCancelFault`
        `com.tibco.n2.brm.services.SecurityFault`

    - #### saveOpenWorkItem

          com.tibco.n2.brm.api.ManagedObjectID saveOpenWorkItem(com.tibco.n2.brm.api.ManagedObjectID workItemId,
                                                                com.tibco.n2.brm.api.WorkItemBody payload)
                                                         throws com.tibco.n2.brm.services.InvalidWorkItemFault,
                                                                com.tibco.n2.brm.services.WorkItemFault,
                                                                com.tibco.n2.brm.services.InternalServiceFault,
                                                                com.tibco.n2.brm.services.InvalidVersionFault

      Saves an open work item

      Parameters:
        `workItemId` - work item id
        `workItemPayload` - payload for the work item
      Returns:
        returns a work item body object
      Throws:
        `java.lang.RuntimeException`
        `com.tibco.n2.brm.services.InvalidWorkItemFault`
        `com.tibco.n2.brm.services.WorkItemFault`
        `com.tibco.n2.brm.services.InternalServiceFault`
        `com.tibco.n2.brm.services.InvalidVersionFault`

    - #### getWorkItemHeader

          com.tibco.n2.brm.api.WorkItemHeader[] getWorkItemHeader(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds)
                                                           throws com.tibco.n2.brm.services.InvalidWorkItemFault,
                                                                  com.tibco.n2.brm.services.InvalidVersionFault,
                                                                  com.tibco.n2.brm.services.InternalServiceFault

      Gets a list of work item headers for the supplied list of work item objects.
      Parameters:
        `workItemIds` - array of managed work item objects
      Returns:
        returns an array of work item header objects
      Throws:
        `java.lang.RuntimeException`
        `com.tibco.n2.brm.services.InvalidWorkItemFault`
        `com.tibco.n2.brm.services.InvalidVersionFault`
        `com.tibco.n2.brm.services.InternalServiceFault`

    - #### skipWorkItem

          boolean skipWorkItem(com.tibco.n2.brm.api.ManagedObjectID[] workItemIds)
                        throws com.tibco.n2.brm.services.InvalidWorkItemFault,
                               com.tibco.n2.brm.services.WorkItemFault,
                               com.tibco.n2.brm.services.InvalidVersionFault,
                               com.tibco.n2.brm.services.InternalServiceFault,
                               com.tibco.n2.brm.services.SecurityFault

      Skips the supplied list of managed work item objects.
      Parameters:
        `workItemIds` -
      Returns:
      Throws:
        `java.lang.RuntimeException`
        `com.tibco.n2.brm.services.InvalidWorkItemFault`
        `com.tibco.n2.brm.services.WorkItemFault`
        `com.tibco.n2.brm.services.InvalidVersionFault`
        `com.tibco.n2.brm.services.InternalServiceFault`
        `com.tibco.n2.brm.services.SecurityFault`

    - #### setWorkItemPriority

          com.tibco.n2.brm.api.ManagedObjectID[] setWorkItemPriority(com.tibco.n2.brm.api.SetWorkItemPriority.WorkItemIDandPriority[] workItemPriorities)
                                                              throws com.tibco.n2.brm.services.InvalidWorkItemFault,
                                                                     com.tibco.n2.brm.services.WorkItemFault,
                                                                     com.tibco.n2.brm.services.InvalidVersionFault,
                                                                     com.tibco.n2.brm.services.InternalServiceFault,
                                                                     com.tibco.n2.brm.services.SecurityFault

      Closes a list of work items.
      Parameters:
        `workItemId` - an array of managed work item id to unlock
      Returns:
        returns an array of work item managed objects throws RuntimeException
      Throws:
        `com.tibco.n2.brm.services.InvalidWorkItemFault`
        `com.tibco.n2.brm.services.WorkItemFault`
        `com.tibco.n2.brm.services.InvalidVersionFault`
        `com.tibco.n2.brm.services.InternalServiceFault`
        `com.tibco.n2.brm.services.SecurityFault`

Copyright © 2018 TIBCO Software Inc. All Rights Reserved.