auth::sync::process_doc::ims::GetAcknowledgementDocument (private)
auth::sync::process_doc::ims::GetAcknowledgementDocument job_id \ document parameters
Defined in packages/acs-authentication/tcl/sync-procs.tcl
Generates an record-wise acknowledgement document in home-brewed adaptation of the IMS Enterprise v 1.1 spec.
- Parameters:
- job_id (required)
- document (required)
- parameters (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- auth_sync_process_ims_implementations
Source code: set tree [xml_parse -persist $document] set root_node [xml_doc_get_first_node $tree] if { [xml_node_get_name $root_node] ne "enterprise" } { $tree delete error "Root node was not <enterprise>" } set timestamp [xml_get_child_node_content_by_path $root_node { { properties datetime } }] $tree delete append doc {<?xml version="1.0" encoding="} [ns_config "ns/parameters" OutputCharset] {"?>} \n append doc {<enterprise>} \n append doc { <properties>} \n append doc { <type>acknowledgement</type>} \n append doc { <datetime>} $timestamp {</datetime>} \n append doc { </properties>} \n array set recstatus { insert 1 update 2 delete 3 } # Loop over successful actions db_foreach select_success_actions { select entry_id, operation, username from auth_batch_job_entries where job_id = :job_id and success_p = 't' order by entry_id } { if { [info exists recstatus($operation)] } { append doc { <person recstatus="} $recstatus($operation) {">} \n append doc { <sourcedid><source>OpenACS</source><id>} $username {</id></sourcedid>} \n append doc { </person>} \n } else { ns_log Error "Illegal operation encountered in job action log: '$operation'. Entry_id is '$entry_id'." } } append doc {</enterprise>} \n return $docGeneric XQL file: packages/acs-authentication/tcl/sync-procs.xql
PostgreSQL XQL file: packages/acs-authentication/tcl/sync-procs-postgresql.xql
Oracle XQL file: packages/acs-authentication/tcl/sync-procs-oracle.xql