Class WorkitemService

java.lang.Object
org.imixs.workflow.office.forms.WorkitemService
Direct Known Subclasses:
SystemWorkitemService

@DeclareRoles({"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"}) @RolesAllowed({"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"}) public class WorkitemService extends Object
The WorkitemService provides methods to create, process, update and remove a workItem. The service can be used to all types of workitems (e.g. workitem, process, space)
Author:
rsoika
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.imixs.workflow.ItemCollection
    createWorkItem(org.imixs.workflow.ItemCollection parent, String sProcessModelVersion, int aProcessID)
    This method creates a new workItem.
    List<org.imixs.workflow.ItemCollection>
    findAllVersions(org.imixs.workflow.ItemCollection workitem)
    This method finds all versions of a given workitem.
    List<org.imixs.workflow.ItemCollection>
    findAncestorsVersions(org.imixs.workflow.ItemCollection workitem)
    This method finds all ancestors versions to a given workitem.
    org.imixs.workflow.ItemCollection
    processWorkItem(org.imixs.workflow.ItemCollection aworkitem)
    Processes a WorkItem.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WorkitemService

      public WorkitemService()
  • Method Details

    • createWorkItem

      public org.imixs.workflow.ItemCollection createWorkItem(org.imixs.workflow.ItemCollection parent, String sProcessModelVersion, int aProcessID) throws Exception
      This method creates a new workItem. The workItem becomes a response object to the provided parent ItemCollection. The workItem will also be assigned to the ProcessEntity specified by the provided modelVersion and ProcessID. The method throws an exception if the ProcessEntity did not exist in the model. The Method set the property '$WriteAccess' to the default value of the current Principal name. This allows initial updates of BlobWorkitems The Attributes txtWorkflowEditor, numProcessID, $modelVersion and txtWrofklwoGroup will be set to the corresponding values of processEntity
      Parameters:
      parent - ItemCollection representing the parent where the workItem is assigned to. This is typical a project entity but can also be an other workItem
      processEntity - ItemCollection representing the ProcessEntity where the workItem is assigned to
      Throws:
      Exception
    • processWorkItem

      public org.imixs.workflow.ItemCollection processWorkItem(org.imixs.workflow.ItemCollection aworkitem) throws org.imixs.workflow.exceptions.AccessDeniedException, org.imixs.workflow.exceptions.ProcessingErrorException, org.imixs.workflow.exceptions.PluginException, org.imixs.workflow.exceptions.ModelException
      Processes a WorkItem.
      Throws:
      org.imixs.workflow.exceptions.ProcessingErrorException
      org.imixs.workflow.exceptions.AccessDeniedException
      org.imixs.workflow.exceptions.PluginException
      org.imixs.workflow.exceptions.ModelException
    • findAllVersions

      public List<org.imixs.workflow.ItemCollection> findAllVersions(org.imixs.workflow.ItemCollection workitem)
      This method finds all versions of a given workitem.
    • findAncestorsVersions

      public List<org.imixs.workflow.ItemCollection> findAncestorsVersions(org.imixs.workflow.ItemCollection workitem)
      This method finds all ancestors versions to a given workitem. The method open versions recursive back to the first source workitem. The method returns an empty list if no version exist (only the main version)