Skip to content

Main content

Workflow Reentry Loop Count Tool

Count returns to a previously visited state after a different state, ignoring consecutive repeats.

Loading tool…

Description

Track previously seen state tokens.

Administrative records depend on literal identifiers, numbering conventions, check alphabets and ownership mappings. A duplicate count, check symbol or one-hop route helps reconcile metadata without authenticating a document or establishing who has authority over it. A well-formed label can still refer to the wrong record.

Track previously seen state tokens.

When to use this tool

Use Workflow Reentry Loop Count when checking the stated administrative key, numbering, continuity or routing convention.

How to use the tool and how it works

  1. Enter stateTokens. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read reentries, distinctStates. Use the output convention below.

Track previously seen state tokens. Count a reentry when a state has occurred before and differs from the immediately preceding token; return distinct state count too.1

Input fieldMeaning and unitsAccepted input
stateTokensState TokensRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
Output fieldInterpretationReturned shape
reentriesReturns to an already seen state after a different immediate state; consecutive repeats do not count.Required. Safe integer.
distinctStatesDistinct StatesRequired. Safe integer.
json
{
  "input": {
    "stateTokens": [
      "A",
      "B",
      "A",
      "A",
      "B"
    ]
  },
  "output": {
    "reentries": 2,
    "distinctStates": 2
  }
}

Limitations and assumptions

  • Consecutive repeats do not count as loops; this counts returns to labels rather than proving a workflow cycle or process inefficiency.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Use authoritative source records and the complete applicable document/process scheme for actual identity, routing or integrity decisions.

References

  1. Calculation and input contract: administrative-science/workflow-reentry-loop-count — tool.io

Similar or alternative tools

  • Form Repeated Field Count

    Return distinct literal field IDs and fieldIds.length-distinct count as repeated occurrences.

  • Form Field Reuse Count

    Optionally lowercase both field lists, deduplicate them and return shared fields in first-list encounter order and their count.