Imagine a procurement assistant has prepared a purchase request for an urgent equipment replacement. It has the supplier, the amount, the business justification and the draft reference. The request is ready for review, but the procurement policy requires an authorized manager to approve it before anything is committed to the purchasing system.
This introduces a problem that ordinary request-response integration flows do not solve by themselves. A person might take minutes or days to respond, and the AI agent cannot treat a submitted request as an approval. Nor should it repeatedly call the same tool while waiting, invent a decision when nobody responds, or create a second transaction after an uncertain outcome.
Oracle Integration 3 provides a Human in the Loop capability that connects a workflow and an assigned human task to an AI agent. The important engineering work is to establish who owns the decision, how the asynchronous operation resumes, how the right request is correlated, and which control prevents an unapproved or duplicate business action. This tutorial builds that architecture around a fictional Procurement Exception Assistant.
01. What You Will Build
The practical outcome is a controlled review path for a procurement draft. The agent prepares or retrieves a draft, submits its review request through an asynchronous OIC integration, waits for the authorized human decision, and continues only after receiving the workflow's result.
Illustrative request
{
"request_id": "PR-EX-2026-0042",
"draft_id": "DRAFT-0042",
"draft_version": "1",
"supplier_name": "Northwind Industrial",
"description": "Replacement pump assemblies",
"amount": 4800.00,
"currency": "USD",
"business_reason": "Urgent maintenance requirement"
}
All names and values are synthetic. The JSON field names belong to this tutorial; they are not a mandatory Oracle-defined request schema.
For this example, assume that the business policy requires human review for the request. The reviewer must see the relevant draft information and make an explicit approval or rejection decision. A rejection must not create the purchasing transaction.
By the end, the design should demonstrate the following intended outcomes:
- A configured review workflow with a designated assignee and an explicit decision outcome.
- An active asynchronous integration registered as an agentic AI tool.
- A clear distinction between submitting a review, waiting for the reviewer, and receiving the completed workflow result.
- Business-level correlation between the draft, review request and final outcome.
- A defined control for preventing unauthorized, stale or duplicate purchasing transactions.
Implementation boundary: The workflow and callback design is documented by Oracle. No tenant, real approver directory, procurement API, approval ledger, or execution trace was supplied for this article. Accordingly, the configuration and tests below describe a reproducible implementation plan, not a claim that an end-to-end procurement transaction has already run successfully.
In This Post
- What You Will Build
- Before You Begin
- Concepts That Affect This Build
- Build and Configure
- Test and Prove It
- Troubleshooting and Recovery
- Enterprise Considerations
- Completion Checklist and What Comes Next
- Five Useful FAQs
- Verified References
- Finally — Summary
02. Before You Begin
This tutorial targets the Oracle Integration 3 documentation for release 26.10, with the workflow and asynchronous tool behavior checked against Oracle's published documentation. Your provisioned tenant's actual availability and configuration are separate facts.
- Platform: Oracle Integration 3 Enterprise Edition with Human in the Loop enabled. Enabling this feature provisions an associated Process Automation instance; the administrator must have the required OCI IAM policies and permissions. If the setting is unavailable, follow Oracle's Enable Process Automation and Human in the Loop in Oracle Integration guide.
- Core: A project in Oracle Integration 3, permission to create integrations and agentic AI tools, and access to the Human in the Loop workspace.
- Core: A REST trigger connection suitable for a POST endpoint with a JSON request payload.
- Core: Permission to create and activate a workflow and form, assign a task to an authorized user or group, and access Process Automation Workspace.
- Core: An approved model/pattern configuration and the ability to run and observe the project AI agent.
- Just-in-time prerequisite: A controlled way to prepare and retrieve a procurement draft. For the final write test, use a non-production target and a service that can enforce the recorded approval decision.
- Needed only for the final-write test: A non-production procurement target/API, securely configured credentials, an authorized approver identity, and a durable approval-decision or equivalent enforcement contract. Without these dependencies, test the workflow and callback with synthetic data only; do not enable production writes or substitute secrets into the examples below.
Oracle documents Human in the Loop as part of its agentic AI approval architecture: Human in the Loop for Agentic AI in Oracle Integration.
03. Concepts That Affect This Build
3.1 — Approval Architecture
Human review is a business control, not a conversational confirmation. The agent can prepare a draft and recommend a decision, but the approval decision must come from an authorized reviewer or from a separate business rule that is explicitly allowed to decide.
Keep four responsibilities separate:
- Draft preparation: A deterministic integration retrieves or creates a draft and returns its authoritative identifier and version. No final purchasing transaction is committed at this stage.
- Review: The workflow assigns a task to the required user or group and presents the relevant draft information.
- Decision: The workflow records the task's explicit outcome. The decision is not inferred from the agent's text, a confidence score, or the fact that a tool returned successfully.
- Authorized execution: A separate controlled path commits the purchasing transaction only after it can establish that the correct draft has an approved status and satisfies the remaining business controls.
Kid-friendly analogy
Imagine a school trip form. One student fills it out, a parent signs it, and a teacher checks the signature before allowing the trip. Filling out the form does not mean permission has been granted.
In the agent, this means: Preparing a procurement draft, recording a human decision, and executing the transaction are different operations with separate evidence and control requirements.
Who owns the decision? The workflow owns task routing and its recorded task outcome; the named reviewer supplies the human decision. The target business system or a protected finalization service remains responsible for accepting or rejecting the actual transaction under its own authorization and validation rules.
A task that ends in rejection must route to a non-execution path. A successful workflow invocation only proves that the review process was invoked; it does not prove that a purchase order was created. Oracle describes human tasks as a mechanism for approval, authorization, exception handling and human decision-making in its task configuration guide.
3.2 — Workflow Preparation
The workflow is the authority for who must act, what action completes the task, and what data is passed through the review. The form supplies the human-facing fields; the task configuration supplies the outcome and assignee; the workflow start and end payloads define the data contract at its boundaries.
Kid-friendly analogy
Imagine a teacher collecting permission slips. The form has spaces for the trip details, the class list says who may approve, and the teacher's record shows whether each slip was approved or rejected.
In the agent, this means: Workflow payloads, task outcomes, form mappings and assignee rules jointly define the review contract; a free-text agent instruction does not replace any of them.
Three choices deserve special attention:
- Outcome: For this prototype, configure the task outcome as
Approve or Reject, so the human's decision is an explicit task outcome. Oracle also supportsComplete, which means a submitted form completes the task without necessarily expressing an approval decision. Do not use the latter as a substitute for an approval control. - Assignee: Select the authorized user or group in the workflow configuration, or use a governed expression to determine it. Do not let the model choose its own approver by passing an arbitrary username in tool arguments.
- Payload: Include only the information a reviewer needs to assess the request. Define and map start-event inputs, task/form data and end-event outputs deliberately. A name such as
decisionis a tutorial contract; the task's actual output fields and expression references must match the configured workflow.
Oracle's task configuration documentation explicitly describes the Complete and Approve or Reject outcome choices, assignee selection, and active-form requirement. See Configure Tasks.
3.3 — Agent-to-Workflow Integration
The integration that invokes a Human in the Loop workflow must be asynchronous: its endpoint does not return the final business result as an ordinary synchronous response. Oracle documents a REST trigger, the POST verb, a JSON request payload, and the Human in the loop action that calls the selected workflow. A mapping step passes data into the workflow.
Kid-friendly analogy
Imagine handing a permission form to a school office. The office accepts the form and gives it to the teacher, but it cannot tell you the teacher's decision at the instant you hand it over.
In the agent, this means: The asynchronous agentic AI tool submits a workflow request; the human task completes later, and the documented Human in the Loop mechanism delivers the callback response to the waiting agent.
The integration does not become an agentic AI tool merely because it exists in a project. The integration must be active, registered as an agentic AI tool, and available to the agent through its tool configuration.
Oracle's Human in the Loop documentation says callback handling is automatically implemented for this workflow path. The separate Callback AI agent action applies to asynchronous agentic tools that do not call Human in the Loop. Do not add a second, manually constructed callback just because this integration is asynchronous. See Design an Integration to Call a Workflow and Send a Response to an AI Agent with a Callback.
3.4 — Waiting and Resumption
An asynchronous operation has a period in which the request has been accepted but the result is not yet available. The business task may remain in progress while a reviewer considers the information. The agent must not mistake this waiting period for approval, rejection, or tool failure.
Kid-friendly analogy
Imagine leaving a book at the school library desk while the librarian checks its record. You wait for the library to contact you; repeatedly submitting the same request would create unnecessary work and would not make the check finish sooner.
In the agent, this means: Treat waiting as a lifecycle state and resume from the workflow's response, rather than repeatedly invoking the review tool or fabricating a result.
For generic asynchronous agentic AI tools, Oracle documents the status Waiting for tool to process and states that reasoning resumes after the callback response is received. Do not assume every observer screen uses the same label for the workflow instance and the agent conversation; inspect both independently.
The relevant lifecycles are separate:
- Workflow lifecycle: The review instance starts, the task becomes available to the assignee, the task receives an outcome, and the workflow completes or follows its configured path.
- Agent lifecycle: The agent invokes the asynchronous tool, waits for its callback, and continues after a response has been delivered to the conversation.
- Business lifecycle: The draft remains uncommitted until a controlled execution path establishes approval and successfully applies the transaction.
Oracle's Complete Assigned Task as a User guide describes how the reviewer completes the form and how the workflow activity stream exposes task history and input/output payloads. The exact retry and interrupted-conversation recovery procedure must be designed for the integration and target involved; the existence of a callback does not guarantee that all faults recover automatically.
3.5 — Callback Contracts and Correlation
Correlation establishes which asynchronous operation a response belongs to. This is different from business authorization: a correctly correlated response can still say REJECTED, and an APPROVED response is not a license to bypass the target system's controls.
Kid-friendly analogy
Imagine several students have left different books at a help desk. When one book is ready, the librarian checks its ticket number so it goes back to the right student, not the person who happens to be waiting nearby.
In the agent, this means: Preserve the workflow's native callback routing and separately maintain a stable business request identifier that ties the draft, approval record and execution attempt together.
There are two correlation layers to keep distinct.
Oracle's native Human in the Loop callback: Use the workflow and asynchronous tool integration documented for this feature. Oracle states that callback handling is automatic for Human in the Loop. Do not invent a manual callback URL or pass fabricated conversation identifiers.
Generic asynchronous tool callback: If you later implement an asynchronous tool that does not call Human in the Loop, the separate Callback AI agent action has a documented mapping contract. Oracle identifies the conversation ID, tool flow ID, tool invoke event ID and response payload. Its guide requires both Tool Flow ID and Tool Invoke Event ID to be mapped and describes using the runtime tool instance ID for both. Those values are runtime identifiers, not values to generate from a purchase request number.
For either design, introduce a separate business-level key such as request_id. Preserve the mapping between that key and the draft ID/version, workflow instance, agent conversation where available, and finalization/idempotency record. An Oracle workflow instance ID identifies a workflow instance; it is not interchangeable with a conversation ID or a procurement draft ID.
Oracle 26.10 documents a workflow instance identifier and a business key for workflow tracking and grouping. These are useful observability aids, but neither replaces an enforced duplicate-prevention mechanism. See Edit Workflow Information and the separate generic callback contract.
3.6 — Exceptional Completion
Approval workflows have more than two runtime conditions. The reviewer may reject the draft, take longer than expected, fail to complete the assigned task, or complete a task after the requesting conversation is no longer available. A service call can also succeed remotely while its response is lost, leaving the caller unsure whether the business transaction happened.
Kid-friendly analogy
Imagine a school shop receives the same order twice because the first receipt was slow to arrive. The shop checks its order book before handing out a second identical package, and a rejected order never reaches the packing desk.
In the agent, this means: Use explicit rejection branches, bounded waiting policies, durable request state and idempotent transaction handling; a repeated message must not create a second business transaction.
Make the following distinctions explicit in your implementation:
- Rejected: A valid decision with a non-execution outcome. Record it and tell the requester that the transaction was not committed.
- Delayed: A workflow or task is still in progress. Monitor and escalate under a defined policy; do not convert elapsed time into automatic approval.
- Missing response: The callback was not observed, or the agent could not resume. Reconcile the workflow, conversation and target status before retrying.
- Duplicate response: A repeated callback or resumed action must not apply the same business command twice. Maintain durable state and an idempotency key at the finalization boundary.
- Uncertain transaction: The remote system may have committed even though the integration timed out. Query by a stable transaction key or use the target's documented idempotency capability before sending another create request.
Do not assume that a configured workflow expiration is an approval SLA. Oracle documents a default workflow retention/expiration period of 90 days (2160 hours) in the workflow information settings; that is not a suitable substitute for a business deadline, escalation path, or missing-callback recovery policy. See Edit Workflow Information.
04. Build and Configure — Step by Step
Build the approval path first, then connect the agent to it. The steps below use tutorial-defined names; substitute the authorized project resources in your environment. Do not assume that the synthetic identifiers correspond to pre-existing Oracle assets.
Phase 1 — Define the procurement draft and request contract
Step 1. Define the draft boundary before configuring the agent.
Create or identify a deterministic draft-preparation integration. Its job is to validate the input, resolve the supplier and amounts against authoritative data, and return a real draft identifier/version. It must not create the final purchase order or equivalent committed transaction.
The draft output should contain enough information to retrieve the same canonical draft later. A suggested output contract is:
{
"request_id": "PR-EX-2026-0042",
"draft_id": "DRAFT-0042",
"draft_version": "1",
"draft_status": "DRAFT",
"supplier_id": "SUPPLIER-TEST-001",
"amount": 4800.00,
"currency": "USD"
}
This is an illustrative business contract, not a claim about an Oracle Procurement API response. The draft integration owns generation and validation of its identifiers; the model must not fabricate a draft ID, supplier ID, or approval status.
Step 2. Define the workflow input payload.
Use the following JSON as the tutorial's proposed start-event contract. Configure matching properties in the workflow start event and the REST trigger request schema. The exact property types and required flags are design decisions that must be set in the actual payload editors.
{
"request_id": "PR-EX-2026-0042",
"draft_id": "DRAFT-0042",
"draft_version": "1",
"supplier_name": "Northwind Industrial",
"description": "Replacement pump assemblies",
"amount": 4800.00,
"currency": "USD",
"business_reason": "Urgent maintenance requirement",
"requested_by": "buyer.demo",
"requested_date": "2026-10-24"
}
Map the payload fields explicitly into the task form. In the completed prototype, the review request must resolve to the authoritative draft represented by the supplied ID and version. If a field is model-visible or originates from a user prompt, it is input to validate, not proof that the corresponding business fact is true.
Checkpoint: A request with an unknown draft ID, mismatched version, missing supplier or invalid amount should be rejected before creating an approval task.
Phase 2 — Create the human review workflow and form
Step 3. Create the workflow.
Starting location: Open the project, select Human in the loop in the project toolbar, and add a workflow. Oracle's documented workflow creation path initially provides a start event, task, and end event.
| Field | Decision | Tutorial value |
|---|---|---|
| Name | Descriptive workflow identity | Procurement Exception Review |
| Identifier | Stable workflow identifier; confirm its generated value | Use the generated or deliberately assigned project identifier |
| Version | Version to select when the integration invokes the workflow | Use the created workflow's configured version |
| Description | Explain its controlled purpose | Review procurement drafts before execution |
Configure the start-event input using the JSON contract established in Phase 1. Configure the end-event payload to represent the outcome required by the caller. Field names in the end payload are your chosen contract; map them to the task's actual output data rather than assuming names or expressions that have not been generated in your workflow.
Step 4. Create the reviewer form.
Create a form for the approval task. Display the request ID, supplier, description, amount, currency, business justification, and draft/version reference. Include a reviewer comment where your process needs a reason or audit note. Display only fields the reviewer needs; avoid placing secrets, tokens or unnecessary personal data into the form or the model context.
Design the display so the reviewer can distinguish the canonical draft details from any proposed text. Map the workflow input fields to the corresponding form fields through the workflow's data associations. Activate the form after fixing configuration errors, because Oracle's task configuration allows selection of active forms.
Step 5. Configure the task's outcome and assignee.
Select the task element and configure its properties. For this approval path, select Approve or Reject as the outcome. Choose the designated authorized user or group in the assignee section. If the assignee must be determined dynamically, use a governed expression; do not derive privilege from free-form model output.
| Task setting | Configuration decision | Validation |
|---|---|---|
| Name / task title | Use a clear approval-task name and a useful title visible to the assignee. | A reviewer can identify the request being reviewed. |
| Outcome | Approve or Reject | The task records a clear decision outcome. |
| Assignee | An authorized user or group from the configured directory. | The intended reviewer receives the task. |
| Form | Choose the active form designed for this request. | The reviewer sees mapped input values and can submit a decision. |
| Priority | Use the default or define a justified dynamic priority. | Priority is not confused with approval authority or outcome. |
Oracle documents a default task priority of 2 (normal), with lower integer values representing higher priority and 1 the highest. Set priority only if it serves an operational need; it does not change who is authorized to approve the request.
Step 6. Configure rejection as a distinct workflow path.
Use the task output to route an approval outcome to the approved branch and a rejection outcome to a separate end path. Oracle's tiered-approval example demonstrates using an if/else gateway against the task's taskOutcome, with an illustrative expression like Level1ApproverOutput.taskOutcome=="APPROVE". Your exact task output reference depends on the task name and workflow data model.
For a more complex policy, use tiered approvals where a request must pass successive authority levels, or parallel approvals when multiple independent reviewers must participate. Do not add parallel or tiered steps merely for appearance; define the required approval rule first.
See Oracle's Model Approval Patterns guide and Model Tiered Approvals for the documented gateway pattern.
Step 7. Configure correlation-friendly workflow metadata.
Open the workflow's information settings. Define a useful instance identifier or business key using the available workflow data and expression editor. A business key can group related workflow instances; an instance identifier helps identify a particular instance. For this prototype, use the request identity when the expression and data contract permit it, and retain the actual generated workflow instance ID in your operational record.
Do not use the business key as an idempotency guarantee. It supports tracking; transaction-level duplicate protection still belongs in the business execution path.
Step 8. Validate and activate the workflow and form.
Resolve workflow and form configuration errors, ensure the task uses the active form, confirm the approved and rejected paths, and activate the required assets. The workflow must be active before the integration invokes it successfully.
Checkpoint: The workflow has a valid input contract, an assigned approval task, a form with mapped draft data, an explicit rejection path and a defined output contract. The workflow is active, and its selected form is active.
Phase 3 — Create the asynchronous integration
Step 9. Create the workflow-calling integration.
Starting location: Open the project, select Integrations, and create an application integration. Start it with a REST trigger connection configured for the POST verb and a JSON request payload. The integration must be asynchronous; it does not return the eventual human decision as the original synchronous response.
| Integration item | Value / decision | Why it matters |
|---|---|---|
| Trigger | REST trigger connection | Oracle documents this as the required starting connection for the workflow-calling integration. |
| HTTP verb | POST | Matches the documented workflow integration requirement. |
| Request payload | JSON matching the configured request contract | Provides typed, mapped workflow inputs rather than an unstructured prompt. |
| Asynchronous behavior | Use the supported asynchronous integration pattern for this agentic tool. | The review task can remain open while the agent waits for completion. |
| Workflow action | Add the Human in the loop action and select the intended workflow/version. | Connects the asynchronous operation to the actual human-review workflow. |
Step 10. Configure the Human in the loop action and data mapping.
Add the Human in the loop action from the integration's action panel. Select the configured workflow and appropriate version. Add a Map action before the Human in the loop action and map the integration request fields into the workflow input fields.
The mapping is the contract boundary. Validate that amounts remain numeric where expected, the currency and identifiers are preserved, and the form receives the correct values. Do not assume that the same field name in two separate payload schemas makes the mapping automatic.
Oracle's guide says the x-agentic-callback-uri custom request header can be declared when the integration is called by an external AI agent or when approval notification must be sent to another integration. When an Oracle Integration AI agent invokes the integration, the header is set automatically for its callback, so it need not be manually supplied for the native agent callback path. Follow the applicable header configuration documented for your exposure model rather than inventing a callback URL.
Official procedure: Design an Integration to Call a Workflow.
Step 11. Validate and activate the integration.
Validate the integration, save it, and activate it. Confirm that the selected workflow is active as well. The ability to create a tool from this integration depends on the integration being in the Active state.
Checkpoint: The integration's request contract matches the workflow inputs, the mapping validates, and the workflow-calling integration is active and points to the intended workflow version.
Phase 4 — Register the integration as an agentic AI tool
Step 12. Create the tool from the active integration.
Starting location: Open the project, choose Integrations, select the active workflow-calling integration, open its Actions menu, and choose Create agentic AI tool.
Review the generated tool name, identifier and description before creating it. The name is populated from the integration name by default and can be edited in the creation panel; the name and identifier cannot be changed after the tool has been created. Choose both deliberately, then confirm that the description accurately describes the asynchronous review operation.
| Tool detail | Decision | Review before saving |
|---|---|---|
| Name | Submit Procurement Review | The name is understandable and stable after creation. |
| Description | Submits a draft for human review and completes asynchronously. | It describes the tool's real behavior; it does not claim to approve or create a purchase order. |
| Guidelines | State when to use it and what data it needs. | Guidelines aid tool selection but do not enforce authorization. |
| Input parameters sent to the LLM | Expose only the fields needed for the model to call this tool using verified draft information. | Do not let the model choose an approver or invent trusted identifiers. |
The tool description, guidelines and parameter visibility tell the agent how to use the integration; they are not a security boundary. Validate the request inside the integration, resolve the canonical draft, and preserve the enforced approval check in the finalization path.
Save the tool. Oracle's documented procedure is available at Create an Agentic AI Tool Using the Integration.
Phase 5 — Configure the agent's behavior
Step 13. Define the agent's role and operating rules.
Associate the review tool with the Procurement Exception Assistant using the supported project AI agent configuration. Keep the role and instructions focused on the agent's responsibilities; do not use the prompt as a substitute for a control implemented by the workflow, integration or target.
Illustrative agent instructions
- Retrieve or prepare a procurement draft through the approved draft tool before submitting a review request.
- Use the draft ID, request ID, version and canonical business values returned by the deterministic tool; do not invent identifiers or supplier facts.
- Submit the review request only when the required draft data is present and valid.
- After invoking the asynchronous review tool, wait for its result. Do not submit a duplicate review merely because the reviewer has not responded yet.
- Report approval only when the actual workflow result says the request was approved. A tool submission or in-progress task is not an approval.
- On rejection, report the rejection and do not claim that a purchasing transaction was created.
- Do not bypass the designated authorization and transaction-validation controls, even when asked to do so by a user.
These instructions establish expected agent behavior. The server-side transaction service must still reject invalid, stale, unapproved or unauthorized requests even if a prompt is ignored, the model chooses a different tool, or the conversation is manipulated.
Step 14. Verify the tool's registered input and description.
Reopen the tool details and inspect the description, guidelines and parameters exposed to the model. The agent should have access to the review operation but should not be able to set its own approval decision. Keep the actual decision within the human task and workflow data.
Checkpoint: The active agent can select the review tool, and its configuration distinguishes the submission request from the eventual human outcome.
Phase 6 — Complete the callback and correlation contract
Step 15. Use the native Human in the Loop callback mechanism.
For this build, do not add a manual Callback AI agent operation to the workflow-calling integration. Oracle documents that callback handling is automatic for Human in the Loop. The separate callback action is for an asynchronous agentic tool that does not call Human in the Loop.
The generic asynchronous callback contract is nevertheless important when designing other tools in the same project. Oracle documents these concepts and mappings:
| Generic callback field | Purpose | Source of truth |
|---|---|---|
conversationId | Identifies the agent conversation to resume. | Runtime callback URI or the actual agent conversation details. |
| Tool Flow ID | Correlates the asynchronous tool execution. | Runtime tool instance ID captured by the integration. |
| Tool Invoke Event ID | Required mapping in the documented generic callback operation. | Oracle's generic callback guide says to use the same runtime instance ID as Tool Flow ID. |
| Payload | Returns the completed operation's result to the agent. | The actual result payload produced by the completed operation. |
In the native workflow path, let Oracle manage callback routing. Separately establish a business correlation record that relates request_id, draft_id, draft_version, workflow instance ID, execution/idempotency key and target transaction ID once available.
For a production-grade prototype, keep the decision and transaction record in a durable store accessible to the finalization control. The finalizer must validate the actual approval record and current draft version rather than trust an approved: true value supplied by a model or requester. The specific API or persistent-store mechanism is target-dependent and remains an implementation dependency in this tutorial.
Checkpoint: You can identify the actual workflow instance and agent conversation associated with a test request. For this native Human in the Loop implementation, a separately authored callback integration is not part of the core path.
Phase 7 — Complete the review and inspect runtime evidence
Step 16. Run the agent with a controlled synthetic draft.
Run the active agent from the project's AI Agents workspace and submit a prompt that refers to the prepared draft. A sample prompt is:
Submit draft DRAFT-0042 for human procurement review.
Use its canonical version and business data. Do not create
or finalize the purchasing transaction before approval.
Inspect the agent activity stream and confirm which tool was actually selected, which arguments were sent, and the returned tool status. Then inspect the project's Human in the Loop observation view for the corresponding workflow instance.
Step 17. Complete the assigned human task.
Open the workflow instance, view its activity stream, and use the Open in workspace link where available. In Process Automation Workspace, locate the task under Tasks, open the form, review the canonical draft fields, and record a decision.
For the positive test, approve the synthetic request and submit the form. After task completion, revisit the workflow activity stream and examine its task history and output payload. Oracle documents that this payload exposes the response sent to the AI agent.
See Complete Assigned Task as a User and Monitor a Workflow.
Phase 8 — Gate and execute the final business action
Step 18. Define the authoritative finalization boundary.
The target write must have a deterministic authorization check. At minimum, the controlled finalizer needs to establish that:
- The request ID resolves to the same canonical draft ID and current version that was reviewed.
- An authorized workflow decision exists for that exact request and says approved.
- The draft has not changed since the reviewed version, or the change was re-reviewed through the required process.
- The caller is permitted to execute this business operation and all target-side validations pass.
- The transaction key has not already been committed, and an uncertain prior outcome has been reconciled.
There are two acceptable implementation patterns, depending on the supported operations in the workflow and the target architecture:
Pattern A — Workflow-controlled execution: The approved workflow path invokes a protected integration to finalize the exact reviewed draft, and the rejection path never calls it. This is suitable when the workflow's supported activities and authorization model can implement that path.
Pattern B — Persisted-decision validation: The workflow decision is written to a durable authoritative record, and a separate finalizer retrieves and validates that record before applying the transaction. Do not enable the finalizer until the decision persistence and lookup contract is implemented and tested.
Do not make the model's next tool choice the only mechanism preventing an unapproved write. Do not expose a privileged finalizer as an unrestricted agent tool. Any workflow activity, API, credential and integration required for authoritative decision persistence is a genuine dependency to configure and verify for the actual target.
For this tutorial, the actual purchase-order creation step remains BLOCKED until an authorized target system and one of the above enforcement patterns are configured. The workflow and agent callback can be tested independently with synthetic data; a final transaction must be verified against the target system, not inferred from the agent's statement.
Checkpoint: An approval result alone cannot execute a transaction. The finalizer requires authoritative approval and draft validation, plus duplicate protection and a target-side outcome check.
05. Test and Prove It
The correct test is not simply whether the agent answers politely after the task. Inspect the agent tool call, workflow activity stream, task input/output payloads, correlation record, finalization record and target result, where implemented. The table below defines the expected evidence; none of these tests has been executed for this article.
| Case | Expected behavior | Evidence to inspect |
|---|---|---|
| Valid draft, human approves | The workflow creates the task, the authorized reviewer approves, and the agent resumes with the workflow result. Transaction execution is allowed only through the validated finalization control. | Agent tool call and callback result; workflow task history/output payload; correlated request ID; finalizer logs and target transaction ID when that dependency is implemented. |
| Human rejects | The workflow returns a rejection outcome. No final purchasing transaction is committed. | Task outcome, rejection branch, absence of a finalizer commit, and target query for the request's transaction key. |
| Invalid or unknown draft | Validation fails before the approval task is issued. | Integration input, validation fault and absence of a matching approval task. |
| Reviewer has not responded | The task remains in progress; no approval or final transaction is assumed. | Workflow instance and task state, agent observation/activity stream, and the configured escalation deadline if one exists. |
| Duplicate review submission | The request is detected as already pending or completed according to the idempotency policy; no conflicting parallel review is created inadvertently. | Request ledger, workflow instance search, and idempotency key record. |
| Duplicate callback or resumption | A stale or repeated event must not create a second final transaction. Native callback routing and business-level duplicate protection are checked separately. | Actual agent status, callback/tool events where available, durable finalizer state and target transaction query. |
| Draft changes after review | The finalizer rejects a mismatched version or sends the changed draft through the required review again. | Reviewed and current draft versions, decision record and finalization validation. |
| Target write times out | The request is reconciled against the target before any retry. A timeout is not treated as proof that the write failed. | Target query by idempotency or business key, integration instance details and finalizer state. |
Record the execution status honestly in your lab notes. Use Not executed until there is actual runtime evidence. A valid design, an activated integration, a successful workflow, and a committed purchasing transaction are four different levels of evidence.
06. Troubleshooting and Recovery
| Symptom | Likely layer and targeted check | Correction / retest |
|---|---|---|
| The agent cannot select the review tool | Check that the integration is Active and that the tool was created and associated with the correct project AI agent. | Activate/fix the required asset and repeat tool discovery or the supported agent test. |
| The workflow action cannot invoke its target | Check workflow state/version, the configured Human in the loop action, and integration activation. | Correct the selected workflow/version or mapping and retry with a new synthetic request. |
| The reviewer receives an empty or incomplete form | Inspect the integration request, workflow start payload, task input mapping and form field associations. | Repair the mapping at the first boundary where the field disappears, then rerun the request. |
| The agent appears to wait indefinitely | Check whether the task is still In progress; then inspect the workflow activity stream and agent observation separately. | Complete or escalate the task under the approved policy; investigate an absent callback without creating another review blindly. |
| The agent says approved, but no target transaction exists | Inspect the workflow output, authoritative approval record, finalizer and target-system state independently. | Do not infer success from assistant text. Reconcile the actual transaction outcome and correct the incomplete path. |
| A retry risks a second transaction | Search by the target business key/idempotency key before retrying. | Recover the existing outcome or retry only according to the target's documented duplicate-safe contract. |
| A manual callback attempt is rejected or misrouted | Confirm whether this is the native Human in the Loop path or a separate generic asynchronous tool; inspect runtime IDs only for the latter. | Use native workflow callback handling for this design, or map the documented generic callback contract correctly for the separate tool. |
For workflow diagnosis, use the Monitor a Workflow procedure and inspect task input/output payloads. For agent-level diagnosis, use the project AI agent's activity and observation views; verify the actual tool response rather than relying on the assistant's final wording.
07. Enterprise Considerations
Identity and privilege. The person assigned the task must be an authorized reviewer. The identity used by the finalization service must have only the privilege required for that operation. Do not let a prompt, tool parameter, business key or callback payload grant authority.
Review exactly what will be executed. Bind the approved decision to the request ID, draft ID/version and canonical business fields. If the draft changes after review, reject the stale finalization attempt or require a new review. Otherwise, the system may execute a different request from the one the human actually approved.
Idempotency and uncertain outcomes. Persist the transaction key and outcome at the business execution boundary. A repeated agent message, callback, integration retry or uncertain response must not produce another purchasing transaction. Reconcile remote status before retrying a non-idempotent create operation.
Retention and audit. Preserve enough evidence to investigate who acted, when the decision was made, which version was reviewed, which callback/result reached the agent, and what the target system ultimately committed. Oracle's 26.10 release notes document publishing Human in the Loop activity stream logs to Oracle Log Analytics for longer-term visibility when that capability is enabled. See September 2026 (26.10) release notes.
Separate status layers. A workflow may be complete while the target write has failed; the target might have committed even if the caller did not receive its result. Report the final business state from authoritative target evidence rather than flattening these lifecycle states into one Boolean.
Change management. Re-test the callback path, payload mappings, approval conditions and target authorization when changing the agent tool description, workflow version, task form, finalizer, model pattern or downstream API. A text change in the agent can alter tool selection without changing the workflow's actual enforcement controls.
08. Completion Checklist and What Comes Next
Treat the prototype as complete only when the applicable items have evidence:
- [ ] The draft-preparation operation returns a valid canonical draft ID/version and does not commit the final transaction.
- [ ] The workflow and form are configured and active, with an authorized reviewer and explicit approval/rejection outcomes.
- [ ] The start-event, REST request, task/form and output payloads have valid, tested mappings.
- [ ] The active asynchronous integration invokes the intended workflow and is registered as an agentic AI tool.
- [ ] The agent's actual tool selection and arguments match the intended request contract.
- [ ] The reviewer can complete the task, and the activity stream exposes the task history and output payload.
- [ ] The agent resumes with the workflow result; a pending task is never presented as approved.
- [ ] Request, draft, workflow and transaction evidence can be correlated without confusing their identifiers.
- [ ] Rejection, delayed response, invalid request, duplicate submission and changed-draft behavior are tested.
- [ ] The finalization control enforces approval and draft/version checks, deduplicates writes, and reconciles uncertain outcomes.
- [ ] The target-system result is independently verified where the final write has been enabled.
The next sensible module is recovery and operational hardening: time-based escalation, interrupted conversations, durable decision persistence, retry/reconciliation design and longer-term audit evidence. These should extend the working approval path rather than substitute for its basic decision and correlation contracts.
Until the actual target and authoritative approval-to-execution handoff are configured and tested, mark that part of the prototype BLOCKED, not complete.
09. Five Useful FAQs
1. Does a successful review-tool call mean the procurement request is approved?
No. It means the tool call was processed according to its contract. The workflow may still be waiting for a reviewer. Approval requires the actual task outcome, and transaction success requires separate evidence from the controlled execution path and target system.
2. Do I need to create a separate callback integration for Human in the Loop?
Not for the native Human in the Loop integration path documented by Oracle. Callback handling is automatic for Human in the Loop. The separate Callback AI agent operation applies to asynchronous agentic tools that do not call Human in the Loop.
3. Can the agent select the person who approves the request?
The model should not be the authority for selecting a privileged approver. Configure a designated user or group, or use an authorized, governed routing expression. User-supplied and model-generated values must not elevate privilege.
4. What should happen if the reviewer has not responded or the callback is missing?
Keep the state pending until an authorized outcome exists, monitor the workflow and agent separately, and follow a defined escalation and reconciliation policy. Do not assume approval, repeatedly submit the same request, or retry a potentially non-idempotent write without first checking the authoritative target status.
5. How do I prove that the right request was approved and committed only once?
Correlate the request ID and canonical draft/version with the workflow instance and task outcome, then inspect the finalizer's durable idempotency record and the target transaction ID/status. Workflow completion alone cannot prove that a business transaction was committed, and a model's final message is not authoritative execution evidence.
10. Verified References
The following Oracle pages were checked for the feature behavior and configuration decisions cited in this article. They do not establish that a particular tenant has been configured or tested.
- Enable Process Automation and Human in the Loop in Oracle Integration — Enterprise Edition prerequisite, feature enablement, associated Process Automation provisioning and required IAM setup.
- Human in the Loop for Agentic AI in Oracle Integration — workflow and form architecture and the integration/tool/agent sequence.
- Design an Integration to Call a Workflow — asynchronous integration requirement, REST POST trigger, JSON payload, Human in the loop action and field mapping.
- Create an Agentic AI Tool Using the Integration — active integration prerequisite, tool creation and tool parameters.
- Configure Tasks — outcome, assignee, task title, priority and active form requirements.
- Model Approval Patterns — tiered and parallel approvals.
- Model Tiered Approvals — task outcome routing through an if/else gateway and mapping workflow payloads.
- Complete Assigned Task as a User — task completion, activity stream and task input/output payloads.
- Monitor a Workflow — workflow instance states and runtime evidence.
- Edit Workflow Information — instance identifier, business key and workflow expiry settings.
- Send a Response to an AI Agent with a Callback — generic asynchronous tool callback behavior and required callback mappings; specifically distinguishes tools that do not call Human in the Loop.
- July 2026 (26.07) release notes — asynchronous agentic AI callback operation and Human in the Loop approval-pattern additions.
- September 2026 (26.10) release notes — Human in the Loop activity-stream logging and business-key features for the reference release.
No procurement-target API specification was selected because the target system and its available assets were not supplied. No approval ledger, tenant-specific execution trace, API test, callback trace, or successful final transaction is claimed.
11. Finally — Summary
Human review turns an AI agent's recommendation into a controlled business process only when responsibilities remain separate. The draft-preparation integration owns the canonical request; the workflow routes the task and records the authorized human decision; the asynchronous agentic tool connects the agent to that workflow; and the callback allows the waiting agent to continue with the result.
The most important implementation lesson is that correlation, approval and transaction execution are not interchangeable. Use Oracle's native Human in the Loop callback handling for the workflow path, preserve business-level request and draft identifiers for reconciliation, and validate the authoritative approval and current draft at the finalization boundary. Rejection must not write, delays must not become approvals, and retries must not duplicate a committed transaction.
The configuration sequence and synthetic contracts in this article provide a concrete implementation plan. The runtime claims become proven only after the workflow, assigned task, callback response, finalization controls and target-system evidence have been inspected in the actual environment. The next module should harden the completed path with operational escalation, interruption recovery, idempotency and durable audit evidence.

Comments
Post a Comment