A_ValidateCmdAndCheckAuth
This action parses the Command ISF and retrieve Command Type, and target object type, id, status, status time stamp and auth required flag.
If the ISF claims authorisation is not required, the database is checked to confirm this. If the command
is RefreshCache or ToggleTracing Raise the event E_NoCmdAuthorityRequired, as no authorisation is necessary
for these commands. Otherwise
- Locate & lock the target object(s). (this makes step 2 thread safe).
- Check that there are no other commands pending against the target object(s). For example, command object where state <> S_InTxnComplete OR S_InTxnFailed.
- Insert 'TARGETS' Obj Rel to tgt Obj(s).
- Check that the target object(s) are not updated since the command was issued by Ops. (its Status and Status time stamp match the values in the isf command if specified).
- If validation failed (All trgt Objs failed or 1 failed & STRICT validation enabled) raise the E_ValFail event.
- If AuthRequiredFlag is TRUE (Authorization of the command transaction is required) Raise the event E_CmdAuthorityRequired Otherwise Raise the event E_NoCmdAuthorityRequired.