
package com.smartgwt.client.docs;

/**
 * <h3>Server-Side Process Execution</h3>
 * <b>Server-Side Process Execution</b> <P> {@link
 * com.smartgwt.client.docs.serverds.OperationBinding#process OperationBinding.process} allows a
 * declarative {@link com.smartgwt.client.util.workflow.Process} workflow to execute server-side
 * as an alternative to {@link com.smartgwt.client.docs.serverds.OperationBinding#script
 * OperationBinding.script} or a {@link com.smartgwt.client.docs.serverds.ServerObject DMI}.  The
 * workflow is defined in the same XML format used by the {@link
 * com.smartgwt.client.tools.WorkflowEditor}, making it visually editable by non-programmers. <P>
 * <b>When to Use Each Approach</b> <table border=1 cellpadding=4> <tr><th>Approach</th><th>Best
 * For</th><th>Editable?</th></tr> <tr><td><code>process</code></td>     <td>Multi-step
 * declarative logic: validate, branch, CRUD     across DataSources, send email</td>     <td>Yes
 * (WorkflowEditor)</td></tr> <tr><td><code>script</code></td>     <td>Imperative logic: complex
 * calculations, string     manipulation, calling Java APIs directly</td>     <td>Code
 * only</td></tr> <tr><td>DMI (serverObject)</td>     <td>Heavy Java logic: third-party library
 * integration,     complex transactions, performance-critical paths</td>     <td>Code
 * only</td></tr> </table> <P> <b>Input State</b> <P> The process receives automatic input state
 * from the DSRequest: <ul> <li><code>criteria</code>: Request criteria</li>
 * <li><code>values</code>: Request values (add/update)</li> <li><code>oldValues</code>: Previous
 * values (update)</li> <li><code>operationType</code>: "fetch", "add", "update", or    
 * "remove"</li> <li><code>dsName</code>: DataSource ID</li> <li><code>operationId</code>: The
 * operationBinding's     operationId</li> </ul> These are available in {@link
 * com.smartgwt.client.docs.TaskInputExpression TaskInputExpressions} as <code>$criteria</code>,
 * <code>$values</code>, etc. <P> <b>Output / Response</b> <P> The process produces a DSResponse
 * via precedence: <ol> <li>If <code>process.state.dsResponse</code> is set &rarr;     used
 * directly</li> <li>Else, output of last {@link com.smartgwt.client.util.workflow.DSRequestTask}
 * that ran &rarr;     its dsResponse.data</li> <li>Else &rarr; empty STATUS_SUCCESS</li> </ol>
 * <P> <b>Error Handling</b> <P> If any task fails and has no {@link
 * com.smartgwt.client.util.workflow.DSRequestTask#getFailureElement
 * DSRequestTask.failureElement}, the process aborts immediately and returns STATUS_FAILURE.  If
 * the operation participates in a transaction ({@link
 * com.smartgwt.client.data.OperationBinding#getAutoJoinTransactions
 * OperationBinding.autoJoinTransactions}), the transaction rolls back. <P> <b>Server-Side Task
 * Compatibility</b> <P> Only tasks that operate on data, logic, or communication work
 * server-side.  UI tasks (FormSetValuesTask, ShowHideTask, GridFetchDataTask, etc.) are NOT
 * available and will log a warning if encountered. <P> <b>Performance</b> <P> Process execution
 * uses server-side JavaScript context pooling.  First invocation per pool slot incurs module
 * loading overhead; subsequent invocations reuse the pre-loaded context with near-zero overhead
 * beyond the actual DataSource operations.
     * @see com.smartgwt.client.docs.serverds.OperationBinding#process
     * @see com.smartgwt.client.docs.serverds.OperationBinding#script
 * @see com.smartgwt.client.util.workflow.DSRequestTask
 * @see com.smartgwt.client.util.workflow.DSFetchTask
 * @see com.smartgwt.client.util.workflow.DSAddTask
 * @see com.smartgwt.client.util.workflow.DSUpdateTask
 * @see com.smartgwt.client.util.workflow.DSRemoveTask
 * @see com.smartgwt.client.util.workflow.ScriptTask
 * @see com.smartgwt.client.util.workflow.DecisionTask
 * @see com.smartgwt.client.util.workflow.MultiDecisionTask
 * @see com.smartgwt.client.util.workflow.StateTask
 * @see com.smartgwt.client.util.workflow.StartProcessTask
 * @see com.smartgwt.client.util.workflow.EndProcessTask
 * @see com.smartgwt.client.docs.serverds.OperationBinding#process
 * @see com.smartgwt.client.util.workflow.Process#getDataSources
 * @see com.smartgwt.client.util.workflow.ScriptTask#getLanguage
 * @see com.smartgwt.client.util.workflow.ScriptTask#getDataSources
 */
public interface ServerProcess {
}
