Skip to main content

Flow when SRWRuntime Invokes Services with Registered Commands

  1. A Red App registers the service EMU_RESPONSE with the action code 1LASLAX. SRWRuntime invokes the Red App's service when it receives a response for the 1LASLAX command.

  2. When a response for the registered command arrives, SRWRuntime tries to invoke a service that is registered with the name EMU_RESPONSE and an action code that matches the command that is associated with the response.

  3. SRWRuntime ignores leading and trailing white spaces in the command. If the command exceeds 20 characters, SRWRuntime drops the last character. SRWRuntime tries to find a command that matches the action code.

  4. If SRWRuntime finds a matching command, it executes the service that is associated with the command.

  5. If SRWRuntime does not find a matching command, it drops the last character in the command and tries to invoke a service with a command that matches the action code again. Whenever SRWRuntime finds a matching command, it executes the service that is associated with the command.

  6. SRWRuntime continues this loop until no characters in the command remain.

  7. If SRWRuntime does not find a service, it executes the registered service without an action code.

An example of how SRWRuntime loops through the registered command and drops the last character follows. SRWRuntime executes the service in the step in which it finds a matching command.

  1. Service name EMU_RESPONSE has the action code 1LASLAX.

  2. Service name EMU_RESPONSE reduces the action code to 1LASLA.

  3. Service name EMU_RESPONSE reduces the action code to 1LASL.

  4. Service name EMU_RESPONSE reduces the action code to 1LAS.

  5. Service name EMU_RESPONSE reduces the action code to 1LA.

  6. Service name EMU_RESPONSE reduces the action code to 1L.

  7. Service name EMU_RESPONSE reduces the action code to 1.

  8. Service name EMU_RESPONSE eliminates the action code.