@DeclareRoles(value={"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"}) @RolesAllowed(value={"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"}) public class WorkflowService extends Object implements WorkflowManager, WorkflowContext
| Modifier and Type | Field and Description |
|---|---|
static String |
ACTIVITYID |
static String |
ISAUTHOR |
static String |
MODELVERSION |
static String |
PROCESSID |
static String |
READACCESS |
static int |
SORT_ORDER_CREATED_ASC |
static int |
SORT_ORDER_CREATED_DESC |
static int |
SORT_ORDER_MODIFIED_ASC |
static int |
SORT_ORDER_MODIFIED_DESC |
static String |
UNIQUEID |
static String |
UNIQUEIDREF |
static String |
WORKITEMID |
static String |
WRITEACCESS |
| Constructor and Description |
|---|
WorkflowService() |
| Modifier and Type | Method and Description |
|---|---|
DocumentService |
getDocumentService()
Returns an instance of the DocumentService EJB.
|
List<ItemCollection> |
getEvents(ItemCollection workitem)
This returns a list of workflow events assigned to a given workitem.
|
ModelManager |
getModelManager()
This Method returns the modelManager Instance.
|
PropertyService |
getPropertyService()
Returns an instance of the PropertyService EJB.
|
ReportService |
getReportService()
Returns an instance of the ReportService EJB.
|
javax.ejb.SessionContext |
getSessionContext()
Returns an instance of the EJB session context.
|
String |
getUserName()
Obtain the java.security.Principal that identifies the caller and returns
the name of this principal.
|
List<String> |
getUserNameList()
This method returns a list of user names, roles and application groups
the caller belongs to.
|
ItemCollection |
getWorkItem(String uniqueid)
This method loads a Workitem with the corresponding uniqueid.
|
List<ItemCollection> |
getWorkListByAuthor(String name,
String type,
int pageSize,
int pageIndex,
int sortorder)
Returns a collection of workItems belonging to a specified username.
|
List<ItemCollection> |
getWorkListByCreator(String name,
String type,
int pageSize,
int pageIndex,
int sortorder)
Returns a collection of workitems created by a specified user
(namCreator).
|
List<ItemCollection> |
getWorkListByGroup(String name,
String type,
int pageSize,
int pageIndex,
int sortorder) |
List<ItemCollection> |
getWorkListByOwner(String name,
String type,
int pageSize,
int pageIndex,
int sortorder)
Returns a collection of workitems containing a namOwner property
belonging to a specified username.
|
List<ItemCollection> |
getWorkListByProcessID(int aid,
String type,
int pageSize,
int pageIndex,
int sortorder)
Returns a collection of workitems belonging to a specified $processID
defined by the workflow model.
|
List<ItemCollection> |
getWorkListByRef(String aref)
Returns a collection of all workitems belonging to a specified workitem
identified by the attribute $UniqueIDRef.
|
List<ItemCollection> |
getWorkListByRef(String aref,
String type,
int pageSize,
int pageIndex,
int sortorder)
Returns a collection of workitems belonging to a specified workitem
identified by the attribute $UniqueIDRef.
|
List<ItemCollection> |
getWorkListByWriteAccess(String type,
int pageSize,
int pageIndex,
int sortorder)
Returns a collection of workitems where the current user has a
writeAccess.
|
boolean |
isUserInRole(String rolename)
Test if the caller has a given security role.
|
ItemCollection |
processWorkItem(ItemCollection workitem)
This method processes a workItem by the WorkflowKernel and saves the
workitem after the processing was finished successful.
|
void |
removeWorkItem(ItemCollection aworkitem) |
public static final String UNIQUEID
public static final String UNIQUEIDREF
public static final String READACCESS
public static final String WRITEACCESS
public static final String ISAUTHOR
public static final String WORKITEMID
public static final String PROCESSID
public static final String MODELVERSION
public static final String ACTIVITYID
public static final int SORT_ORDER_CREATED_DESC
public static final int SORT_ORDER_CREATED_ASC
public static final int SORT_ORDER_MODIFIED_DESC
public static final int SORT_ORDER_MODIFIED_ASC
public ItemCollection getWorkItem(String uniqueid)
getWorkItem in interface WorkflowManagerpublic List<ItemCollection> getWorkListByOwner(String name, String type, int pageSize, int pageIndex, int sortorder)
org.imixs.workflow.plugins.OwnerPluginname - = username for property namOwner - if null current username
will be usedstartpos - = optional start positioncount - = optional count - default = -1type - = defines the type property of the workitems to be returnd.
can be nullsortorder - = defines sortorder (SORT_ORDER_CREATED_DESC = 0
SORT_ORDER_CREATED_ASC = 1 SORT_ORDER_MODIFIED_DESC = 2
SORT_ORDER_MODIFIED_ASC = 3)public List<ItemCollection> getWorkListByAuthor(String name, String type, int pageSize, int pageIndex, int sortorder)
name - = username or role contained in $writeAccess - if null current
username will be usedstartpos - = optional start positioncount - = optional count - default = -1type - = defines the type property of the workitems to be returnd.
can be nullsortorder - = defines sortorder (SORT_ORDER_CREATED_DESC = 0
SORT_ORDER_CREATED_ASC = 1 SORT_ORDER_MODIFIED_DESC = 2
SORT_ORDER_MODIFIED_ASC = 3)public List<ItemCollection> getWorkListByCreator(String name, String type, int pageSize, int pageIndex, int sortorder)
name - = username for property namCreator - if null current username
will be usedstartpos - = optional start positioncount - = optional count - default = -1type - = defines the type property of the workitems to be returnd.
can be nullsortorder - = defines sortorder (SORT_ORDER_CREATED_DESC = 0
SORT_ORDER_CREATED_ASC = 1 SORT_ORDER_MODIFIED_DESC = 2
SORT_ORDER_MODIFIED_ASC = 3)public List<ItemCollection> getWorkListByWriteAccess(String type, int pageSize, int pageIndex, int sortorder)
startpos - = optional start positioncount - = optional count - default = -1type - = defines the type property of the workitems to be returnd.
can be nullsortorder - = defines sortorder (SORT_ORDER_CREATED_DESC = 0
SORT_ORDER_CREATED_ASC = 1 SORT_ORDER_MODIFIED_DESC = 2
SORT_ORDER_MODIFIED_ASC = 3)public List<ItemCollection> getWorkListByGroup(String name, String type, int pageSize, int pageIndex, int sortorder)
public List<ItemCollection> getWorkListByProcessID(int aid, String type, int pageSize, int pageIndex, int sortorder)
aID - = $ProcessID for the workitems to be returned.startpos - = optional start positioncount - = optional count - default = -1type - = defines the type property of the workitems to be returnd.
can be nullsortorder - = defines sortorder (SORT_ORDER_CREATED_DESC = 0
SORT_ORDER_CREATED_ASC = 1 SORT_ORDER_MODIFIED_DESC = 2
SORT_ORDER_MODIFIED_ASC = 3)public List<ItemCollection> getWorkListByRef(String aref, String type, int pageSize, int pageIndex, int sortorder)
aref - A unique reference to another workitem inside a database *startpos - = optional start positioncount - = optional count - default = -1type - = defines the type property of the workitems to be returnd.
can be nullsortorder - = defines sortorder (SORT_ORDER_CREATED_DESC = 0
SORT_ORDER_CREATED_ASC = 1 SORT_ORDER_MODIFIED_DESC = 2
SORT_ORDER_MODIFIED_ASC = 3)public List<ItemCollection> getWorkListByRef(String aref)
public List<ItemCollection> getEvents(ItemCollection workitem) throws ModelException
workitem - ModelExceptionimixs-bpmnpublic ItemCollection processWorkItem(ItemCollection workitem) throws AccessDeniedException, ProcessingErrorException, PluginException
processWorkItem in interface WorkflowManagerworkitem - - the workItem to be processedAccessDeniedException - - thrown if the user has insufficient access to update the
workItemProcessingErrorException - - thrown if the workitem could not be processed by the
workflowKernelPluginException - - thrown if processing by a plugin failspublic void removeWorkItem(ItemCollection aworkitem) throws AccessDeniedException
removeWorkItem in interface WorkflowManagerAccessDeniedExceptionpublic ModelManager getModelManager()
getModelManager in interface WorkflowContextpublic javax.ejb.SessionContext getSessionContext()
getSessionContext in interface WorkflowContextpublic DocumentService getDocumentService()
public ReportService getReportService()
public PropertyService getPropertyService()
public String getUserName()
public boolean isUserInRole(String rolename)
rolename - Copyright © 2006–2017 Imixs Software Solutions GmbH. All rights reserved.