Interface EngineExtension
-
public interface EngineExtension
Provides functionality that the case engine calls when dealing with specific case archetypes (like approval cases, etc). TODO better name
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
doesUseStages()
Does this extension use stages at all? If not, there is only a single stage (numbered 1).void
finishCaseClosing(@NotNull CaseEngineOperation operation, @NotNull OperationResult result)
Called to finish case closing procedure.@NotNull Collection<String>
getArchetypeOids()
Returns the case archetype OID(s) this extension handles.@NotNull AuditingExtension
getAuditingExtension()
Returns an object that helps with audit records creation.int
getExpectedNumberOfStages(@NotNull CaseEngineOperation operation)
Returns the number of stages the case is expected to go through.@NotNull StageClosingResult
processStageClosing(CaseEngineOperation operation, OperationResult result)
Does the specific stage closing activities (including determination of the case processing continuation).@NotNull StageOpeningResult
processStageOpening(CaseEngineOperation operation, OperationResult result)
May provide new work items and/or pre-computed stage result.@NotNull WorkItemCompletionResult
processWorkItemCompletion(@NotNull CaseWorkItemType workItem, @NotNull CaseEngineOperation operation, @NotNull OperationResult result)
Processes work item completion.
-
-
-
Method Detail
-
getArchetypeOids
@NotNull @NotNull Collection<String> getArchetypeOids()
Returns the case archetype OID(s) this extension handles.
-
finishCaseClosing
void finishCaseClosing(@NotNull @NotNull CaseEngineOperation operation, @NotNull @NotNull OperationResult result) throws SchemaException, ObjectAlreadyExistsException, ObjectNotFoundException, ExpressionEvaluationException, ConfigurationException, CommunicationException, SecurityViolationException
Called to finish case closing procedure. E.g. for approvals we may submit execution task here. When called, the case should be in `closing` state. This may happen e.g. when approval execution task is submitted. After return, the case may be still in this state, or it may be `closed`.
-
getExpectedNumberOfStages
int getExpectedNumberOfStages(@NotNull @NotNull CaseEngineOperation operation)
Returns the number of stages the case is expected to go through. E.g. for approval cases, it is determined from the approval schema. Must return 1 ifdoesUseStages()
is false.
-
doesUseStages
boolean doesUseStages()
Does this extension use stages at all? If not, there is only a single stage (numbered 1).
-
processStageOpening
@NotNull @NotNull StageOpeningResult processStageOpening(CaseEngineOperation operation, OperationResult result) throws SchemaException
May provide new work items and/or pre-computed stage result.- Throws:
SchemaException
-
processStageClosing
@NotNull @NotNull StageClosingResult processStageClosing(CaseEngineOperation operation, OperationResult result)
Does the specific stage closing activities (including determination of the case processing continuation).
-
processWorkItemCompletion
@NotNull @NotNull WorkItemCompletionResult processWorkItemCompletion(@NotNull @NotNull CaseWorkItemType workItem, @NotNull @NotNull CaseEngineOperation operation, @NotNull @NotNull OperationResult result) throws SchemaException
Processes work item completion. May update the case! Note: Work item is already updated (output written, closed).- Throws:
SchemaException
-
getAuditingExtension
@NotNull @NotNull AuditingExtension getAuditingExtension()
Returns an object that helps with audit records creation.
-
-