code: protected void auditProvideAndRegisterEvent(
  			IHETransactionEventTypeCodes transaction, RFC3881EventOutcomeCodes eventOutcome, 
  			String repositoryEndpointUri,
              String userName,
  			String submissionSetUniqueId, 
  			String patientId,
              List<CodedValueType> purposesOfUse,
  			List<CodedValueType> userRoles)
  	{
  		ExportEvent exportEvent = new ExportEvent(true, eventOutcome, transaction, purposesOfUse);
  		exportEvent.setAuditSourceId(getAuditSourceId(), getAuditEnterpriseSiteId());
  		/*
  		 * FIXME:  Overriding endpoint URI with "anonymous", for now
  		 */
  		String replyToUri = "http://www.w3.org/2005/08/addressing/anonymous";
  		//String replyToUri = getSystemUserId();
  		
  		
  		exportEvent.addSourceActiveParticipant(replyToUri, getSystemAltUserId(), getSystemUserName(), getSystemNetworkId(), true);
  		if (!EventUtils.isEmptyOrNull(userName)) {
  			exportEvent.addHumanRequestorActiveParticipant(userName, null, userName, userRoles);
  		}
  		exportEvent.addDestinationActiveParticipant(repositoryEndpointUri, null, null, EventUtils.getAddressForUrl(repositoryEndpointUri, false), false);
  		if (!EventUtils.isEmptyOrNull(patientId)) {
  			exportEvent.addPatientParticipantObject(patientId);
  		}
  		exportEvent.addSubmissionSetParticipantObject(submissionSetUniqueId);		
  		audit(exportEvent);
  	}
docs: Generically sends audit messages for XDS Document Source Provide And Register Document Set events
  
  @param transaction The specific IHE Transaction (ITI-15 or ITI-41)
  @param eventOutcome The event outcome indicator
  @param repositoryEndpointUri The endpoint of the repository in this transaction
  @param submissionSetUniqueId The UniqueID of the Submission Set provided
  @param patientId The Patient Id that this submission pertains to
  @param purposesOfUse purpose of use codes (may be taken from XUA token)
  @param userRoles roles of the human user (may be taken from XUA token)