org.imixs.workflow.jee.ejb
Interface WorkflowServiceRemote

All Known Implementing Classes:
WorkflowService

public interface WorkflowServiceRemote


Method Summary
 int getLogLevel()
          Workflow Context
 org.imixs.workflow.Model getModel()
          This Method returns the modelManager Instance.
 ModelService getModelService()
          This method returns an instance of the Imixs JEE ModelService used by the WorkflowManager Implementation.
 java.lang.String getUserName()
          Obtain the java.security.Principal that identifies the caller and returns the name of this principal.
 java.util.List<java.lang.String> getUserNameList()
          This method returns a list of user names, roles and application groups the caller belongs to.
 org.imixs.workflow.ItemCollection getWorkItem(java.lang.String uniqueid)
          This method loads a Workitem with the corresponding uniqueid
 java.util.Collection<org.imixs.workflow.ItemCollection> getWorkList()
           
 java.util.Collection<org.imixs.workflow.ItemCollection> getWorkList(int startpos, int count, java.lang.String type, int sortorder)
          Returns a collection of workItems belonging to current user.
 java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByAuthor(java.lang.String name)
          Returns the worklist by author for the current user
 java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByAuthor(java.lang.String name, int startpos, int count, java.lang.String type, int sortorder)
          Returns a collection of workItems belonging to a specified username.
 java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByCreator(java.lang.String name, int startpos, int count, java.lang.String type, int sortorder)
          Returns a collection of workitems created by a specified user (namCreator).
 java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByGroup(java.lang.String name, int startpos, int count, java.lang.String type, int sortorder)
           
 java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByOwner(java.lang.String name, int startpos, int count, java.lang.String type, int sortorder)
          Returns a collection of workitems containing a namOwner property belonging to a specified username.
 java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByProcessID(int aid, int startpos, int count, java.lang.String type, int sortorder)
          Returns a collection of workitems belonging to a specified $processID defined by the workflow model.
 java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByRef(java.lang.String aref)
          Returns a collection of workitems belonging to a specified workitem identified by the attribute $UniqueIDRef.
 java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByRef(java.lang.String aref, int startpos, int count, java.lang.String type, int sortorder)
          Returns a collection of workitems belonging to a specified workitem identified by the attribute $UniqueIDRef.
 java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByWriteAccess(int startpos, int count, java.lang.String type, int sortorder)
          Returns a collection of workitems where the current user has a writeAccess.
 boolean isUserInRole(java.lang.String rolename)
          Test if the caller has a given security role.
 org.imixs.workflow.ItemCollection processWorkItem(org.imixs.workflow.ItemCollection workitem)
          processes a workItem.
 void removeWorkItem(org.imixs.workflow.ItemCollection aworkitem)
           
 

Method Detail

getWorkItem

org.imixs.workflow.ItemCollection getWorkItem(java.lang.String uniqueid)
This method loads a Workitem with the corresponding uniqueid


getWorkList

java.util.Collection<org.imixs.workflow.ItemCollection> getWorkList(int startpos,
                                                                    int count,
                                                                    java.lang.String type,
                                                                    int sortorder)
Returns a collection of workItems belonging to current user. The method returns only workitems where the current user has read access.

Parameters:
startpos - = optional start position
count - = optional count - default = -1
type - = defines the type property of the workitems to be returnd. can be null
sortorder - = defines sortorder (SORT_ORDER_CREATED_DESC = 0 SORT_ORDER_CREATED_ASC = 1 SORT_ORDER_MODIFIED_DESC = 2 SORT_ORDER_MODIFIED_ASC = 3)
Returns:
List of workitems

getWorkList

java.util.Collection<org.imixs.workflow.ItemCollection> getWorkList()

getWorkListByAuthor

java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByAuthor(java.lang.String name,
                                                                            int startpos,
                                                                            int count,
                                                                            java.lang.String type,
                                                                            int sortorder)
Returns a collection of workItems belonging to a specified username. The name is a username or role contained in the $WriteAccess attribute of the workItem. The method returns only workitems the call has sufficient read access for.

Parameters:
name - = username or role contained in $writeAccess - if null current username will be used
startpos - = optional start position
count - = optional count - default = -1
type - = defines the type property of the workitems to be returnd. can be null
sortorder - = defines sortorder (SORT_ORDER_CREATED_DESC = 0 SORT_ORDER_CREATED_ASC = 1 SORT_ORDER_MODIFIED_DESC = 2 SORT_ORDER_MODIFIED_ASC = 3)
Returns:
List of workitems

getWorkListByAuthor

java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByAuthor(java.lang.String name)
Returns the worklist by author for the current user

Parameters:
name -
Returns:

getWorkListByCreator

java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByCreator(java.lang.String name,
                                                                             int startpos,
                                                                             int count,
                                                                             java.lang.String type,
                                                                             int sortorder)
Returns a collection of workitems created by a specified user (namCreator). The behaivor is simmilar to the method getWorkList.

Parameters:
name - = username for property namCreator - if null current username will be used
startpos - = optional start position
count - = optional count - default = -1
type - = defines the type property of the workitems to be returnd. can be null
sortorder - = defines sortorder (SORT_ORDER_CREATED_DESC = 0 SORT_ORDER_CREATED_ASC = 1 SORT_ORDER_MODIFIED_DESC = 2 SORT_ORDER_MODIFIED_ASC = 3)
Returns:
List of workitems

getWorkListByOwner

java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByOwner(java.lang.String name,
                                                                           int startpos,
                                                                           int count,
                                                                           java.lang.String type,
                                                                           int sortorder)
Returns a collection of workitems containing a namOwner property belonging to a specified username. The namOwner property is typical controled by the OwnerPlugin

Parameters:
name - = username for property namOwner - if null current username will be used
startpos - = optional start position
count - = optional count - default = -1
type - = defines the type property of the workitems to be returnd. can be null
sortorder - = defines sortorder (SORT_ORDER_CREATED_DESC = 0 SORT_ORDER_CREATED_ASC = 1 SORT_ORDER_MODIFIED_DESC = 2 SORT_ORDER_MODIFIED_ASC = 3)
Returns:
List of workitems

getWorkListByWriteAccess

java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByWriteAccess(int startpos,
                                                                                 int count,
                                                                                 java.lang.String type,
                                                                                 int sortorder)
Returns a collection of workitems where the current user has a writeAccess. This means the either the username or one of the userroles is contained in the $writeaccess property

Parameters:
startpos - = optional start position
count - = optional count - default = -1
type - = defines the type property of the workitems to be returnd. can be null
sortorder - = defines sortorder (SORT_ORDER_CREATED_DESC = 0 SORT_ORDER_CREATED_ASC = 1 SORT_ORDER_MODIFIED_DESC = 2 SORT_ORDER_MODIFIED_ASC = 3)
Returns:
List of workitems

getWorkListByGroup

java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByGroup(java.lang.String name,
                                                                           int startpos,
                                                                           int count,
                                                                           java.lang.String type,
                                                                           int sortorder)

getWorkListByProcessID

java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByProcessID(int aid,
                                                                               int startpos,
                                                                               int count,
                                                                               java.lang.String type,
                                                                               int sortorder)
Returns a collection of workitems belonging to a specified $processID defined by the workflow model. The behaivor is simmilar to the method getWorkList.

Parameters:
aID - = $ProcessID for the workitems to be returned.
startpos - = optional start position
count - = optional count - default = -1
type - = defines the type property of the workitems to be returnd. can be null
sortorder - = defines sortorder (SORT_ORDER_CREATED_DESC = 0 SORT_ORDER_CREATED_ASC = 1 SORT_ORDER_MODIFIED_DESC = 2 SORT_ORDER_MODIFIED_ASC = 3)
Returns:
List of workitems

getWorkListByRef

java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByRef(java.lang.String aref)
Returns a collection of workitems belonging to a specified workitem identified by the attribute $UniqueIDRef. The behaivor of this Mehtod is simmilar to the method getWorkList.

Parameters:
aref - A unique reference to another workitem inside a database *
startpos - = optional start position
count - = optional count - default = -1
type - = defines the type property of the workitems to be returnd. can be null
sortorder - = defines sortorder (SORT_ORDER_CREATED_DESC = 0 SORT_ORDER_CREATED_ASC = 1 SORT_ORDER_MODIFIED_DESC = 2 SORT_ORDER_MODIFIED_ASC = 3)
Returns:
List of workitems

getWorkListByRef

java.util.Collection<org.imixs.workflow.ItemCollection> getWorkListByRef(java.lang.String aref,
                                                                         int startpos,
                                                                         int count,
                                                                         java.lang.String type,
                                                                         int sortorder)
Returns a collection of workitems belonging to a specified workitem identified by the attribute $UniqueIDRef. The behaivor of this Mehtod is simmilar to the method getWorkList.

Parameters:
aref - A unique reference to another workitem inside a database *
startpos - = optional start position
count - = optional count - default = -1
type - = defines the type property of the workitems to be returnd. can be null
sortorder - = defines sortorder (SORT_ORDER_CREATED_DESC = 0 SORT_ORDER_CREATED_ASC = 1 SORT_ORDER_MODIFIED_DESC = 2 SORT_ORDER_MODIFIED_ASC = 3)
Returns:
List of workitems

processWorkItem

org.imixs.workflow.ItemCollection processWorkItem(org.imixs.workflow.ItemCollection workitem)
                                                  throws org.imixs.workflow.exceptions.AccessDeniedException,
                                                         org.imixs.workflow.exceptions.ProcessingErrorException
processes a workItem. The workitem have to provide the properties '$modelversion', '$processid' and '$activityid' The method try to load the current instance of the given workitem and compares the property $processID. If it is not equal the method throws an ProcessingErrorException.

Parameters:
workitem - - the workItem to be processed
Returns:
updated version of the processed workItem
Throws:
InvalidItemValueException - if $modelVersion did not exists or the workItem has an invalid status
org.imixs.workflow.exceptions.AccessDeniedException - if call has no write access for the given workItem
org.imixs.workflow.exceptions.ProcessingErrorException - if processing by a plugin fails

removeWorkItem

void removeWorkItem(org.imixs.workflow.ItemCollection aworkitem)
                    throws org.imixs.workflow.exceptions.AccessDeniedException
Throws:
org.imixs.workflow.exceptions.AccessDeniedException

getLogLevel

int getLogLevel()
Workflow Context


getModel

org.imixs.workflow.Model getModel()
This Method returns the modelManager Instance. The current ModelVersion is automatically updated during the Method updateProfileEntity which is called from the processWorktiem method.


getModelService

ModelService getModelService()
This method returns an instance of the Imixs JEE ModelService used by the WorkflowManager Implementation. The method can be used to access the ModelService during a Plugin call.

Returns:
EntityService
Throws:
java.lang.Exception

getUserName

java.lang.String getUserName()
Obtain the java.security.Principal that identifies the caller and returns the name of this principal.

Returns:
the user name

isUserInRole

boolean isUserInRole(java.lang.String rolename)
Test if the caller has a given security role.

Parameters:
rolename -
Returns:
true if user is in role

getUserNameList

java.util.List<java.lang.String> getUserNameList()
This method returns a list of user names, roles and application groups the caller belongs to.

Returns:


Copyright © 2006-2012 Imixs Software Solutions GmbH. All Rights Reserved.