Package dev.agenor.core.hitl
Class NoopApprovalHandle
java.lang.Object
dev.agenor.core.hitl.NoopApprovalHandle
- All Implemented Interfaces:
ApprovalHandle
Default
ApprovalHandle used when no HITL provider (e.g.
agenor-runtime-ext) is on the classpath.
Query methods return an empty result; decision-submitting methods fail fast with a message pointing at the missing module, rather than silently doing nothing.
- Since:
- 0.25.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidApproves the pending request identified byrequestId.Returns a snapshot of approval requests that are still pending.voidApproves the pending request with a modified payload.voidRejects the pending request identified byrequestId.voidsubmit(String requestId, ApprovalDecision decision) Submits an arbitraryApprovalDecisionfor the pending request.
-
Constructor Details
-
NoopApprovalHandle
public NoopApprovalHandle()
-
-
Method Details
-
approve
Description copied from interface:ApprovalHandleApproves the pending request identified byrequestId.- Specified by:
approvein interfaceApprovalHandle- Parameters:
requestId- UUID of the pending request
-
reject
Description copied from interface:ApprovalHandleRejects the pending request identified byrequestId.- Specified by:
rejectin interfaceApprovalHandle- Parameters:
requestId- UUID of the pending requestreason- human-readable explanation; must not benull
-
modify
Description copied from interface:ApprovalHandleApproves the pending request with a modified payload.- Specified by:
modifyin interfaceApprovalHandle- Parameters:
requestId- UUID of the pending requestnewPayload- revised action payload; must not benull
-
submit
Description copied from interface:ApprovalHandleSubmits an arbitraryApprovalDecisionfor the pending request.- Specified by:
submitin interfaceApprovalHandle- Parameters:
requestId- UUID of the pending requestdecision- the decision to submit; must not benull
-
getPendingRequests
Description copied from interface:ApprovalHandleReturns a snapshot of approval requests that are still pending.- Specified by:
getPendingRequestsin interfaceApprovalHandle- Returns:
- immutable list of pending
ApprovalRequests
-