You are not looking at the latest version of the documentation. Check it out there.
You are looking at draft pre-release documentation for the next release of Flows for APEX. Product features documented here may not be released or may have different behavior to that documented here. You should not make any purchase decisions based on this draft documentation..

AI-Driven Adhoc Sub Processes

AI-driven Adhoc Sub Processes are an Enterprise Edition capability built on the same AHSP base model used for manual subprocesses.

In other words, there is still only one BPMN object: the Adhoc Sub Process. The Enterprise Edition adds AI-enabled control modes that can evaluate the current situation, inspect the currently startable activities, and either recommend or choose what should happen next.

These AI-enabled modes include:

  • recommendation mode, where the AI suggests one or more next activities for a human to approve or discard
  • hybrid mode, where the AI can re-evaluate the subprocess during execution and act within configured guardrails
  • autonomous mode, where the AI can choose and dispatch the next activity without waiting for human approval at every turn

Editions: AI-driven Adhoc Sub Processes are available only in the Flows for APEX Enterprise Edition.

AI-Driven Does Not Mean Unstructured

The AI does not invent arbitrary activities.

It still operates within the structure defined by the AHSP model:

  • only activities defined in the Adhoc Sub Process can be selected
  • only currently startable activities can be chosen
  • activity inputs and outputs are still controlled by task parameters
  • the AHSP still finishes only when the completion condition is met

This is important because it keeps the Adhoc Sub Process auditable, bounded, and reviewable.

Enterprise AI Control Modes

Recommendation Mode

Recommendation mode is the most conservative AI-enabled operating style.

The AI evaluates the current situation and produces a recommendation set, but a human user stays in control of what actually gets started. The user can approve a recommended activity, approve several activities, or discard the recommendation and ask for a fresh review later.

This style is useful when:

  • users want decision support without giving up control
  • the subprocess is complex or information-rich
  • you want human oversight on every meaningful step
  • you are introducing AI into an Adhoc Sub Process for the first time

Hybrid Mode

In hybrid mode, the AI can participate more actively in the subprocess, re-evaluating the situation as work progresses and acting automatically where the model and guardrails allow it.

This style is useful when:

  • some decisions can safely be automated
  • the subprocess benefits from periodic or event-driven re-evaluation
  • users still want the option to intervene or take over when needed

Autonomous Mode

In autonomous mode, the AI can choose and dispatch the next activity without waiting for a human decision at every turn.

This style is useful when:

  • the subprocess is bounded and well modeled
  • activity contracts are clear
  • completion conditions are explicit
  • guardrails and monitoring are in place

The AI Decision Cycle

An AI-driven Adhoc Sub Process normally works as a repeated decision cycle:

  1. observe the current situation
  2. inspect the currently startable activities
  3. evaluate what is still unknown, unresolved, or required
  4. recommend or select the next activity
  5. execute the activity
  6. update the current situation
  7. check the completion condition

This means the quality of the Adhoc Sub Process model directly affects the quality of AI behavior.

Why Activity Design Matters Even More

For AI-driven Adhoc Sub Processes, each activity needs a clear contract.

The AI works better when activities have:

  • a good name
  • a clear description
  • explicit start conditions
  • well-defined input parameters
  • useful outputs
  • concise summary information about what changed

If activity contracts are weak, the AI has less context for making good decisions.

Current Situation and AI Context

The AI should be thought of as working from the same current situation that a skilled knowledge worker would use.

That current situation is built from:

  • process state
  • completed activity summaries
  • key outputs returned by activities
  • any unresolved questions or open lines of investigation

This is why high-quality activity summaries are important for autonomous control.

Completion Conditions and AI Control

AI autonomy must still be bounded by a clear completion rule.

Without a precise completion condition, an AI-driven Adhoc Sub Process can continue exploring activities without a strong definition of success.

For autonomous operation, completion conditions should therefore be especially explicit and testable.

Guardrails and Limits

AI-driven Adhoc Sub Processes should always be designed with guardrails.

Typical guardrails include:

  • limiting execution to currently startable activities only
  • limiting total decision turns
  • controlling how often AI re-evaluates the subprocess
  • keeping clear audit history of what was recommended or selected
  • allowing human review or takeover where needed

These controls make autonomous operation safer and more understandable.

Relationship to Async Processing

In practice, AI-driven Adhoc Sub Process behavior often overlaps with background or async execution patterns.

If AI decisioning or activity dispatch runs outside the immediate user session, you should also consider the runtime behavior documented in Async Tasks and Background Execution.

Good Practice

For AI-driven Adhoc Sub Processes, good practice is to:

  • start from a well-designed manual Adhoc Sub Process
  • begin with recommendation mode before moving to hybrid or fully autonomous control
  • keep the activity set bounded and meaningful
  • design clear summaries for completed activities
  • make completion conditions concrete
  • keep explicit edition labeling and operational guardrails

Updated: