Synchronous and Asynchronous Operations |
|
|
Most of the low-level processes of the Actor adapter provide two modes of operation: synchronous or asynchronous. The user can choose in which mode to operate with the <synchronous> tag. The valid values for the <synchronous> tag are 'yes' or 'no'. By default, the low level processes operate in synchronous mode. In asynchronous mode (<synchronous>no</synchronous>), the process sends the request to the EMC SMI-S Provider which creates a corresponding job. The process returns immediately after the creation of the job and does not wait for the completion of the job. In this mode, the process (create-lun for example) only returns a job ID (once the input parameters have been validated and accepted by the EMC SMI-S Provider). It is necessary to use the get-job process to check on the completion of the job (which can take several minutes). It is also possible to use the Monitor adapter to be notified once the specified job is completed. In synchronous mode (<synchronous>yes<synchronous>), the process sends the request to the EMC SMI-S Provider and then wait for the completion of the job returned by the EMC SMI-S Provider. The process does not return until job completes (successfully or with an error) or the timeout is reached. In general, it is recommended to use the synchronous mode as it ensures that consecutive actions in a workflow are processed in the correct order. |