Interface IBusinessCase
- All Superinterfaces:
IAdditionalPropertyable
,ICase
,INoteable
Every process that is started is a case
.
A case
belongs to a IBusinessCase
.
Use method ICase.getBusinessCase()
to get the business case
a case
belongs to.
If a process is triggered or signaled or started inside the context of an existing business case
then it's case
is automatically attached to the existing business case
.
Use method subCases()
to get the cases
that are attached to a business case.
Implementation Details:
If a process is started and no IBusinessCase
is available then the started case
acts as (sub) case
and as business case
.
As soon as a second case is attached to the IBusinessCase
the initial case
is copied and the copy acts now as business case
whereas the initial case
acts only as sub case
now.
The ICase
interface defines the functionality all cases (business or sub cases) have. This interface extends the ICase
interface with methods
that are only available for business cases
.
- Since:
- 6.5
- API:
- This is a public API.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Destroys this business case and all sub cases that belong to business case.getStage()
Returns theBusinessCaseStage
of thisIBusinessCase
.Returns the id of the current stage of thisIBusinessCase
.Gets the web startable that started the case.getState()
Gets the state of the business case.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.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, descriptions, documents, getActiveTasks, getApplication, getBusinessCalendar, getBusinessCase, getBusinessCorrespondentId, getBusinessCreatorUser, getBusinessMainContactDocumentDatabaseCode, getBusinessMainContactFolderId, getBusinessMainContactId, getBusinessMainContactName, getBusinessMainContactType, getBusinessMilestoneTimestamp, getBusinessObjectCode, getBusinessObjectDocumentDatabaseCode, getBusinessObjectFolderId, getBusinessObjectName, getBusinessPriority, getBusinessRuntime, getBusinessStartTimestamp, getBusinessState, getCategory, getCategoryPath, getCreatorTask, getCreatorUser, getCreatorUserName, getCustomDecimalField1, getCustomDecimalField2, getCustomDecimalField3, getCustomDecimalField4, getCustomDecimalField5, getCustomTimestampField1, getCustomTimestampField2, getCustomTimestampField3, getCustomTimestampField4, getCustomTimestampField5, getCustomVarCharField1, getCustomVarCharField2, getCustomVarCharField3, getCustomVarCharField4, getCustomVarCharField5, getDescription, getDetailLink, getDisplayDescriptionTemplate, getDisplayNameTemplate, getEndTimestamp, getFirstTask, getId, getModifiedTimestamp, getName, getOwner, getOwnerName, getPriority, getProcessCategoryCode, getProcessCategoryName, getProcessCode, getProcessModel, getProcessModelVersion, getProcessName, getProcessStart, getStartTimestamp, getSubTypeCode, getSubTypeName, getTasks, getTypeCode, getTypeName, getWorkflowContext, getWorkflowEvents, isBusinessCase, isPersistent, names, setBusinessCalendar, setBusinessCorrespondentId, setBusinessCreatorUser, setBusinessMainContactDocumentDatabaseCode, setBusinessMainContactFolderId, setBusinessMainContactId, setBusinessMainContactName, setBusinessMainContactType, setBusinessMilestoneTimestamp, setBusinessObjectCode, setBusinessObjectDocumentDatabaseCode, setBusinessObjectFolderId, setBusinessObjectName, setBusinessPriority, setBusinessStartTimestamp, setCategoryPath, setCreatorUser, setCustomDecimalField1, setCustomDecimalField2, setCustomDecimalField3, setCustomDecimalField4, setCustomDecimalField5, setCustomTimestampField1, setCustomTimestampField2, setCustomTimestampField3, setCustomTimestampField4, setCustomTimestampField5, setCustomVarCharField1, setCustomVarCharField2, setCustomVarCharField3, setCustomVarCharField4, setCustomVarCharField5, setDescription, setName, setOwner, setPriority, setProcess, setProcessCategory, setSubType, setType, tasks, uuid
Methods inherited from interface ch.ivyteam.ivy.workflow.INoteable
createNote, deleteNote, getNotes, hasNotes
-
Method Details
-
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 Java.
-
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
. -
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:
- API:
- This public API is available in Java.
-
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. -
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 Java.
-
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 Java.
-
setStageId
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 Java.
-
setStageId
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 Java.
-
getStartedFrom
IWebStartable getStartedFrom()Gets the web startable that started the case. It can be a process start or a CaseMap start. It can return startables that are not startable anymore because a project is not released on the engine anymore.- Returns:
- web startable the case was started with
- Since:
- 9.3
- API:
- This public API is available in Java.
-