3.1.5.2 Sequencing Rules

The following is a typical sequence for creating a RunspacePool and executing a pipeline on a server.

  1. The client MUST construct a RunspacePool and the RunspacePool MUST be in Opened state. Refer to section 3.1.4.1 for more details.

  2. When a RunspacePool is in the Opened state, RunspacePool specific messages—such as Set Maximum Runspaces (section 3.1.5.4.6), Set Minimum Runspaces (section 3.1.5.4.7), and Get Available Runspaces (section 3.1.5.4.11—can be sent to the server's RunspacePool. For more details about the exact messages that can be sent, see section 3.1.5.4.

  3. When a RunspacePool is in the Opened state, the client MAY send a pipeline message (section 3.1.5.4.10) to the server to start executing a pipeline on the server. Refer to section 3.1.4.3 for more details about the pipeline sequence.

  4. When the RunspacePool is in Opened state, the client MAY receive RunspacePool specific messages, such as the RUNSPACEPOOL_HOST_CALL message (section 3.1.5.4.15) and RUNSPACEPOOL_STATE message (section 3.1.5.4.9).

  5. When a pipeline is in Running state and a success response message for wxf:Command is received (section 3.1.5.3.4), the client MAY receive pipeline specific messages, such as the PIPELINE_OUTPUT message (section 3.1.5.4.19) and PIPELINE_HOST_CALL message (section 3.1.5.4.27). For more details about the exact messages that can be received, see section 3.1.5.4.

  6. The client MAY choose to stop a pipeline at any time using the wxf:Signal message (section 3.1.5.3.9), as long as the pipeline is in a Running state and a success response message for wxf:Command is received (section 3.1.5.3.4).

  7. A client MAY choose to close a RunspacePool and associated pipelines at any time, as long as the RunspacePool is in an Opened state.

  8. When a RunspacePool is in a Closed state, that specific RunspacePool is not allowed for executing pipelines.