Package com.evolveum.midpoint.wf.api
Interface WorkflowManager
-
public interface WorkflowManager
TODO specify and clean-up error handling
-
-
Method Summary
-
-
-
Method Detail
-
completeWorkItem
void completeWorkItem(WorkItemId workItemId, AbstractWorkItemOutputType output, WorkItemEventCauseInformationType causeInformation, Task task, OperationResult parentResult) throws SecurityViolationException, SchemaException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException
Approves or rejects a work item
-
claimWorkItem
void claimWorkItem(WorkItemId workItemId, Task task, OperationResult result) throws ObjectNotFoundException, SecurityViolationException, SchemaException, ObjectAlreadyExistsException, CommunicationException, ConfigurationException, ExpressionEvaluationException
-
releaseWorkItem
void releaseWorkItem(WorkItemId workItemId, Task task, OperationResult result) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ObjectAlreadyExistsException, CommunicationException, ConfigurationException, ExpressionEvaluationException
-
delegateWorkItem
void delegateWorkItem(WorkItemId workItemId, WorkItemDelegationRequestType delegationRequest, Task task, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException
-
cancelCase
void cancelCase(String caseOid, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, ObjectAlreadyExistsException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException
Cancels a case and its subcases. Carries out the authorization.
-
deleteCase
void deleteCase(String caseOid, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, ObjectAlreadyExistsException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException
Cancels and deletes a case and its subcases. Carries out authorization but only for subcases. For the root it is expected that this is done by the caller (usually the ChangeExecutor).
-
cleanupCases
void cleanupCases(CleanupPolicyType closedCasesPolicy, RunningTask task, OperationResult opResult) throws CommonException
Deletes obsolete cases, as specified in the policy. This method removes parent case object with all its children cases. Authorizations are taken care by using model API to fetch and delete the cases.- Parameters:
closedCasesPolicy
- specifies which tasks are to be deleted, e.g. how old they have to betask
- task, within which context the cleanup executes (used to test for interruptions)- Throws:
CommonException
- When the root cases cannot be searched for. Exceptions during actual deletion or when searching for subcases are not re-thrown (to allow processing as much cases as possible).
-
isEnabled
boolean isEnabled()
-
getPrismContext
PrismContext getPrismContext()
-
registerWorkflowListener
void registerWorkflowListener(WorkflowListener workflowListener)
-
isCurrentUserAuthorizedToSubmit
boolean isCurrentUserAuthorizedToSubmit(CaseWorkItemType workItem, Task task, OperationResult result) throws ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException, SecurityViolationException
-
isCurrentUserAuthorizedToClaim
boolean isCurrentUserAuthorizedToClaim(CaseWorkItemType workItem)
-
isCurrentUserAuthorizedToDelegate
boolean isCurrentUserAuthorizedToDelegate(CaseWorkItemType workItem, Task task, OperationResult result) throws ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException, SecurityViolationException
-
getChangesByState
ChangesByState getChangesByState(CaseType rootCase, ModelInteractionService modelInteractionService, PrismContext prismContext, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException
-
getChangesByState
ChangesByState getChangesByState(CaseType approvalCase, CaseType rootCase, ModelInteractionService modelInteractionService, PrismContext prismContext, OperationResult result) throws SchemaException, ObjectNotFoundException
-
getApprovalSchemaExecutionInformation
ApprovalSchemaExecutionInformationType getApprovalSchemaExecutionInformation(String caseOid, Task opTask, OperationResult parentResult) throws SchemaException, ConfigurationException, ObjectNotFoundException, CommunicationException, SecurityViolationException, ExpressionEvaluationException
Retrieves information about actual or expected execution of an approval schema. (So, this is restricted to approvals using this mechanism.) Does not need authorization checks before execution; it uses model calls in order to gather any information needed.- Parameters:
caseOid
- OID of an approval case that should be analyzedopTask
- task under which this operation is carried outparentResult
- operation result- Throws:
SchemaException
ConfigurationException
ObjectNotFoundException
CommunicationException
SecurityViolationException
ExpressionEvaluationException
-
getApprovalSchemaPreview
List<ApprovalSchemaExecutionInformationType> getApprovalSchemaPreview(ModelContext<?> modelContext, Task opTask, OperationResult parentResult) throws SchemaException, ConfigurationException, ObjectNotFoundException, CommunicationException, SecurityViolationException, ExpressionEvaluationException
Retrieves information about expected approval schema and its execution. (So, this is restricted to approvals using this mechanism.) Does not need authorization checks before execution; it uses model calls in order to gather any information needed.- Parameters:
modelContext
- model context with the projector run already carried out (so the policy rules are evaluated)opTask
- task under which this operation is carried outparentResult
- operation result- Throws:
SchemaException
ConfigurationException
ObjectNotFoundException
CommunicationException
SecurityViolationException
ExpressionEvaluationException
-
createPerformerCommentsFormatter
PerformerCommentsFormatter createPerformerCommentsFormatter(PerformerCommentsFormattingType formatting)
-
-