Interface IBusinessCase
-
- All Superinterfaces:
IAdditionalPropertyable
,ICase
,INoteable
public interface IBusinessCase extends ICase
Every process that is started is a
case
. Acase
belongs to aIBusinessCase
. Use methodICase.getBusinessCase()
to get thebusiness case
acase
belongs to.If a process is triggered or signaled or started inside the context of an existing
business case
then it'scase
is automatically attached to the existingbusiness case
. Use methodsubCases()
to get thecases
that are attached to a business case.Implementation Details:
If a process is started and no
IBusinessCase
is available then the startedcase
acts as(sub) case
and asbusiness case
. As soon as a second case is attached to theIBusinessCase
theinitial case
is copied and the copy acts now asbusiness case
whereas theinitial case
acts only assub case
now.The
ICase
interface defines the functionality all cases (business or sub cases) have. This interface extends theICase
interface with methods that are only available forbusiness cases
.- Since:
- 6.5
- API:
- This is a public API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
destroy()
Destroys this business case and all sub cases that belong to business case.List<ITask>
getActiveTasks()
Gets all active tasks of all active sub cases of this business caseBusinessCaseStage
getStage()
Returns theBusinessCaseStage
of thisIBusinessCase
.StageId
getStageId()
Returns the id of the current stage of thisIBusinessCase
.CaseState
getState()
Gets the state of the business case.List<ITask>
getTasks()
Gets all tasks of all sub cases of this business caseDuration
getWorkingTime()
The working time of a business case is the sum of all working times of all tasks of all sub cases.void
setStageId(StageId stageId)
Sets the current stage of thisIBusinessCase
to the given stage id.void
setStageId(String stageId)
Sets the current stage of thisIBusinessCase
to the given stage id.ISubCases
subCases()
Gets the subcases
that belong to thisbusiness case
.-
Methods inherited from interface ch.ivyteam.ivy.workflow.IAdditionalPropertyable
getAdditionalProperty, getAdditionalPropertyNames, setAdditionalProperty
-
Methods inherited from interface ch.ivyteam.ivy.workflow.ICase
attachToBusinessCase, customFields, documents, getActiveEnvironment, getApplication, getBusinessCase, getBusinessRuntime, getCategory, getCategoryPath, getCreatorTask, getCreatorUser, getCreatorUserName, getDescription, getDisplayDescriptionTemplate, getDisplayNameTemplate, getEndTimestamp, getFirstTask, getId, getName, getOwner, getOwnerName, getPageArchives, getPriority, getProcessModel, getProcessModelVersion, getProcessStart, getStartTimestamp, getWorkflowContext, getWorkflowEvents, isBusinessCase, isPersistent, setActiveEnvironment, setBusinessCalendar, setCategoryPath, setCreatorUser, setDescription, setName, setOwner, setPriority
-
Methods inherited from interface ch.ivyteam.ivy.workflow.INoteable
createNote, deleteNote, getNotes, hasNotes
-
-
-
-
Method Detail
-
subCases
ISubCases subCases()
Gets the subcases
that belong to thisbusiness case
.- Returns:
- all (sub) cases of this business case
- Since:
- 6.5
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS CaseReadSubCases PERMISSION OR OWNS CaseReadSubCases@SYSTEM PERMISSION
-
getTasks
List<ITask> getTasks()
Gets all tasks of all sub cases of this business case- Specified by:
getTasks
in interfaceICase
- Returns:
- Enumeration with all tasks
- See Also:
ICase.getTasks()
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS TaskReadOwnCaseTasks PERMISSION OR OWNS TaskRead PERMISSION OR OWNS TaskRead@SYSTEM PERMISSION
-
getActiveTasks
List<ITask> getActiveTasks()
Gets all active tasks of all active sub cases of this business case- Specified by:
getActiveTasks
in interfaceICase
- Returns:
- Iterator with all tasks in a active state
- See Also:
ICase.getActiveTasks()
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS TaskReadOwnCaseTasks PERMISSION OR OWNS TaskRead PERMISSION OR OWNS TaskRead@SYSTEM PERMISSION
-
getState
CaseState getState()
Gets the state of the business case. A business case is in stateCaseState.RUNNING
while any of itssub case
is in stateCaseState.CREATED
orCaseState.RUNNING
. It changes to stateCaseState.DONE
as soon as its lastsub case
changes to stateCaseState.DONE
. It changes to stateCaseState.DESTROYED
as soon as its lastsub case
changes to stateCaseState.DESTROYED
.- Specified by:
getState
in interfaceICase
- Returns:
- state of the case
- See Also:
ICase.getState()
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS CaseReadState PERMISSION OR OWNS CaseReadState@SYSTEM PERMISSION
-
getWorkingTime
Duration getWorkingTime()
The working time of a business case is the sum of all working times of all tasks of all sub cases.- Specified by:
getWorkingTime
in interfaceICase
- Returns:
- Working time as
Duration
.
Returnsnull
for the following situations:- no task has been parked or completed
- the case has been completed before the working time feature was introduced.
- See Also:
ICase.getWorkingTime()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
destroy
void destroy()
Destroys this business case and all sub cases that belong to business case. Destroys also all tasks that belong to any of the sub cases of the business case.- Specified by:
destroy
in interfaceICase
- See Also:
ICase.destroy()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS CaseDestroy PERMISSION OR OWNS CaseDestroy@SYSTEM PERMISSION
-
getStage
BusinessCaseStage getStage()
Returns theBusinessCaseStage
of thisIBusinessCase
. TheBusinessCaseStage
provides locale specific information like the name of aBusinessCaseStage
, as defined in the CMS. Nevernull
.- Returns:
- the current
BusinessCaseStage
, corresponding to the current stage id - Since:
- 6.6
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
getStageId
StageId getStageId()
Returns the id of the current stage of thisIBusinessCase
. Nevernull
.- Returns:
- id of the current stage
- Since:
- 6.6
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
setStageId
void setStageId(String stageId)
Sets the current stage of thisIBusinessCase
to the given stage id.- Parameters:
stageId
- id of the stage- Since:
- 6.6
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
setStageId
void setStageId(StageId stageId)
Sets the current stage of thisIBusinessCase
to the given stage id.- Parameters:
stageId
- id of the stage- Since:
- 6.7
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
-