Interface IWorkflowContext
-
- All Superinterfaces:
org.eclipse.core.runtime.IAdaptable
public interface IWorkflowContext extends org.eclipse.core.runtime.IAdaptable
The workflow context gives you access to all tasks and cases of all users of an application. There is a workflow context for each application and vice versa.- Since:
- 17.05.2006
- API:
- This is a public API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description IPropertyFilter<CaseProperty>
createCasePropertyFilter(CaseProperty property, RelationalOperator operator, Object value)
Creates a case property filter.IPropertyFilter<IntermediateEventProperty>
createIntermediateEventPropertyFilter(IntermediateEventProperty property, RelationalOperator operator, Object value)
Creates an intermediate event property filter.IPropertyFilter<TaskProperty>
createTaskPropertyFilter(TaskProperty property, RelationalOperator operator, Object value)
Creates a task property filter.IPropertyFilter<WorkflowEventProperty>
createWorkflowEventPropertyFilter(WorkflowEventProperty property, RelationalOperator operator, Object value)
Creates a workflow event property filter.void
deleteCompletedCase(ICase completedCase)
Deletes the given completed case and all belonging objects (tasks, workflow events, notes, process data etc.).IDocumentService
documents()
Returns a service for managing documents of this workflow context.ICase
findCase(long caseIdentifier)
Finds a case by its ID.List<IGroup<ICase>>
findCaseCategories(IPropertyFilter<CaseProperty> categoryFilter, CaseProperty categoryProperty, OrderDirection categoryPropertyOrder)
Deprecated.useCategoryTree.createFor(CaseQuery)
insteadIQueryResult<ICase>
findCases(IPropertyFilter<CaseProperty> filter, List<PropertyOrder<CaseProperty>> order, int startIndex, int count, boolean returnAllCount)
Find cases using a filterIQueryResult<ICase>
findCases(String propertyName, String propertyValue, int startIndex, int count, boolean returnAllCount)
Deprecated.use
insteadCaseQuery
.create().where().customField()
.textField(propertyName)
.isLike(propertyValue).executor().results(startIndex, count)IQueryResult<IIntermediateEvent>
findIntermediateEvents(IPropertyFilter<IntermediateEventProperty> filter, List<PropertyOrder<IntermediateEventProperty>> order, int startIndex, int count, boolean returnAllCount)
Finds intermediate eventsSet<IProcessStart>
findProcessStartsBySignature(String signature)
Finds all process starts that have the given signature.ITask
findTask(long taskIdentifier)
Finds a task by its ID.List<IGroup<ITask>>
findTaskCategories(IPropertyFilter<TaskProperty> categoryFilter, TaskProperty categoryProperty, OrderDirection categoryPropertyOrder)
Deprecated.useCategoryTree.createFor(TaskQuery)
insteadIQueryResult<ITask>
findTasks(IPropertyFilter<TaskProperty> filter, List<PropertyOrder<TaskProperty>> order, int startIndex, int count, boolean returnAllCount)
Find tasks using a filter.IQueryResult<ITask>
findTasks(String propertyName, String propertyValue, int startIndex, int count, boolean returnAllCount)
Deprecated.use
insteadTaskQuery
.create().where().customField()
.textField(propertyName)
.isLike(propertyValue).executor().results(startIndex, count)IQueryResult<IWorkflowEvent>
findWorkflowEvents(IPropertyFilter<WorkflowEventProperty> filter, List<PropertyOrder<WorkflowEventProperty>> order, int startIndex, int count, boolean returnAllCount)
Finds workflow events.IQueryResult<ITask>
findWorkTasks(IUser user, int startIndex, int count)
Finds tasks that a given user can work on (currently working or can start).IQueryResult<ITask>
findWorkTasks(IUser user, IPropertyFilter<TaskProperty> filter, List<PropertyOrder<TaskProperty>> order, int startIndex, int count, boolean returnAllCount, EnumSet<TaskState> includeTaskStates)
Finds tasks that a given user can work on (currently working or can start).IIntermediateEvent
fireIntermediateEvent(IIntermediateEventElement intermediateEventElement, String eventIdentifier, Object resultObject, String additionalInformation)
Fires an intermediate event.ICaseQueryExecutor
getCaseQueryExecutor()
Executor forcase queries
on this application.IGlobalWorkflowContext
getGlobalContext()
int
getRunningCasesCount(IApplication app)
Gets the number of running cases of a application.int
getRunningCasesCount(IProcessModelVersion processModelVersion)
Gets the number of running cases of a process model version.ISecurityContext
getSecurityContext()
Gets the security context that is responsible for the security of the application this workflow context belongs to.List<IProcessStart>
getStartableProcessStarts(IUser user)
Returns all process start elements which the given user can start.List<IWebStartable>
getStartables(IUser user)
Returns all startables which the given user can start.ITaskQueryExecutor
getTaskQueryExecutor()
Executor fortask queries
on this application.IWorkflowSession
getWorkflowSession(ISession session)
Gets the workflow session that belongs to the given security session.IBpmSignalService
signals()
A service for sending and querying signals.
-
-
-
Method Detail
-
getSecurityContext
ISecurityContext getSecurityContext()
Gets the security context that is responsible for the security of the application this workflow context belongs to.- Returns:
- the security context
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
createCasePropertyFilter
IPropertyFilter<CaseProperty> createCasePropertyFilter(CaseProperty property, RelationalOperator operator, Object value)
Creates a case property filter.
Case property filters can be used to filter cases in the findCase methods like
findCases(IPropertyFilter, List, int, int, boolean)
Example:
IPropertyFilter
filterName = ivy.wf.createCasePropertyFilter(CaseProperty.NAME, RelationalOperator.LIKE, "W%"));
IPropertyFilterfilterPriority = ivy.wf.createCasePropertyFilter(CaseProperty.PRIORITY, RelationalOperator.EQUAL, WorkflowPriority.NORMAL.intValue());
IPropertyFilterfilter = filterName.and(filterPriority); - Parameters:
property
- the case property to filter withoperator
- the filter operatorvalue
- the value to filter for. Can be null. Must respect the type of the property. I.e. the name property should have a String value.- Returns:
- case property filter
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
createTaskPropertyFilter
IPropertyFilter<TaskProperty> createTaskPropertyFilter(TaskProperty property, RelationalOperator operator, Object value)
Creates a task property filter.
Task property filters can be used to filter tasks in the findTask methods like
findTasks(IPropertyFilter, List, int, int, boolean)
Example:
IPropertyFilter
filterName = ivy.wf.createTaskPropertyFilter(TaskProperty.NAME, RelationalOperator.LIKE, "W%")
IPropertyFilterfilterPriority = ivy.wf.createTaskPropertyFilter(TaskProperty.PRIORITY, RelationalOperator.EQUAL, WorkflowPriority.NORMAL.intValue());
IPropertyFilterfilter = filterName.and(filterPriority); - Parameters:
property
- the case property to filter withoperator
- the filter operatorvalue
- the value to filter for. Can be null. Must respect the type of the property. I.e. the name property should have a String value.- Returns:
- task property filter
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
createWorkflowEventPropertyFilter
IPropertyFilter<WorkflowEventProperty> createWorkflowEventPropertyFilter(WorkflowEventProperty property, RelationalOperator operator, Object value)
Creates a workflow event property filter.
Workflow Event property filters can be used to filter workflow events in the findWorkflowEvent methods like
findWorkflowEvents(IPropertyFilter, List, int, int, boolean)
Example:
IPropertyFilter
filterUserName = ivy.wf.createWorkflowEventPropertyFilter(WorkflowEventProperty.USER_NAME, RelationalOperator.LIKE, "W%"));
IPropertyFilterfilterCreateCase = ivy.wf.createWorkflowEventPropertyFilter(WorkflowEventProperty.EVENT_KIND, RelationalOperator.EQUAL, WorkflowEventKind.EVENT_CREATE_CASE.intValue());
IPropertyFilterfilter = filterUserName.and(filterCreateCase); - Parameters:
property
- the case property to filter withoperator
- the filter operatorvalue
- the value to filter for. Can be null. Must respect the type of the property. I.e. the username property should have a String value.- Returns:
- workflow event property filter
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
createIntermediateEventPropertyFilter
IPropertyFilter<IntermediateEventProperty> createIntermediateEventPropertyFilter(IntermediateEventProperty property, RelationalOperator operator, Object value)
Creates an intermediate event property filter.
Workflow Event property filters can be used to filter workflow events in the findWorkflowEvent methods like
findWorkflowEvents(IPropertyFilter, List, int, int, boolean)
Example:
IPropertyFilter
filterTimeout = ivy.wf.createIntermediateEventPropertyFilter(IntermediateEventProperty.TIMEOUT_ACTION, RelationalOperator.EQUAL, IntermediateEventTimeoutAction.NOTHING.intValue()); IPropertyFilter filterWaiting = ivy.wf.createIntermediateEventPropertyFilter(IntermediateEventProperty.STATE, RelationalOperator.EQUAL, IntermediateEventState.WAITING.intValue()); IPropertyFilter filter = filterTimeout.or(filterWaiting); - Parameters:
property
- the intermediate event property to filter withoperator
- the filter operatorvalue
- the value to filter for. Can be null. Must respect the type of the property. I.e. the taskId property should be an integer value.- Returns:
- intermediate event property filter
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
findCase
ICase findCase(long caseIdentifier)
Finds a case by its ID.- Parameters:
caseIdentifier
- the case identifier- Returns:
- the case or null if case is not found
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS CaseRead PERMISSION OR OWNS CaseRead@SYSTEM PERMISSION
-
findCases
@Deprecated IQueryResult<ICase> findCases(String propertyName, String propertyValue, int startIndex, int count, boolean returnAllCount)
Deprecated.use
insteadCaseQuery
.create().where().customField()
.textField(propertyName)
.isLike(propertyValue).executor().results(startIndex, count)Finds all cases which have an additional property with the given name and value.Consider to use the
CaseQuery
API alternatively. This fluent API makes the statement combinable with other filters and allows SQL-like value comparisons. E.g:CaseQuery query = CaseQuery.create() .where().additionalProperty("myPropertyName").isLike("myValue"); List<ICase> cases = ivy.wf.getCaseQueryExecutor().getResults(query, startIndex, count);
- Parameters:
propertyName
- the additional property name.propertyValue
- the additional property valuestartIndex
- the index of the first case of all cases found returned. Must be >= 0.count
- how many cases found are returned. Must be >= 0 or -1 which means return all.returnAllCount
- if true the query result methodIQueryResult.getAllCount()
returns the overall cases that have been found, if false it returns -1- Returns:
query result
with all founded cases- Throws:
PersistencyException
- if persistency access fails- See Also:
IAdditionalPropertyable.setAdditionalProperty(String, String)
,IAdditionalPropertyable.getAdditionalProperty(String)
,CaseQuery
,getCaseQueryExecutor()
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS CaseReadAll PERMISSION OR OWNS CaseReadAll@SYSTEM PERMISSION
-
findCases
IQueryResult<ICase> findCases(IPropertyFilter<CaseProperty> filter, List<PropertyOrder<CaseProperty>> order, int startIndex, int count, boolean returnAllCount)
Find cases using a filter
The filter can be created with the method
createCasePropertyFilter(CaseProperty, RelationalOperator, Object)
.
The order can be created with the methodPropertyOrder.create(IProperty, OrderDirection)
.Example:
import ch.ivyteam.ivy.persistence.OrderDirection;
import ch.ivyteam.ivy.workflow.PropertyOrder;
import ch.ivyteam.ivy.workflow.IPropertyFilter;
import ch.ivyteam.ivy.persistence.IQueryResult;
import ch.ivyteam.ivy.workflow.CaseProperty;
import ch.ivyteam.logicalexpression.RelationalOperator;
// create order
List order = PropertyOrder.create(CaseProperty.PROCESS_CODE, CaseProperty.PROCESS_CATEGORY_CODE);
// create filter
IPropertyFilter filter = ivy.wf.createCasePropertyFilter(CaseProperty.PROCESS_CODE, RelationalOperator.EQUAL, "MY_PROCESS_CODE");
// execute query
IQueryResult result = ivy.wf.findCases(filter, order, 0, -1, true);Consider to use the
CaseQuery
API alternatively. This fluent API makes the statement combinable with other filters and allows SQL-like value comparisons. E.g:CaseQuery query = CaseQuery.create() .where().processCode().isEqual("MY_PROCESS_CODE") .orderBy().processCode().processCategoryCode(); List<ICase> cases = ivy.wf.getCaseQueryExecutor().getResults(query, startIndex, count);
- Parameters:
filter
- a filter expression to filter the cases. Can be null.order
- specifies how to order the result. Can be null.startIndex
- the index of the first case of all cases found returned. Must be >= 0count
- how many cases found are returned. Must be >= 0 or -1 which means return all.returnAllCount
- if true the query result methodIQueryResult.getAllCount()
returns the overall cases that have been found, if false it returns -1- Returns:
- a
query result
of the founded cases - Throws:
PersistencyException
- if persistency access fails- See Also:
createCasePropertyFilter(CaseProperty, RelationalOperator, Object)
,PropertyOrder.create(IProperty)
,PropertyOrder.create(IProperty...)
,PropertyOrder.create(IProperty, OrderDirection)
,PropertyOrder.create(IProperty, OrderDirection, IProperty, OrderDirection)
,PropertyOrder.create(IProperty, OrderDirection, IProperty, OrderDirection, IProperty, OrderDirection)
,CaseQuery
,getCaseQueryExecutor()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS CaseReadAll PERMISSION OR OWNS CaseReadAll@SYSTEM PERMISSION
-
getRunningCasesCount
int getRunningCasesCount(IProcessModelVersion processModelVersion)
Gets the number of running cases of a process model version.
A case is running if it is in state
CaseState.CREATED
orCaseState.RUNNING
.- Parameters:
processModelVersion
- the process model version to check- Returns:
- The number of running cases in the specified PMV
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
getRunningCasesCount
int getRunningCasesCount(IApplication app)
Gets the number of running cases of a application.
A case is running if it is in state
CaseState.CREATED
orCaseState.RUNNING
.- Parameters:
app
- the app to check- Returns:
- The number of running cases in the specified app
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
findTask
ITask findTask(long taskIdentifier)
Finds a task by its ID.- Parameters:
taskIdentifier
- the identifier of the task- Returns:
- the task or null if no task is found
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS TaskRead PERMISSION OR OWNS TaskRead@SYSTEM PERMISSION
-
findTasks
@Deprecated IQueryResult<ITask> findTasks(String propertyName, String propertyValue, int startIndex, int count, boolean returnAllCount)
Deprecated.use
insteadTaskQuery
.create().where().customField()
.textField(propertyName)
.isLike(propertyValue).executor().results(startIndex, count)Finds all tasks which have an additional property with the given name and value.
Consider to use the
TaskQuery
API alternatively. This fluent API makes the statement combinable with other filters and allows SQL-like value comparisons. E.g:TaskQuery query = TaskQuery.create() .where().additionalProperty("myPropertyName").isLike("myValue"); List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query, startIndex, count);
- Parameters:
propertyName
- the additional property namepropertyValue
- the additional property value.startIndex
- the index of the first task of all tasks found returned. Must be >= 0.count
- how many tasks found are returned. Must be >= 0 or -1 which means all.returnAllCount
- if true the query result methodIQueryResult.getAllCount()
returns the overall cases that have been found, if false it returns -1- Returns:
query result
with all found tasks- Throws:
PersistencyException
- if persistency access fails- See Also:
IAdditionalPropertyable.setAdditionalProperty(String, String)
,IAdditionalPropertyable.getAdditionalProperty(String)
,TaskQuery
,getTaskQueryExecutor()
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS TaskReadAll PERMISSION OR OWNS TaskReadAll@SYSTEM PERMISSION
-
findTasks
IQueryResult<ITask> findTasks(IPropertyFilter<TaskProperty> filter, List<PropertyOrder<TaskProperty>> order, int startIndex, int count, boolean returnAllCount)
Find tasks using a filter.
The filter can be created with the method
createTaskPropertyFilter(TaskProperty, RelationalOperator, Object)
.
The order can be created with the methodPropertyOrder.create(IProperty, OrderDirection)
.Example:
import ch.ivyteam.ivy.persistence.OrderDirection;
import ch.ivyteam.ivy.workflow.PropertyOrder;
import ch.ivyteam.ivy.workflow.IPropertyFilter;
import ch.ivyteam.ivy.persistence.IQueryResult;
import ch.ivyteam.ivy.workflow.TaskProperty;
import ch.ivyteam.logicalexpression.RelationalOperator;
// create order
List order = PropertyOrder.create(TaskProperty.TYPE_CODE, TaskProperty.SUB_TYPE_CODE);
// create filter
IPropertyFilter filter = ivy.wf.createTaskPropertyFilter(TaskProperty.TYPE_CODE, RelationalOperator.EQUAL, "MY_TYPE_CODE");
// execute query
IQueryResult result = ivy.wf.findTasks(filter, order, 0, -1, true);
Consider to use the
TaskQuery
API alternatively. This fluent API makes the statement combinable with other filters and allows SQL-like value comparisons. E.g:TaskQuery query = TaskQuery.create() .where().typeCode().isEqual("MY_TYPE_CODE") .orderBy().typeCode().subTypeCode(); List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query, startIndex, count);
- Parameters:
filter
- a filter expression to filter the tasks. Can be null.order
- how to order the result. Can be null.startIndex
- the index of the first task of all tasks found returned. Must be >= 0.count
- how many tasks found are returned. Must be >= 0 or -1 which means all.returnAllCount
- if true the query result methodIQueryResult.getAllCount()
returns the overall cases that have been found, if false it returns -1- Returns:
- a
query result
with the found tasks - Throws:
PersistencyException
- if persistency access fails- See Also:
createTaskPropertyFilter(TaskProperty, RelationalOperator, Object)
,PropertyOrder.create(IProperty)
,PropertyOrder.create(IProperty...)
,PropertyOrder.create(IProperty, OrderDirection)
,PropertyOrder.create(IProperty, OrderDirection, IProperty, OrderDirection)
,PropertyOrder.create(IProperty, OrderDirection, IProperty, OrderDirection, IProperty, OrderDirection)
,TaskQuery
,getTaskQueryExecutor()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS TaskReadAll PERMISSION OR OWNS TaskReadAll@SYSTEM PERMISSION
-
findWorkTasks
IQueryResult<ITask> findWorkTasks(IUser user, int startIndex, int count)
Finds tasks that a given user can work on (currently working or can start).
Note: if parameter
count
is specified, then this method does not provide the whole number of matching tasks onIQueryResult.getAllCount()
Consider to use the
TaskQuery
API alternatively. This fluent API makes the statement combinable with other filters and allows SQL-like value comparisons. E.g:TaskQuery query = TaskQuery.create() .where().canWorkOn(user); List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query, startIndex, count);
- Parameters:
user
- an ivy userstartIndex
- index of the first result that is returned (0..n, first entry is 0)count
- maximum number of results to return (-1 for all)- Returns:
- tasks that a user can work on (never null)
- Throws:
PersistencyException
- if persistency access fails- See Also:
findWorkTasks(IUser, IPropertyFilter, List, int, int, boolean, EnumSet)
,TaskQuery
,getTaskQueryExecutor()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS TaskReadAll PERMISSION OR OWNS TaskReadAll@SYSTEM PERMISSION
-
findWorkTasks
IQueryResult<ITask> findWorkTasks(IUser user, IPropertyFilter<TaskProperty> filter, List<PropertyOrder<TaskProperty>> order, int startIndex, int count, boolean returnAllCount, EnumSet<TaskState> includeTaskStates)
Finds tasks that a given user can work on (currently working or can start).
Task filter can be created with the method
createTaskPropertyFilter(TaskProperty, RelationalOperator, Object)
.Consider to use the
TaskQuery
API alternatively. This fluent API makes the statement combinable with other filters and allows SQL-like value comparisons. E.g:TaskQuery query = TaskQuery.create() .where().canWorkOn(user) .and().state().isEqual(TaskState.SUSPENDED);; List<ITask> tasks = ivy.wf.getTaskQueryExecutor().getResults(query, startIndex, count);
- Parameters:
user
- an ivy userfilter
- additional filter for tasks (can be null)order
- sorting order for results (ORDER BY)startIndex
- index of the first result that is returned (0..n, first entry is 0)count
- maximum number of results to returnreturnAllCount
- whether the overall result counter should be returned (consider performance effects), seeIQueryResult.getAllCount()
includeTaskStates
- only tasks with listed states will be included in result (cannot be null).- Returns:
- tasks that a user can work on (never null)
- Throws:
PersistencyException
- if persistency access fails- See Also:
findWorkTasks(IUser, int, int)
,TaskQuery
,getTaskQueryExecutor()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS TaskReadAll PERMISSION OR OWNS TaskReadAll@SYSTEM PERMISSION
-
findWorkflowEvents
IQueryResult<IWorkflowEvent> findWorkflowEvents(IPropertyFilter<WorkflowEventProperty> filter, List<PropertyOrder<WorkflowEventProperty>> order, int startIndex, int count, boolean returnAllCount)
Finds workflow events.
The filter can be created with the method
createWorkflowEventPropertyFilter(WorkflowEventProperty, RelationalOperator, Object)
.- Parameters:
filter
- Filter criteria to specify which workflow events should be read. Can be null.order
- how to order the result. Can be null.startIndex
- the index of the first task of all tasks found returned. Must be >= 0.count
- maximum number of workflow events to be returned. Must be >= 0 or -1 to return all.returnAllCount
- if true the query result methodIQueryResult.getAllCount()
returns the overall cases that have been found, if false it returns -1- Returns:
- a
query result
with the found workflow events - Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS WorkflowEventReadAll PERMISSION OR OWNS WorkflowEventReadAll@SYSTEM PERMISSION
-
findIntermediateEvents
IQueryResult<IIntermediateEvent> findIntermediateEvents(IPropertyFilter<IntermediateEventProperty> filter, List<PropertyOrder<IntermediateEventProperty>> order, int startIndex, int count, boolean returnAllCount)
Finds intermediate events
The filter can be created with the method
createIntermediateEventPropertyFilter(IntermediateEventProperty, RelationalOperator, Object)
.- Parameters:
filter
- Filter criteria to specify which intermediate events should be read. Can be null.order
- how to order the result. Can be null.startIndex
- the index of the first intermediate event of all intermediate events found returned. Must be >= 0.count
- how many intermediate events found are returned. Must be >= 0 or -1 which means allreturnAllCount
- if true the query result methodIQueryResult.getAllCount()
returns the overall intermediate events that have been found, if false it returns -1- Returns:
- a
query result
with the found intermediate events - Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS IntermediateEventReadAll PERMISSION OR OWNS IntermediateEventReadAll@SYSTEM PERMISSION
-
deleteCompletedCase
void deleteCompletedCase(ICase completedCase)
Deletes the given completed case and all belonging objects (tasks, workflow events, notes, process data etc.).
A completed case is a case that has the state
CaseState.DESTROYED
orCaseState.DONE
orCaseState.ZOMBIE
.This method can be used to clean up the database.
Warning: This method deletes the data of the given case permanently. It is not possible to restore the data afterwards.
- Parameters:
completedCase
- the case to delete permanently. Must not be null- Throws:
PersistencyException
- if persistency access failsIllegalStateException
- if the given case is not in stateCaseState.DESTROYED
orCaseState.DONE
orCaseState.ZOMBIE
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS CaseDelete PERMISSION OR OWNS CaseDelete@SYSTEM PERMISSION
-
getWorkflowSession
IWorkflowSession getWorkflowSession(ISession session)
Gets the workflow session that belongs to the given security session. The security session and the workflow session are two interfaces to the same object. With this method you can navigate from one interface to the other.
- Parameters:
session
- the security session- Returns:
- the workflow session that belongs to the given security session
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in Java.
-
findTaskCategories
@Deprecated List<IGroup<ITask>> findTaskCategories(IPropertyFilter<TaskProperty> categoryFilter, TaskProperty categoryProperty, OrderDirection categoryPropertyOrder)
Deprecated.useCategoryTree.createFor(TaskQuery)
insteadTasks can be categorized in a tree structure using the following task properties from top to bottom
TaskProperty.PROCESS_CATEGORY_CODE
,TaskProperty.PROCESS_CODE
,TaskProperty.TYPE_CODE
,TaskProperty.SUB_TYPE_CODE
,TaskProperty.KIND_CODE
.This method can be used to find the children of a node in the categorized tree structure. The top level tree nodes can be found using
TaskProperty.PROCESS_CATEGORY_CODE
as categoryProperty and null as categoryFilter. Children of a top level node can be found using the categoryFilter specifying the value of theTaskProperty.PROCESS_CATEGORY_CODE
of the node andTaskProperty.PROCESS_CODE
as categoryFilter. And so on until you are on the button of the tree usingTaskProperty.KIND_CODE
as categoryProperty. You may now use the methodfindTasks(IPropertyFilter, List, int, int, boolean)
to find all tasks that belong to the bottom groupEach category found is returned as a group. A group knows the number of objects contained in the group. Moreover, one example object of the group that represents all the entries in this group. It can be used to evaluate the category value of this group.
Consider to use the
TaskQuery
API alternatively. This fluent API makes the statement combinable with other filters and allows SQL-like value comparisons and grouping. E.g:TaskQuery query = TaskQuery.create() .where().processCategoryCode().isEqual("MY_CATEGORY_CODE") .groupBy().processCode() .aggregate().countRows(); Recordset rs = ivy.wf.getTaskQueryExecutor().getRecordset(query);
- Parameters:
categoryFilter
- filters the categories. Can be null.categoryProperty
- a task property that is used to build the categories (E.g. one ofTaskProperty.PROCESS_CATEGORY_CODE
,TaskProperty.PROCESS_CODE
,TaskProperty.TYPE_CODE
,TaskProperty.SUB_TYPE_CODE
,TaskProperty.KIND_CODE
)categoryPropertyOrder
- the order in which the categoryProperty should be ordered in. Can be null.- Returns:
- a list of the found
task categories
. - Throws:
PersistencyException
- if persistency access fails- See Also:
TaskQuery
,getTaskQueryExecutor()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS TaskCategoryReadAll PERMISSION OR OWNS TaskCategoryReadAll@SYSTEM PERMISSION
-
findCaseCategories
@Deprecated List<IGroup<ICase>> findCaseCategories(IPropertyFilter<CaseProperty> categoryFilter, CaseProperty categoryProperty, OrderDirection categoryPropertyOrder)
Deprecated.useCategoryTree.createFor(CaseQuery)
insteadCases can be categorized in a tree structure using the following case properties from top to bottom
CaseProperty.PROCESS_CATEGORY_CODE
,CaseProperty.PROCESS_CODE
,CaseProperty.TYPE_CODE
,CaseProperty.SUB_TYPE_CODE
.This method can be used to find the children of a node in the categorized tree structure. The top level tree nodes can be found using
CaseProperty.PROCESS_CATEGORY_CODE
as categoryProperty and null as categoryFilter. Children of a top level node can be found using the categoryFilter specifying the value of theCaseProperty.PROCESS_CATEGORY_CODE
of the node andCaseProperty.PROCESS_CODE
as categoryFilter. And so on until you are on the button of the tree usingCaseProperty.SUB_TYPE_CODE
as categoryProperty. You may now use the methodfindCases(IPropertyFilter, List, int, int, boolean)
to find all cases that belong to the bottom groupEach category found is returned as a group. A group knows the number of objects contained in the group. Moreover, one example object of the group that represents all the entries in this group. It can be used to evaluate the category value of this group.
Consider to use the
CaseQuery
API alternatively. This fluent API makes the statement combinable with other filters and allows SQL-like value comparisons and grouping. E.g:CaseQuery query = CaseQuery.create() .where().processCategoryCode().isEqual("MY_CATEGORY_CODE") .groupBy().processCode() .aggregate().countRows(); Recordset rs = ivy.wf.getCaseQueryExecutor().getRecordset(query);
- Parameters:
categoryFilter
- filters the categories. Can be null.categoryProperty
- a case property that is used to build the categories (E.g. one ofCaseProperty.PROCESS_CATEGORY_CODE
,CaseProperty.PROCESS_CODE
,CaseProperty.TYPE_CODE
,CaseProperty.SUB_TYPE_CODE
})categoryPropertyOrder
- the order in which categoryProperty should be ordered in. Can be null.- Returns:
- a list of the found
case categories
. - Throws:
PersistencyException
- if persistency access fails- See Also:
CaseQuery
,getCaseQueryExecutor()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS CaseCategoryReadAll PERMISSION OR OWNS CaseCategoryReadAll@SYSTEM PERMISSION
-
fireIntermediateEvent
IIntermediateEvent fireIntermediateEvent(IIntermediateEventElement intermediateEventElement, String eventIdentifier, Object resultObject, String additionalInformation)
Fires an intermediate event.- Parameters:
intermediateEventElement
- the intermediate event element to fire the intermediate event on.eventIdentifier
- the event identifier.resultObject
- the result object. Can be null.additionalInformation
- additional information about the event.- Returns:
- the intermediate event
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION IS SYSTEM
-
getTaskQueryExecutor
ITaskQueryExecutor getTaskQueryExecutor()
Executor fortask queries
on this application.- Returns:
- task query executor
- See Also:
TaskQuery
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS TaskReadAll PERMISSION OR OWNS TaskReadAll@SYSTEM PERMISSION
-
getCaseQueryExecutor
ICaseQueryExecutor getCaseQueryExecutor()
Executor forcase queries
on this application.- Returns:
- case query executor
- See Also:
CaseQuery
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS CaseReadAll PERMISSION OR OWNS CaseReadAll@SYSTEM PERMISSION
-
getGlobalContext
IGlobalWorkflowContext getGlobalContext()
- Returns:
- the global context
- See Also:
IGlobalWorkflowContext
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
findProcessStartsBySignature
Set<IProcessStart> findProcessStartsBySignature(String signature)
Finds all process starts that have the given signature. Note that the signature is only unique for one process file, there may be multiple process starts with the same signature per process model version.- Parameters:
signature
- the signature of the searched process, i.e. mySignature(java.lang.String):java.lang.Integer- Returns:
- all process starts in released process model versions of the application that match the given signature
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
getStartableProcessStarts
List<IProcessStart> getStartableProcessStarts(IUser user)
Returns all process start elements which the given user can start.- Parameters:
user
-- Returns:
- process starts
- Since:
- 6.6.2
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getStartables
List<IWebStartable> getStartables(IUser user)
Returns all startables which the given user can start.- Parameters:
user
-- Returns:
- startables
- Since:
- 6.6.2
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
documents
IDocumentService documents()
Returns a service for managing documents of this workflow context.Examples:
Add a document:
IDocument document = ivy.wf.documents().add(new Path("images/myImage.png")).write().withContentFrom(in.file);
Get all documents:
List<IDocument> documents = ivy.wf.documents().getAll();
- Returns:
- workflow context document service
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
- Security:
- SESSION OWNS DocumentRead PERMISSION OR OWNS DocumentRead@SYSTEM PERMISSION
-
signals
IBpmSignalService signals()
A service for sending and querying signals.
Example: send a signal:ivy.wf.signals().send("user:created");
- Returns:
- signal service
- Since:
- 6.1.0
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
-