Responding to Posted Critiques

After a critique is posted, if its ApprovalRequired variable has the value True, the critique must be sent to the designated approver. The following diagram shows what happens when a LitCrit critique is posted from Microsoft Outlook®:

The diagram showing the critique submission process can be found in the topic Defining the Form's Behavior.

When approval is necessary, the following steps are taken, several of them involving CDO. The code of referenced subroutines can be found in the LitCrit_Agent.asp file.

To send a critique for approval

  1. Open the Outbox, the folder in which to create a new message. In the GetEventDetails subroutine, see:
    Set fldrOutbox = CDOSession.Outbox
    
  2. Using CDO, open the posted critique. In the GetEventDetails subroutine, see:
    Set msgTarget = CDOSession.GetMessage( idTargetMessage, Null )
    Where idTargetMessage =  EventDetails.MessageID and
    Null designates the default store
    
  3. The GetPropertiesFromLitCrit supporting function retrieves all the field values associated with a posted message.
  4. Choose the recipient of this new message, namely the administrator identified in the CML/LitCrit application's AppSettings.asp page. Resolve this name in the Microsoft® Exchange Server global address list, using CDO. In the SendApproverForm subroutine, see:
    msgResponse.Recipients.Resolve(False)
    
  5. Using CDO, instantiate an IPM.Post.ToApprover message. Again with CDO, retrieve the values of the fields on the posted critique and add all appropriate fields (with their values) to this new ToApprover form. See the CopyToApprover subroutine.
  6. Send the ToApprover form, using CDO. In the SendApproverForm subroutine, see
    msgResponse.Send
    
  7. Delete the critique from the public folder, using CDO. In the MakeResponseMessage subroutine, see
    msgTarget.Delete
    

The supporting functions that perform these tasks are called from the subroutine that responds to the Folder_OnMessageCreated event.