
package com.smartgwt.client.docs;

/**
 * <h3>Process Input and Output Schema</h3>
 * A Process can declare optional schemas for what it consumes as input and what it produces as
 * output on successful completion. These schemas let the engine validate wiring between a parent
 * Process and a sub-Process invoked via  SubProcessTask, and give subsystems like the Workflow
 * Editor and AI tools a precise description of the Process's interface. <p> <h4>Input schema</h4>
 * Declared via {@link com.smartgwt.client.util.workflow.Process#getInputDS Process.inputDS} (full
 * {@link com.smartgwt.client.data.DataSource}) or {@link
 * com.smartgwt.client.util.workflow.Process#getInputFields Process.inputFields} (shorthand Array
 * of {@link com.smartgwt.client.data.DataSourceField} used to build a temporary DataSource). When
 * a caller provides an input record (either at top-level via {@link
 * com.smartgwt.client.util.workflow.Process#start Process.start()} or through a  SubProcessTask),
 * the record is validated against the schema before the Process starts. On failure the Process
 * does not start; the caller receives a {@link com.smartgwt.client.util.workflow.ProcessFailure}
 * with <code>code:"inputValidation"</code>. <p> <h4>Output schema</h4> Declared via {@link
 * com.smartgwt.client.util.workflow.Process#getOutputDS Process.outputDS} or {@link
 * com.smartgwt.client.util.workflow.Process#getOutputFields Process.outputFields}. When the
 * Process reaches {@link com.smartgwt.client.util.workflow.Process#getHandleFinished
 * handleFinished} the engine computes the output value (see {@link
 * com.smartgwt.client.util.workflow.Process#getOutput Process.getOutput()}) and validates it
 * against the schema. A mismatch becomes a {@link
 * com.smartgwt.client.util.workflow.ProcessFailure} with <code>code:"outputValidation"</code>.
 * <p> <h4>Recoverable vs infrastructure errors</h4> Recoverable errors that are part of the
 * Process's normal behavior belong inside the declared <code>outputDS</code> (for example as
 * nullable <code>errorCode</code>/<code>errorMessage</code> fields). Infrastructure failures (AI
 * unavailable, JS exceptions, input/output schema mismatches, cancellation, ancestor-cycle
 * deadlocks) travel through the distinct {@link com.smartgwt.client.util.workflow.Process#failed
 * Process.failed()} channel as a {@link com.smartgwt.client.util.workflow.ProcessFailure} record.
 */
public interface ProcessIO {
}
