LEARNING / PRACTICAL COLLECTIONS

Collect every page and check completeness

The lookup returns two equipment options, but the sample catalog contains six. The call succeeded; the answer is still incomplete. Build a bounded pagination flow and make completeness visible instead of assuming the first page is the whole result.

Fictional learning examples, based on public 26D references. These exercises run in your browser and do not connect to Fusion. The configuration checkpoints are planning guidance, not a verified end-to-end Fusion lab.

G02 / 26D REFERENCE

What you’ll take away

Recognize a pagination contract, collect all expected pages and refuse to label partial data complete.

30-45 min · Time estimate, excluding access and setup.

Start with: Turn messy input into a dependable request.

TRY THE IDEA

A small browser exercise

Explore the sample behavior before considering a sandbox build.

THE CONTRACT

Worked example

Record count

6

Page size

2

Offsets

[
  0,
  2,
  4
]

Page contents

[
  [
    "EQ-01",
    "EQ-02"
  ],
  [
    "EQ-03",
    "EQ-04"
  ],
  [
    "EQ-05",
    "EQ-06"
  ]
]

Complete result

{
  "received": 6,
  "unique": 6,
  "complete": true
}

When a page fails

Offset 2 fails; retain a partial-data warning and do not state that all six records were retrieved.

RECORDED STUDIO REHEARSAL

Try the rehearsed native-loop fixture

This separate Studio rehearsal uses an authored equipment array. It makes no REST calls, reads no Fusion business data and needs no credentials. The browser exercise above remains an independent teaching activity. A synthetic unavailable-page marker is not a reproduced HTTP outage.

  1. Create a learner-owned draft workflow. Add Build Page Requests (Code, BUILD_PAGE_REQUESTS), Fetch Fixture Pages (native For Loop, FETCH_FIXTURE_PAGES), Collect Pages (Code, COLLECT_PAGES) and Return Final Result (Return). Set each Code return type to Object.
  2. Connect Start to Build Page Requests, then Fetch Fixture Pages, Collect Pages and Return Final Result. Put the page reader inside the native loop container, not beside it on the outer canvas; connect the native container start to that reader. Do not manufacture start/end nodes or substitute a JavaScript loop for this native For Loop.
  3. Paste paging-plan.js into Build Page Requests. The fixture validates its count and page size and caps requests at five pages.
  4. Set the For Loop Collection to {{$context.$nodes.BUILD_PAGE_REQUESTS.$output.result.pages}} and Processing Mode to Sequential. Add a Code child named Read Fixture Page (READ_FIXTURE_PAGE) inside it and paste paging-read.js. Each iteration uses FETCH_FIXTURE_PAGES.$currentItem.
  5. Paste paging-collect.js into Collect Pages. This tested runtime exposed an array of serialized Code envelopes; the collector parses each envelope and reads result.items. Inspect the actual output shape in your own environment before adapting the example.
  6. Set Return Final Result to {{$context.$nodes.COLLECT_PAGES.$output.result}}. Use Debug, with no pins or temporary overrides, and send each of the eight mode names below as a separate input message.
  7. Compare actual results with the recorded fixture results. Inspect both total received rows and unique IDs. Keep synthetic fixture testing separate from testing your chosen read-only API and its documented contract. Leave the draft unpublished unless you have a separate reason to publish it.

Fictional source and recorded results

Input modeExpected countReceivedUniqueCompleteObserved reason
complete666trueAll expected fixture records were collected exactly once.
partial644falseIncomplete fixture collection; inspect missing IDs, duplicates and failed offsets.
duplicate664falseIncomplete fixture collection; inspect missing IDs, duplicates and failed offsets.
zero000trueAll expected fixture records were collected exactly once.
one111trueAll expected fixture records were collected exactly once.
short555trueAll expected fixture records were collected exactly once.
missing-countMissing00falseMissing total count.
invalid-page-size600falseInvalid page size.

Recorded fixture results are evidence for this source and configuration. Recheck after changes and validate your chosen API separately.

RECOGNIZE THE CONTROLS

Inside AI Agent Studio

Actual UI controls from other example artifacts. These images do not show the fictional Starter Ready build running. Visible configuration is not execution evidence; labels and availability vary by release and permissions.

Find workflow control nodes

Find workflow control nodes in Oracle AI Agent StudioEnlarge screenshot

The component palette shows available workflow control nodes. It is not a configured or executed pagination loop.

Look for: Locate loop and branch controls; follow the lesson and official node documentation for the actual paging design.

Configure the native loop

Configure the native loop in the fictional pagination fixture.Enlarge screenshot

The tested fixture uses a native For Loop with a collection of planned page requests and Sequential processing. It reads an authored list, not a live REST endpoint.

Look for: Read the Collection expression and Processing Mode.

Place the page reader inside the container

Place the page reader inside the container in the fictional pagination fixture.Enlarge screenshot

The Code reader sits inside the native loop and uses its current item. The downloadable source contains the complete fictional array and mode behavior.

Look for: Check the container boundary and the current-item reference.

Inspect the executed loop envelope

Inspect the executed loop envelope in the fictional pagination fixture.Enlarge screenshot

The actual loop input contains offsets 0, 2 and 4. The output contains the corresponding Code envelopes. The downloadable collector reflects the observed runtime representation.

Look for: Inspect the actual input and output instead of assuming a universal wrapper.

Inspect the last page

Inspect the last page in the fictional pagination fixture.Enlarge screenshot

The child-node inspector displays offset 4 with EQ-05 and EQ-06 from the complete fixture. This view is one iteration, not the entire collected catalog.

Look for: Compare offset 4 and its two returned items.

Verify all expected fixture records

Verify all expected fixture records in the fictional pagination fixture.Enlarge screenshot

The actual native fixture returned received=6, unique=6 and complete=true. This is not evidence of a live API integration.

Look for: Find all six unique equipment IDs and the completeness fields.

Keep an unavailable page visible

Keep an unavailable page visible in the fictional pagination fixture.Enlarge screenshot

The authored page reader marked offset 2 unavailable. The actual result retained four records and complete=false; no real HTTP outage was induced.

Look for: Find failedOffsets [2] and missing IDs EQ-03/EQ-04.

Reject repeated pages

Reject repeated pages in the fictional pagination fixture.Enlarge screenshot

The actual repeated-page case returned six rows but only four unique IDs, with complete=false.

Look for: Check duplicate IDs as well as row count.

Accept a genuinely empty catalog

Accept a genuinely empty catalog in the fictional pagination fixture.Enlarge screenshot

The zero-count plan contains no page requests. The recorded native result has received=0, unique=0 and complete=true.

Look for: Distinguish zero known records from a missing count.

Accept the final short page

Accept the final short page in the fictional pagination fixture.Enlarge screenshot

Five expected records at page size two completed with a final one-record page.

Look for: Compare the declared count with the five unique IDs.

Reject invalid pagination input

Reject invalid pagination input in the fictional pagination fixture.Enlarge screenshot

Page size zero was rejected before building page requests. The result is incomplete and includes Invalid page size.

Look for: Read the validation reason instead of treating an empty collection as success.

BUILD CHECKPOINTS

Plan the sandbox version

  1. Read the chosen API documentation: identify count/offset, cursor or next-link behavior. This lesson uses only the authored count-and-offset fixture.
  2. Plan count probe → calculate offsets → bounded iteration → collect records → validate completeness → return result.
  3. For six records and page size two, request offsets 0, 2 and 4. Keep the count probe out of the collected records.
  4. Track requested pages, received IDs and failures. Cap page requests using a deliberately configured lab ceiling.
  5. Treat changed totals, repeats or a failed page as incomplete. Do not claim a consistent snapshot unless the source guarantees it.

Expected outcome

All six unique IDs appear once in the complete fixture. A missing or repeated page produces an explicit incomplete result.

CHECK YOUR WORK

What needs to hold true?

Use this checklist for your own review. It is not an automated test result.

Sample policy, catalog and test inputs (JSON)

Before working in a sandbox
  • Complete G01.
  • A read-only test endpoint or approved function with a documented pagination contract; otherwise use the supplied paper/browser fixtures.

The CoE example is from 26A; 26D lists While Loop. A separate native For Loop fixture was executed against an authored equipment array with eight acceptance cases. It does not validate live API credentials, transport failures, source consistency guarantees, cursor pagination or performance.

READ THE SOURCE

Official references

Product facts come from public Oracle sources. Sample rules, data, tests and experiments are original teaching examples.

FIND YOUR NEXT STEP

Search & Ask

Search the guides, articles, books, and updates on this site.

Answers use this site’s published text and resource descriptions. Linked documents aren’t read automatically.

Search stays on this device. Optional AI may require a browser-managed model download.