Unable to load Packaged App Document Library 0.91 in Apex 3
I have downloaded packaged application Document Library 0.91 from packaged applications URL and trying to import it into APEX 3.0.
In Application Builder I am getting an error message that 'Script has exceeded the maximum limit'. So I tried executing the install script as a application parsing schema, then it returned following error in SQL*Plus:
SQL> spool doclib_install.log
SQL> @doc_library_installer_0.91.sql
APPLICATION 12487 - Document Library 0.9
Set Credentials...
Illegal security group id value for this schema.
Check Compatibility...
API Last Extended:20070108
Your Current Version:20070108
This import is compatible with version: 20060224
COMPATIBLE (You should be able to run this import without issues.)
Set Application ID...
begin
ERROR at line 1:
ORA-20001: Package variable g_security_group_id must be set.
ORA-06512: at "FLOWS_030000.WWV_FLOW_API", line 45
ORA-06512: at "FLOWS_030000.WWV_FLOW_API", line 237
ORA-06512: at line 4
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.4.2 - Production
With the Partitioning, OLAP and Data Mining options
Am i missing anything or if anybody got a luck to install this app into Apex 3.0 pls. let me know how to resolve the above error?
Thanks & regards,
Preet
Preet,
Maybe we need to be more explicit in the readme. You need to "Import and install the doc_library_installer_0.91.sql ... Select to install supporting objects." This is from the Application Builder, select Import. Maybe you uploaded it as a script under the SQL Workshop? Those directions are in the readme for upgrading from the .9 version to the .91 version without losing your data.
-- Sharon
Similar Messages
-
Packaged App Document Library 0.91 installs with errors in Apex 3.0
Hello All,
I get these errors when I try to install Document Library packaged application in Apex 3.0
Script name success errors total
tab.sql 137 1 137
doclib.pkb 0 1 1
sync_index.sql 1 1 2
When I try to run the app, I am prompted for user name and password. I enter the user name I’ve selected during the install process as parsing schema, and I get this error:
ORA-04063: package body "DOADMIN.DOCLIB" has errors ORA-06508: PL/SQL: could not find program unit being called: "DOADMIN.DOCLIB"
ERR-1082 Error in executing authorization scheme code.
How can I find the object that caused errors during install? Is there any installation log?
Thank you,
DanielI’ve attempted to install the document library app into completely new workspace, with new parsing user. I still get the same errors:
Errors
tab.sql
create index doclib_docs_idx2 on doclib_documents(contents) indextype is ctxsys.context
ORA-29833: indextype does not exist
doclib.pkb
create or replace package body doclib as
g_html_email_header constant varchar2(4000) := '<html lang="en-us" xmlns:htmldb="http://htmldb.oracle.com">
<head>
<style type="text/css">
*{font-size:12px;font-family:Arial, Helvetica, Geneva, sans-serif;}
body{background-color:#fff;margin:0;padding:0;font-family:Arial, Helvetica, Geneva, sans-serif;font-size:12px;}
body *{font-size:12px;}
img{border:0;margin:0;}
hr{color:#bbb;height:1px;}
br{clear:both;}
p{font-size:12px;}
a:link,a:visited{text-decoration:none;font-size:-1;color:#7f7f7f;}
a:active,a:hover{text-decoration:underline;font-size:-1;color:#ff6600;}
</style>
<title></title>
<body>';
g_html_email_footer constant varchar2(30) := '</body></html>';
function get_member_id (
p_user_name in varchar2
) return number
is
l_user_id number;
begin
for c1 in (select user_id
from doclib_members
where upper(p_user_name) = user_name ) loop
l_user_id := c1.user_id;
end loop;
return l_user_id;
end get_member_id;
function get_member_email (
p_user_name in varchar2
) return varchar2
is
l_email varchar2(255);
begin
for c1 in (select email_address
from doclib_members
where upper(p_user_name) = user_name ) loop
l_email := c1.email_address;
end loop;
return l_email;
end get_member_email;
function get_acl_id (
p_user_name in varchar2
) return number
is
l_acl_id number := 0;
begin
for c1 in (select role_id
from doclib_members
where upper(p_user_name) = user_name ) loop
l_acl_id := c1.role_id;
end loop;
return l_acl_id;
return 3;
end get_acl_id;
function get_local_name (
p_filename in varchar2
) return varchar2
is
begin
return substr(p_filename,instr(p_filename,'/')+1);
end get_local_name;
function doc_is_checkedout_by (
p_doc_id in varchar2
) return varchar2
is
begin
for c1 in (select checkedout_by
from doclib_documents
where doc_id = p_doc_id ) loop
return c1.checkedout_by;
end loop;
return null;
end doc_is_checkedout_by;
function get_doc_name (
p_doc_id in varchar2
) return varchar2
is
begin
for c1 in (select name
from doclib_documents
where doc_id = p_doc_id ) loop
return c1.name;
end loop;
return null;
end get_doc_name;
function doc_already_exists (
p_name in varchar2
) return boolean
is
begin
for c1 in (select null
from doclib_documents
where name = p_name ) loop
return true;
end loop;
return false;
end doc_already_exists;
function alert_todo_already_exists (
p_user_id in number
) return boolean
is
l_found boolean := false;
begin
for c1 in (select null
from doclib_alerts a, doclib_alerts_todo b
where a.alert_id = b.alert_id
and a.doctask_id = 0
and a.user_id = p_user_id ) loop
l_found := true;
exit;
end loop;
return l_found;
end alert_todo_already_exists;
function parse_search_string(
p_search_str in varchar2 ) return varchar2
is
l_temp_value varchar2(1000);
l_temp_value2 varchar2(1000);
l_return_value varchar2(1000) := NULL;
l_start_token number := 1;
l_in_token boolean := FALSE;
l_quotes number;
l_phrases dbms_sql.varchar2s;
n number;
begin
if nvl(length(p_search_str),0) = 0 then
return NULL;
end if;
l_quotes := length(p_search_str) - length(replace(p_search_str,'"', ''));
if ( l_quotes > 0 and mod(l_quotes,2) = 0 ) then
l_temp_value2 := lower(p_search_str);
for i in 1 .. l_quotes/2 loop
n := instr( l_temp_value2, '"' );
l_temp_value := l_temp_value || substr( l_temp_value2, 1, n-1 );
l_temp_value2 := substr( l_temp_value2, n+1 );
n := instr( l_temp_value2, '"' );
l_phrases(i) := substr( l_temp_value2, 1, n-1 );
l_temp_value2 := substr( l_temp_value2, n+1 );
end loop;
l_temp_value := l_temp_value || l_temp_value2;
else
l_temp_value := lower(p_search_str);
end if;
l_temp_value := trim(replace( l_temp_value, ':', ' '));
l_temp_value := trim(replace( l_temp_value, ';', ' '));
l_temp_value := trim(replace( l_temp_value, '"', ' '));
l_temp_value := trim(replace( l_temp_value, ':'',', ' '));
l_temp_value := trim(replace( l_temp_value, '(', ' '));
l_temp_value := trim(replace( l_temp_value, ')', ' '));
l_temp_value := trim(replace( l_temp_value, '!', ' '));
l_temp_value := trim(replace( l_temp_value, '&', ' '));
l_temp_value := trim(replace( l_temp_value, '+', ' '));
l_temp_value := trim(replace( l_temp_value, '-', ' '));
l_temp_value := trim(replace( l_temp_value, ',', ' '));
l_temp_value := trim(replace( l_temp_value, '\', ' '));
l_temp_value := trim(replace( l_temp_value, ' and ', ' ' ));
l_temp_value := trim(replace( l_temp_value, ' or ', ' ' ));
if length(l_temp_value) > 0 then
l_in_token := TRUE;
end if;
for i in 1..nvl(length(l_temp_value),0) loop
if substr(l_temp_value,i,1) = ' ' then
if l_in_token = TRUE then
l_return_value := l_return_value || '{' || substr(l_temp_value,l_start_token, i-l_start_token) || '}' || ' and ';
l_in_token := FALSE;
end if;
elsif l_in_token = FALSE then
l_in_token := TRUE;
l_start_token := i;
end if;
end loop;
if l_in_token = TRUE then
l_return_value := l_return_value || '{' || substr(l_temp_value,l_start_token) || '} and ';
end if;
for i in 1 .. nvl(l_phrases.count,0) loop
l_return_value := l_return_value || ' {' || l_phrases(i) || '} and ';
end loop;
return trim( substr( l_return_value, 1, length(l_return_value)-4 ) );
end parse_search_string;
function doc_has_revisions (
p_doc_id in varchar2
) return number
is
l_revisions number := 0;
begin
for c1 in (select count(*) cnt
from doclib_documents
where deleted_as_of = to_date('22-04-2004','DD-MM-YYYY')
and revision_of = p_doc_id ) loop
l_revisions := c1.cnt;
end loop;
return l_revisions;
end doc_has_revisions;
function get_checkout_list (
p_user_name in varchar2
) return varchar2
is
l_chkout_lst varchar2(32000);
begin
for c1 in (select '<li>'||name||'</li>' name
from doclib_documents
where deleted_as_of = to_date('22-04-2004','DD-MM-YYYY')
and revision_of = 0
and checkedout_by = p_user_name ) loop
l_chkout_lst := l_chkout_lst || c1.name;
end loop;
if l_chkout_lst is null then
l_chkout_lst := 'None.';
else
l_chkout_lst := '<ul>'||l_chkout_lst||'</ul>';
end if;
return l_chkout_lst;
end get_checkout_list;
procedure return_xml (
p_doc_id in number,
p_action in varchar2,
p_message in varchar2,
p_chkout_lst in varchar2,
p_result in varchar2,
p_user_name in varchar2
is
begin
owa_util.mime_header('text/xml', FALSE );
htp.p('Cache-Control: no-cache');
htp.p('Pragma: no-cache');
owa_util.http_header_close;
htp.p('<div class="return" id="'||p_doc_id||'" action="'||p_action||'" result="'||p_result||'">');
htp.p('<div class="message" id="primary">'||p_message||'</div>');
htp.p('<div class="message" id="chkoutlst">'||p_chkout_lst||'</div>');
htp.p('<div id="checkoutby">'||p_user_name||'</div>');
htp.p('<div id="modifiedby">'||p_user_name||'</div>');
htp.p('</div>');
end;
procedure add_document (
p_doc_id in varchar2 default null,
p_name in varchar2 default null,
p_filename in varchar2,
p_user_name in varchar2,
p_description in varchar2,
p_attr1 in varchar2,
p_attr2 in varchar2,
p_attr3 in varchar2
is
l_content blob;
l_mime_type varchar2(48);
l_name varchar2(255);
begin
if get_acl_id(p_user_name) < 2 then
raise_application_error(-20001,'You are not authorized to add documents.');
end if;
if p_name is null then
l_name := get_local_name(p_filename);
for c1 in (select doc_id, name
from doclib_documents
where revision_of = 0
and name = l_name ) loop
--document already exists, so update it
update_document(c1.doc_id, c1.name, p_filename, p_user_name, p_description, p_attr1, p_attr2, p_attr3);
goto end_add;
end loop;
else
l_name := p_name;
end if;
for c1 in (select mime_type, blob_content
from apex_application_files
where name = p_filename ) loop
l_content := c1.blob_content;
l_mime_type := c1.mime_type;
end loop;
insert
into doclib_documents (doc_id, name, description, mime_type, contents, attr1, attr2, attr3)
values (p_doc_id, l_name, p_description, l_mime_type, l_content, p_attr1, p_attr2, p_attr3);
delete
from apex_application_files
where name = p_filename;
if p_name is null then
do_alerts('D',0,null);
end if;
commit;
<<end_add>>
null;
exception when others then
raise_application_error(-20001, 'Exception encountered adding document: '||sqlerrm);
end add_document;
procedure add_member (
p_user_name in varchar2,
p_member in varchar2,
p_email in varchar2,
p_acl_id in varchar2
is
begin
if get_acl_id(p_user_name) < 3 then
raise_application_error(-20001,'You are not authorized to add members.');
end if;
insert
into doclib_members (user_name, email_address, role_id)
values (p_member, p_email, p_acl_id);
commit;
exception when dup_val_on_index then
raise_application_error(-20001,'The user is already a member of this workspace.');
when others then
raise_application_error(-20001,'Exception encountered adding member: '||sqlerrm);
end add_member;
procedure add_task (
p_user_name in varchar2,
p_assigned_to in varchar2,
p_name in varchar2,
p_description in varchar2,
p_start_date in varchar2,
p_end_date in varchar2,
p_priority in varchar2,
p_status in varchar2,
p_pct_complete in varchar2,
p_doc_id in varchar2
is
l_start_date date;
l_due_date date;
begin
if get_acl_id(p_user_name) < 2 then
raise_application_error(-20001,'You are not authorized to add tasks.');
end if;
l_start_date := to_date(p_start_date,'DD-MM-YYYY HH24:MI');
l_due_date := to_date(p_end_date, 'DD-MM-YYYY HH24:MI');
insert
into doclib_tasks (assigned_to, name, description, start_date, due_date, priority_id, status_id, pct_complete, doc_id)
values (p_assigned_to, p_name, p_description, l_start_date, l_due_date, p_priority, p_status, p_pct_complete, p_doc_id);
do_alerts('T',0,null);
commit;
exception when others then
raise_application_error(-20001,'Exception encountered adding task: '||sqlerrm);
end add_task;
procedure add_link (
p_user_name in varchar2,
p_name in varchar2,
p_url in varchar2
is
begin
if get_acl_id(p_user_name) < 2 then
raise_application_error(-20001,'You are not authorized to add links.');
end if;
insert
into doclib_links (name, url)
values (p_name, p_url);
commit;
exception when others then
raise_application_error(-20001,'Exception encountered adding link: '||sqlerrm);
end add_link;
procedure add_announcement (
p_user_name in varchar2,
p_title in varchar2,
p_description in varchar2,
p_expire_date in varchar2
is
l_expire_date date;
begin
if get_acl_id(p_user_name) < 2 then
raise_application_error(-20001,'You are not authorized to add announcements.');
end if;
l_expire_date := to_date(p_expire_date,'DD-MM-YYYY HH24:MI');
insert
into doclib_announcements (title, description, expire_date)
values (p_title, p_description, l_expire_date);
commit;
exception when others then
raise_application_error(-20001,'Exception encountered adding announcement: '||sqlerrm);
end add_announcement;
procedure add_alert (
p_user_name in varchar2,
p_alert_type in varchar2,
p_alert_interval in varchar2,
p_doctask_id in varchar2
is
l_user_id number;
begin
l_user_id := get_member_id(p_user_name);
insert
into doclib_alerts (user_id, alert_type, alert_interval, doctask_id)
values (l_user_id, p_alert_type, p_alert_interval, p_doctask_id);
commit;
exception when others then
raise_application_error(-20001,'Exception adding alert: '||sqlerrm);
end add_alert;
procedure delete_alert (
p_alert_id in varchar2
is
begin
delete
from doclib_alerts
where alert_id = p_alert_id;
commit;
end delete_alert;
procedure do_alerts (
p_alert_type in varchar2,
p_doctask_id in number,
p_newdoc_id in number default null
is
l_subject varchar2(2000);
l_url varchar2(4000);
l_body clob;
l_body_html clob;
begin
l_body := ' ';
if p_alert_type = 'D' then
--Do document alerts on specific document
if p_doctask_id != 0 then
for c1 in (select c.email_address, c.user_id, b.name, a.alert_interval, a.alert_id
from doclib_alerts a, doclib_documents b, doclib_members c
where a.alert_type = p_alert_type
and a.doctask_id = b.doc_id
and a.user_id = c.user_id
and a.doctask_id = p_doctask_id ) loop
l_subject := 'Document '||c1.name||' has been updated.';
l_url := v('BASE_URL')||'/f?p='||v('APP_ID')||':2:::::P2_DOC_ID:'||p_newdoc_id;
l_body_html := g_html_email_header||'<p />'||l_subject||'<p />Click to view.'||
g_html_email_footer;
if c1.alert_interval = 'I' then
apex_mail.send(
p_to => c1.email_address,
p_from => c1.email_address,
p_body => l_body,
p_body_html => l_body_html,
p_subj => l_subject );
else --it is a daily alert, insert into todos
if not alert_todo_already_exists(c1.user_id) then --make sure non-specific daily alert isn't already recorded
insert
into doclib_alerts_todo (alert_id, alert_url)
values (c1.alert_id, l_url);
end if;
end if;
end loop;
update doclib_alerts
set doctask_id = p_newdoc_id
where alert_type = 'D'
and doctask_id = p_doctask_id;
end if;
--Do document alerts on generic documents
for c1 in (select c.email_address, c.user_id, a.alert_id, a.alert_interval
from doclib_alerts a, doclib_members c
where a.alert_type = p_alert_type
and a.doctask_id = 0
and a.user_id = c.user_id ) loop
l_subject := 'A document has been added or updated in the document workspace.';
l_url := v('BASE_URL')||'/f?p='||v('APP_ID')||':1';
l_body_html := g_html_email_header||'<p />'||l_subject||'<p />Click to view.'||
g_html_email_footer;
if c1.alert_interval = 'I' then
apex_mail.send(
p_to => c1.email_address,
p_from => c1.email_address,
p_body => l_body,
p_body_html => l_body_html,
p_subj => l_subject );
else --it is a daily alert, insert into todos
if not alert_todo_already_exists(c1.user_id) then --make sure non-specific daily alert isn't already recorded
insert
into doclib_alerts_todo (alert_id, alert_url)
values (c1.alert_id, l_url);
end if;
end if;
end loop;
else
if p_doctask_id != 0 then
--Do task alerts on specific tasks
for c1 in (select c.email_address, c.user_id, b.name, a.alert_interval, a.alert_id
from doclib_alerts a, doclib_tasks b, doclib_members c
where a.alert_type = p_alert_type
and a.doctask_id = b.task_id
and a.user_id = c.user_id
and a.doctask_id = p_doctask_id ) loop
l_subject := 'Task '||c1.name||' has been updated.';
l_url := v('BASE_URL')||'/f?p='||v('APP_ID')||':75:::::P75_TASK_ID:'||p_doctask_id;
l_body_html := g_html_email_header||'<p />'||l_subject||'<p />Click to view.'||
g_html_email_footer;
if c1.alert_interval = 'I' then
apex_mail.send(
p_to => c1.email_address,
p_from => c1.email_address,
p_body => l_body,
p_body_html => l_body_html,
p_subj => l_subject );
else --it is a daily alert, insert into todos
if not alert_todo_already_exists(c1.user_id) then --make sure non-specific daily alert isn't already recorded
insert
into doclib_alerts_todo (alert_id, alert_url)
values (c1.alert_id, l_url);
end if;
end if;
end loop;
end if;
--Do task alerts on generic tasks
for c1 in (select c.email_address, c.user_id, a.alert_id, a.alert_interval
from doclib_alerts a, doclib_members c
where a.alert_type = p_alert_type
and a.doctask_id = 0
and a.user_id = c.user_id ) loop
l_subject := 'A task has been added or updated in the document workspace.';
l_url := v('BASE_URL')||'/f?p='||v('APP_ID')||':1';
l_body_html := g_html_email_header||'<p />'||l_subject||'<p />Click to view.'||
g_html_email_footer;
if c1.alert_interval = 'I' then
apex_mail.send(
p_to => c1.email_address,
p_from => c1.email_address,
p_body => l_body,
p_body_html => l_body_html,
p_subj => l_subject );
else --it is a daily alert, insert into todos
if not alert_todo_already_exists(c1.user_id) then --make sure non-specific daily alert isn't already recorded
insert
into doclib_alerts_todo (alert_id, alert_url)
values (c1.alert_id, l_url);
end if;
end if;
end loop;
end if;
end do_alerts;
procedure do_alert_todos
is
l_subject varchar2(2000);
l_body clob;
l_body_html clob;
begin
wwv_flow_api.set_security_group_id;
l_body := ' ';
l_subject := 'Documents or tasks have been updated.';
for c1 in (select distinct(c.email_address), b.user_id
from doclib_members c, doclib_alerts b, doclib_alerts_todo a
where a.alert_id = b.alert_id
and b.user_id = c.user_id ) loop
l_body_html := g_html_email_header||'<p />The following documents or tasks have been added or updated.';
for c2 in (select b.alert_url
from doclib_alerts a, doclib_alerts_todo b
where a.alert_id = b.alert_id
and a.user_id = c1.user_id ) loop
l_body_html := l_body_html || '<p />'||c2.alert_url||'';
end loop;
l_body_html := l_body_html ||g_html_email_footer;
apex_mail.send(
p_to => c1.email_address,
p_from => c1.email_address,
p_body => l_body,
p_body_html => l_body_html,
p_subj => l_subject );
end loop;
delete from doclib_alerts_todo;
commit;
end do_alert_todos;
procedure update_document (
p_doc_id in varchar2,
p_name in varchar2,
p_filename in varchar2,
p_user_name in varchar2,
p_description in varchar2,
p_attr1 in varchar2,
p_attr2 in varchar2,
p_attr3 in varchar2
is
l_doc_id number;
l_checked_out_by varchar2(255);
l_mime_type varchar2(48);
l_cnt number;
l_num_over number;
begin
if get_acl_id(p_user_name) < 2 then
raise_application_error(-20001,'You are not authorized to update documents.');
end if;
l_checked_out_by := doc_is_checkedout_by(p_doc_id);
--this can be optimistic locking mechanism
if l_checked_out_by is not null and upper(l_checked_out_by) != upper(p_user_name) then
raise_application_error(-20001,'This document is locked by '||l_checked_out_by);
end if;
for c1 in (select mime_type
from apex_application_files
where name = p_filename ) loop
l_mime_type := c1.mime_type;
end loop;
for c1 in (select mime_type
from doclib_documents
where doc_id = p_doc_id ) loop
if l_mime_type != c1.mime_type then
delete
from apex_application_files
where name = p_filename;
raise_application_error(-20001,'The document type to be checked in does not match the document type of the original document.');
end if;
end loop;
if l_checked_out_by is not null then
checkin(p_doc_id, p_user_name);
end if;
l_doc_id := doclib_nextval;
add_document(l_doc_id, p_name, p_filename, p_user_name, p_description, p_attr1, p_attr2, p_attr3);
update doclib_documents
set revision_of = l_doc_id
where doc_id = p_doc_id;
l_cnt := 1;
for c1 in (select count(*) cnt
from doclib_documents
where revision_of != 0
and deleted_as_of = to_date('22-04-2004','DD-MM-YYYY') -- don't count logically deleted docs
and name = p_name ) loop
l_cnt := l_cnt + c1.cnt;
end loop;
--check whether we have hit max revisions as defined in workspace setting
if v('DOC_WORKSPACE_VERSIONS') != '0' and l_cnt > to_number(v('DOC_WORKSPACE_VERSIONS')) then
l_num_over := l_cnt - to_number(v('DOC_WORKSPACE_VERSIONS'));
for c2 in (select doc_id
from (select doc_id
from doclib_documents
where name = p_name
order by version_no)
where rownum <= l_num_over ) loop
delete
from doclib_documents
where doc_id = c2.doc_id;
end loop;
end if;
update doclib_documents
set revision_of = l_doc_id
where (revision_of != 0 or deleted_as_of != to_date('22-04-2004','DD-MM-YYYY'))
and name = p_name;
--preserve lock
if l_checked_out_by is not null then
update doclib_documents
set checkedout_by = l_checked_out_by
where doc_id = l_doc_id;
end if;
--do alerts
do_alerts('D',p_doc_id, l_doc_id);
--update tasks
update doclib_tasks
set doc_id = l_doc_id
where doc_id = p_doc_id;
commit;
exception when others then
raise_application_error(-20001,'Exception encountered updating document: '||sqlerrm);
end update_document;
procedure update_doc_attributes (
p_doc_id in varchar2,
p_user_name in varchar2,
p_description in varchar2,
p_attr1 in varchar2,
p_attr2 in varchar2,
p_attr3 in varchar2
is
begin
if get_acl_id(p_user_name) < 2 then
raise_application_error(-20001,'You are not authorized to update document attributes.');
end if;
update doclib_documents
set description = p_description,
attr1 = p_attr1,
attr2 = p_attr2,
attr3 = p_attr3
where doc_id = p_doc_id;
commit;
exception when others then
raise_application_error(-20001,'Exception encountered updating document attributes: '||sqlerrm);
end update_doc_attributes;
procedure checkout (
p_doc_id in varchar2,
p_user_name in varchar2
is
l_chkout_lst varchar2(32000);
begin
if get_acl_id(p_user_name) < 2 then
--raise_application_error(-20001,'You are not authorized to checkout documents.');
return_xml(p_doc_id,'CHECKOUT','You are not authorized to lock documents.',null,'FAILED',p_user_name);
return;
end if;
--This can be the optimistic locking scheme
if doc_is_checkedout_by(p_doc_id) is not null then
--raise_application_error(-20001,'This document is already checked out.');
return_xml(p_doc_id,'CHECKOUT','This document is already locked.',null,'FAILED',p_user_name);
return;
end if;
update doclib_documents
set checkedout_by = p_user_name
where doc_id = p_doc_id;
commit;
l_chkout_lst := get_checkout_list(p_user_name);
return_xml(p_doc_id,'CHECKOUT','Document successfully locked.',l_chkout_lst,'SUCCESS',p_user_name);
exception when others then
--raise_application_error(-20001,'Expection encountered checking out document: '||sqlerrm);
return_xml(p_doc_id,'CHECKOUT','Expection encountered checking out document: '||sqlerrm,null,'FAILED',p_user_name);
end checkout;
procedure checkin (
p_doc_id in varchar2,
p_user_name in varchar2
is
begin
if doc_is_checkedout_by(p_doc_id) is null then
raise_application_error(-20001,'This document is not locked.');
end if;
update doclib_documents
set checkedout_by = null
where doc_id = p_doc_id;
commit;
exception when others then
raise_application_error(-20001,'Exception encountered checking in document: '||sqlerrm);
end checkin;
procedure uncheckout (
p_doc_id in varchar2,
p_user_name in varchar2
is
l_checkedout_by varchar2(255);
l_chkout_lst varchar2(32000);
begin
l_checkedout_by := doc_is_checkedout_by(p_doc_id);
if l_checkedout_by is null then
--raise_application_error(-20001,'This document is not checked out.');
return_xml(p_doc_id,'UNCHECKOUT','This document is not locked.',null,'FAILED',p_user_name);
return;
end if;
--This can be optimistic locking scheme
if upper(l_checkedout_by) != upper(p_user_name) and get_acl_id(p_user_name) < 3 then
--raise_application_error(-20001,'You are not authorized to uncheckout this document.');
return_xml(p_doc_id,'UNCHECKOUT','You are not authorized to unlock this document.',null,'FAILED',p_user_name);
return;
end if;
update doclib_documents
set checkedout_by = null
where doc_id = p_doc_id;
commit;
l_chkout_lst := get_checkout_list(p_user_name);
return_xml(p_doc_id,'UNCHECKOUT','Unlock was successfull',l_chkout_lst,'SUCCESS',p_user_name);
exception when others then
--raise_application_error(-20001,'Exception encountered unchecking out document: '||sqlerrm);
return_xml(p_doc_id,'UNCHECKOUT','Exception encountered unlocking document: '||sqlerrm,null,'FAILED',p_user_name);
end uncheckout;
procedure update_member (
p_user_name in varchar2,
p_member_id in varchar2,
p_email in varchar2,
p_acl_id in varchar2,
p_retrieved in varchar2
is
l_retrieved date;
begin
l_retrieved := to_date(p_retrieved,'DD-MM-YYYY HH24:MI:SS');
if get_acl_id(p_user_name) < 3 then
raise_application_error(-20001,'You are not authorized to update members.');
end if;
--optimistic locking
for c1 in (select null
from doclib_members
where user_id = p_member_id
and updated_on > l_retrieved ) loop
raise_application_error(-20001,'The member has been updated since you retrieved the data. Refresh and try again.');
end loop;
update doclib_members
set email_address = p_email,
role_id = p_acl_id
where user_id = p_member_id;
commit;
exception when others then
raise_application_error(-20001,'Exception encountered updating member: '||sqlerrm);
end update_member;
procedure update_member_email (
p_user_name in varchar2,
p_email in varchar2,
p_retrieved in varchar2
is
l_user_id number;
l_retrieved date;
begin
l_user_id := get_member_id(p_user_name);
l_retrieved := to_date(p_retrieved,'DD-MM-YYYY HH24:MI:SS');
--optimistic locking
for c1 in (select null
from doclib_members
where user_id = l_user_id
and updated_on > l_retrieved ) loop
raise_application_error(-20001,'Remarkably, your email address changed since you retrieved the data. Refresh and try again.');
end loop;
update doclib_members
set email_address = p_email
where user_id = l_user_id;
commit;
exception when others then
raise_application_error(-20001,'Exception encountered updating email: '||sqlerrm);
end update_member_email;
procedure update_task (
p_task_id in varchar2,
p_title in varchar2,
p_user_name in varchar2,
p_assigned in varchar2,
p_priority in varchar2,
p_status in varchar2,
p_pct_complete in varchar2,
p_description in varchar2,
p_start_date in varchar2,
p_due_date in varchar2,
p_doc_id in varchar2,
p_retrieved in varchar2
is
l_start_date date;
l_due_date date;
l_retrieved date;
begin
if get_acl_id(p_user_name) < 2 then
raise_application_error(-20001,'You are not authorized to update tasks.');
end if;
l_retrieved := to_date(p_retrieved,'DD-MM-YYYY HH24:MI:SS');
l_start_date := to_date(p_start_date,'DD-MM-YYYY HH24:MI');
l_due_date := to_date(p_due_date, 'DD-MM-YYYY HH24:MI');
--optimistic locking
for c1 in (select null
from doclib_tasks
where task_id = p_task_id
and updated_on > l_retrieved ) loop
raise_application_error(-20001,'This task has been updated since you retrieved the data. Refresh and try again.');
end loop;
update doclib_tasks
set assigned_to = p_assigned,
priority_id = p_priority,
status_id = p_status,
pct_complete = p_pct_complete,
name = p_title,
description = p_description,
start_date = l_start_date,
due_date = l_due_date,
doc_id = p_doc_id
where task_id = p_task_id;
do_alerts('T',p_task_id,null);
commit;
exception when others then
raise_application_error(-20001,'Exception encountered updating task: '||sqlerrm);
end update_task;
procedure update_link (
p_link_id in varchar2,
p_user_name in varchar2,
p_name in varchar2,
p_url in varchar2,
p_retrieved in varchar2
is
l_retrieved date;
begin
if get_acl_id(p_user_name) < 2 then
raise_application_error(-20001,'You are not authorized to update links.');
end if;
l_retrieved := to_date(p_retrieved,'DD-MM-YYYY HH24:MI:SS');
--optimistic locking
for c1 in (select null
from doclib_links
where link_id = p_link_id
and updated_on > l_retrieved ) loop
raise_application_error(-20001,'This link has been updated since you retrieved the data. Refresh and try again.');
end loop;
update doclib_links
set name = p_name,
url = p_url
where link_id = p_link_id;
commit;
exception when others then
raise_application_error(-20001,'Exception encountered updating link: '||sqlerrm);
end update_link;
procedure update_announcement (
p_an_id in varchar2,
p_user_name in varchar2,
p_title in varchar2,
p_description in varchar2,
p_expire_date in varchar2,
p_retrieved in varchar2
is
l_expire_date date;
l_retrieved date;
begin
if get_acl_id(p_user_name) < 2 then
raise_application_error(-20001,'You are not authorized to update announcements.');
end if;
l_retrieved := to_date(p_retrieved,'DD-MM-YYYY HH24:MI:SS');
l_expire_date := to_date(p_expire_date,'DD-MM-YYYY HH24:MI');
--optimistic locking
for c1 in (select null
from doclib_announcements
where an_id = p_an_id
and updated_on > l_retrieved ) loop
raise_application_error(-20001,'This task has been updated since you retrieved the data. Refresh and try again.');
end loop;
update doclib_announcements
set title = p_title,
description = p_description,
expire_date = l_expire_date
where an_id = p_an_id;
commit;
exception when others then
raise_application_error(-20001,'Exception encountered updating announcement: '||sqlerrm);
end update_announcement;
procedure delete_document (
p_doc_id in varchar2,
p_user_name in varchar2,
p_delete_all in varchar2 default null
is
l_date date := sysdate;
l_checkedout_by varchar2(255);
l_chkout_lst varchar2(32000);
begin
if get_acl_id(p_user_name) < 2 then
--raise_application_error(-20001,'You are not authorized to delete documents.');
return_xml(p_doc_id,'DELETE','You are not authorized to delete documents.',null,'FAILED',p_user_name);
return;
end if;
l_checkedout_by := doc_is_checkedout_by(p_doc_id);
if l_checkedout_by is not null and upper(l_checkedout_by) != upper(p_user_name) then
--raise_application_error(-20001,'This document is currently checked out by '||l_checkedout_by);
return_xml(p_doc_id,'DELETE','This document is currently locked by '||l_checkedout_by,null,'FAILED',p_user_name);
return;
end if;
if p_delete_all = 'Y' then
update doclib_documents
set deleted_as_of = l_date
where doc_id = p_doc_id
or revision_of = p_doc_id;
else
update doclib_documents
set deleted_as_of = l_date
where doc_id = p_doc_id;
end if;
commit;
l_chkout_lst := get_checkout_list(p_user_name);
return_xml(p_doc_id,'DELETE','Document successfully deleted.',l_chkout_lst,'SUCCESS',p_user_name);
exception when others then
--raise_application_error(-20001,'Exception encountered deleting document: '||sqlerrm);
return_xml(p_doc_id,'DELETE','Exception encountered deleting document: '||sqlerrm,null,'FAILED',p_user_name);
end delete_document;
procedure really_delete_document (
p_user_name in varchar2,
p_doc_id in varchar2
is
begin
if get_acl_id(p_user_name) < 3 then
raise_application_error(-20001,'You are not authorized to really delete documents.');
end if;
delete
from doclib_documents
where doc_id = p_doc_id;
commit;
exception when others then
raise_application_error(-20001,'Exception encountered deleting document: '||sqlerrm);
end really_delete_document;
procedure delete_member (
p_user_name in varchar2,
p_user_id in varchar2
is
begin
if get_acl_id(p_user_name) < 3 then
raise_application_error(-20001,'You are not authorized to delete members.');
end if;
delete
from doclib_members
where user_id = p_user_id;
commit;
exception when others then
raise_application_error(-20001,'Exception encountered deleting member: '||sqlerrm);
end delete_member;
procedure delete_task (
p_user_name in varchar2,
p_task_id in varchar2
is
begin
if get_acl_id(p_user_name) < 2 then
raise_application_error(-20001,'You are not authorized to delete tasks.');
end if;
delete
from doclib_tasks
where task_id = p_task_id;
commit;
exception when others then
raise_application_error(-20001,'Exception encountered deleting task: '||sqlerrm);
end delete_task;
procedure delete_announcement (
p_user_name in varchar2,
p_an_id in varchar2
is
begin
if get_acl_id(p_user_name) < 2 then
raise_application_error(-20001,'You are not authorized to delete announcements.');
end if;
delete
from doclib_announcements
where an_id = p_an_id;
commit;
exception when others then
raise_application_error(-20001,'Exception encountered deleting announcement: '||sqlerrm);
end delete_announcement;
procedure delete_link (
p_user_name in varchar2,
p_link_id in varchar2
is
begin
if get_acl_id(p_user_name) < 2 then
raise_application_error(-20001,'You are not authorized to delete links.');
end if;
delete
from doclib_links
where link_id = p_link_id;
commit;
exception when others then
raise_application_error(-20001,'Exception encountered deleting link: '||sqlerrm);
end delete_link;
procedure make_doc_current (
p_user_name in varchar2,
p_name in varchar2,
p_doc_id in varchar2
is
l_name varchar2(255);
l_checkedout_by varchar2(255);
l_curr_doc_id number;
begin
if get_acl_id(p_user_name) < 2 then
raise_application_error(-20001,'You are not authorized to make this document current.');
end if;
l_checkedout_by := doc_is_checkedout_by(p_doc_id);
if l_checkedout_by is not null and upper(l_checkedout_by) != upper(p_user_name) then
raise_application_error(-20001,'This document is currently locked by '||l_checkedout_by);
end if;
for c1 in (select doc_id
from doclib_documents
where deleted_as_of = to_date('22-04-2004','DD-MM-YYYY')
and revision_of = 0
and name = p_name ) loop
l_curr_doc_id := c1.doc_id;
exit; -- this should only get one row, but just in case
end loop;
l_checkedout_by := doc_is_checkedout_by(l_curr_doc_id);
if l_checkedout_by is not null and upper(l_checkedout_by) != upper(p_user_name) then
raise_application_error(-20001,'This document is currently locked by '||l_checkedout_by);
end if;
update doclib_documents
set revision_of = p_doc_id,
checkedout_by = null --Revisions can't be locked
where name = p_name
and doc_id != p_doc_id;
update doclib_documents
set revision_of = 0,
checkedout_by = l_checkedout_by --In case original document was locked by p_user_name
where doc_id = p_doc_id;
--do alerts
do_alerts('D',l_curr_doc_id, p_doc_id);
commit;
exception when others then
raise_application_error(-20001,'Exception encountered making document current: '||sqlerrm);
end make_doc_current;
procedure undelete_document (
p_user_name in varchar2,
p_doc_id in varchar2
is
begin
if get_acl_id(p_user_name) < 3 then
raise_application_error(-20001,'You are not authorized to undelete a document.');
end if;
update doclib_documents
set deleted_as_of = to_date('22-04-2004','DD-MM-YYYY')
where doc_id = p_doc_id;
commit;
exception when others then
raise_application_error(-20001,'Exception encountered undeleting document: '||sqlerrm);
end undelete_document;
procedure send_invitation (
p_user_name in varchar2,
p_url in varchar2,
p_email in varchar2,
p_acl_id in varchar2,
p_subject in varchar2,
p_body in varchar2
is
l_body clob;
l_role_name varchar2(30);
l_from varchar2(255);
begin
for c1 in (select name
from doclib_roles
where role_id = p_acl_id ) loop
l_role_name := c1.name;
end loop;
for c1 in (select email_address
from doclib_members
where user_name = p_user_name ) loop
l_from := c1.email_address;
end loop;
l_body := g_html_email_header||chr(13)||'<p />'||p_body||chr(13);
l_body := l_body ||chr(13)||'<p />'||p_user_name||' has granted you access to '||p_url||'.';
l_body := l_body ||chr(13)||' Click the link to view the site. You have been granted access to the workspace with ';
l_body := l_body ||chr(13)||'the role of: '||l_role_name||'.'||g_html_email_footer;
apex_mail.send(
p_to => p_email,
p_from => l_from,
p_body => to_clob(' '),
p_body_html => l_body,
p_subj => p_subject );
end send_invitation;
procedure delete_document_multi (
p_doc_ids in varchar2,
p_user_name in varchar2
is
l_date date := sysdate;
l_checkedout_by varchar2(255);
l_chkout_lst varchar2(32000);
l_vc_arr2 apex_application_global.vc_arr2;
l_doc_id number;
l_curr_doc_id number;
begin
if get_acl_id(p_user_name) < 2 then
--raise_application_error(-20001,'You are not authorized to delete documents.');
return_xml(p_doc_ids,'DELETE_MULTI','You are not authorized to delete documents.',null,'FAILED',p_user_name);
return;
end if;
l_vc_arr2 := apex_util.string_to_table(p_doc_ids,',');
for c1 in (select revision_of
from doclib_documents
where doc_id = l_vc_arr2(1) ) loop
l_curr_doc_id := c1.revision_of;
end loop;
for z in 1..l_vc_arr2.count loop
l_checkedout_by := doc_is_checkedout_by(l_vc_arr2(z));
if l_checkedout_by is not null and upper(l_checkedout_by) != upper(p_user_name) then
--raise_application_error(-20001,'This document is currently checked out by '||l_checkedout_by);
return_xml(l_vc_arr2(z),'DELETE_MULTI','This document is currently locked by '||l_checkedout_by,null,'FAILED',p_user_name);
return;
end if;
update doclib_documents
set deleted_as_of = l_date
where doc_id = l_vc_arr2(z);
end loop;
commit;
l_chkout_lst := get_checkout_list(p_user_name);
return_xml(l_curr_doc_id,'DELETE_MULTI','Documents successfully deleted',l_chkout_lst,'SUCCESS',p_user_name);
exception when others then
--raise_application_error(-20001,'Exception encountered deleting document: '||sqlerrm);
return_xml(p_doc_ids,'DELETE_MULTI','Exception encountered deleting documents '||sqlerrm,null,'FAILED',p_user_name);
end delete_document_multi;
procedure rollback_document (
p_doc_id in varchar2,
p_user_name in varchar2
is
l_date date := sysdate;
l_checkedout_by varchar2(255);
l_chkout_lst varchar2(32000);
begin
if get_acl_id(p_user_name) < 2 then
return_xml(p_doc_id,'ROLLBACK','You are not authorized to rollback documents.',null,'FAILED',p_user_name);
return;
end if;
l_checkedout_by := doc_is_checkedout_by(p_doc_id);
--can be used as optimistic locking
if l_checkedout_by is not null and upper(l_checkedout_by) != upper(p_user_name) then
return_xml(p_doc_id,'ROLLBACK','This document is currently locked by '||l_checkedout_by,null,'FAILED',p_user_name);
return;
end if;
update doclib_documents
set deleted_as_of = l_date
where doc_id = p_doc_id;
for c1 in (select doc_id, name
from doclib_documents
where deleted_as_of = to_date('22-04-2004','DD-MM-YYYY')
and revision_of = p_doc_id
and version_no = (select max(version_no)
from doclib_documents
where deleted_as_of = to_date('22-04-2004','DD-MM-YYYY')
and revision_of = p_doc_id) ) loop
doclib.make_doc_current(
p_user_name => p_user_name,
p_name => c1.name,
p_doc_id => c1.doc_id );
apex_util.set_session_state('DOC_ID',c1.doc_id);
end loop;
commit;
l_chkout_lst := get_checkout_list(p_user_name);
return_xml(p_doc_id,'ROLLBACK','Document successfully rolled back',l_chkout_lst,'SUCCESS',p_user_name);
exception when others then
return_xml(p_doc_id,'ROLLBACK','Exception encountered rolling back document: '||sqlerrm,null,'FAILED',p_user_name);
end rollback_document;
/* Begin CBackstrom procedures and functions */
PROCEDURE return_all_docs(p_doc_type IN VARCHAR2) IS
l_checkedout_by VARCHAR2(4000);
l_attr1 VARCHAR2(4000);
l_attr2 VARCHAR2(4000);
l_attr3 VARCHAR2(4000);
BEGIN
l_checkedout_by := v('P9_MEMBERS');
l_attr1 := v('P9_ATTR1');
l_attr2 := v('P9_ATTR2');
l_attr3 := v('P9_ATTR3');
IF(p_doc_type = 'XML') THEN
owa_util.mime_header('text/xml', FALSE);
htp.p('Cache-Control: no-cache');
htp.p('Pragma: no-cache');
owa_util.http_header_close;
END IF;
htp.p('<div id="filelist">');
--htp.p('<div style="width:150px;"></div>');
IF v('P9_DESC') IS NOT NULL THEN
FOR c1 IN
(SELECT score(1) sc,
name,
doc_id,
checkedout_by,
'<img src="' || decode(mime_type, 'application/vnd.oasis.opendocument.text', '' || v('APP_IMAGES') || 'icodt.GIF', 'application/vnd.ms-excel', '' || v('APP_IMAGES') || 'ICXLS.GIF', 'application/msword', '' || v('APP_IMAGES') || 'ICDOC.GIF', 'application/pdf', '' || v('APP_IMAGES') || 'icpdf.GIF', 'application/vnd.ms-powerpoint', '' || v('APP_IMAGES') || 'ICPPT.GIF', 'application/vnd.oasis.opendocument.spreadsheet', '' || v('APP_IMAGES') || 'iccalc.GIF', 'application/vnd.oasis.opendocument.presentation', '' || v('APP_IMAGES') || 'icodp.GIF', 'text/plain', '' || v('APP_IMAGES') || 'ICTXT.GIF', 'application/x-zip-compressed', '' || v('APP_IMAGES') || 'ICZIP.GIF', '' || v('APP_IMAGES') || 'ICGEN.GIF') || '" width="16" height="16" border="0" />' img
FROM doclib_documents
WHERE deleted_as_of = to_date('22-04-2004', 'DD-MM-YYYY')
AND revision_of = 0
AND(checkedout_by = l_checkedout_by OR l_checkedout_by = '0')
AND(attr1 = l_attr1 OR l_attr1 = '0')
AND(attr2 = l_attr2 OR l_attr2 = '0')
AND(attr3 = l_attr3 OR l_attr3 = '0')
AND contains(contents, doclib.parse_search_string(v('P9_DESC')), 1) > 0
ORDER BY sc DESC)
LOOP
IF c1.checkedout_by IS NULL THEN
htp.p('<a href="javascript:void(0) onclick="GetDoc(this,''' || c1.doc_id || ''')" id="' || c1.doc_id || '">' || c1.img || ' (' || c1.sc || ') '|| c1.name || '</a>');
ELSIF c1.checkedout_by = apex_application.g_user THEN
htp.p('<a href="javascript:void(0) onclick="GetDoc(this,''' || c1.doc_id || ''')" id="' || c1.doc_id || '" class="checkedoutme">' || c1.img || ' (' || c1.sc || ') ' || c1.name || '(' || c1.sc || ')</a>');
ELSE
htp.p('<a href="javascript:void(0) onclick="GetDoc(this,''' || c1.doc_id || ''')" id="' || c1.doc_id || '" class="checkedout">' || c1.img || ' (' || c1.sc || ') '|| c1.name || '(' || c1.sc || ')</a>');
END IF;
END LOOP;
ELSE
FOR c1 IN
(SELECT name,
doc_id,
checkedout_by,
'<img src="' ||decode(mime_type,'application/vnd.oasis.opendocument.text', ''|| v('APP_IMAGES')||
'icodt.GIF','application/vnd.ms-excel',''||v('APP_IMAGES')||'ICXLS.GIF','application/msword',''||
v('APP_IMAGES')||'ICDOC.GIF','application/pdf',''||v('APP_IMAGES')||'icpdf.GIF','application/vnd.ms-powerpoint',''||
v('APP_IMAGES')||'ICPPT.GIF','application/vnd.oasis.opendocument.spreadsheet',''||v('APP_IMAGES')||
'iccalc.GIF','application/vnd.oasis.opendocument.presentation',''||v('APP_IMAGES')||'icodp.GIF','text/plain',''||
v('APP_IMAGES')||'ICTXT.GIF','application/x-zip-compressed',''||v('APP_IMAGES')||'ICZIP.GIF',''||v('APP_IMAGES')||
'ICGEN.GIF')||'" width="16" height="16" border="0" />' img
FROM doclib_documents
WHERE deleted_as_of = to_date('22-04-2004', 'DD-MM-YYYY')
AND revision_of = 0
AND(checkedout_by = l_checkedout_by OR l_checkedout_by = '0')
AND(attr1 = l_attr1 OR l_attr1 = '0')
AND(attr2 = l_attr2 OR l_attr2 = '0')
AND(attr3 = l_attr3 OR l_attr3 = '0')
order by name, updated_on desc)
LOOP
IF c1.checkedout_by IS NULL THEN
htp.p('<a href="javascript:void(0) onclick="GetDoc(this,''' || c1.doc_id || ''')" id="' || c1.doc_id || '">' || c1.img || ' ' || c1.name || '</a>');
ELSIF c1.checkedout_by = apex_application.g_user THEN
htp.p('<a href="javascript:void(0) onclick="GetDoc(this,''' || c1.doc_id || ''')" id="' || c1.doc_id || '" class="checkedoutme">' || c1.img || ' ' || c1.name || '</a>');
ELSE
htp.p('<a href="javascript:void(0) onclick="GetDoc(this,''' || c1.doc_id || ''')" id="' || c1.doc_id || '" class="checkedout">' || c1.img || ' ' || c1.name || '</a>');
END if;
END LOOP;
END IF;
htp.p('</div>');
END;
PROCEDURE doc_versions(p_doc_id IN VARCHAR2) IS
l_checkedout_by VARCHAR2(4000);
l_doc_name VARCHAR2(4000);
BEGIN
htp.p('<table id="doc_versions" cellpadding="0" border="0" cellspacing="0">');
htp.p('<tr>');
htp.p('<th><input type="checkbox" onclick="html_CheckAll(''doc_versions'',this.checked)" /></th>');
htp.p('<th>Version</th>');
htp.p('<th>Created</th>');
htp.p('<th>Created By</th>');
htp.p('</tr>');
FOR c2 IN
(SELECT doc_id,
decode(revision_of,0,' ',apex_item.checkbox(1,doc_id)) a,
name,
version_no,
created_on,
created_by
FROM doclib_documents
WHERE deleted_as_of = to_date('22-04-2004', 'DD-MM-YYYY')
AND(doc_id = p_doc_id OR revision_of = p_doc_id)
ORDER BY version_no DESC)
LOOP
htp.p('<tr>');
htp.p('<td>' || c2.a || '</td>');
htp.p('<td><a id="filehref" href="apex_util.count_click?p_url=' || v('OWNER') || '.get_doc?p=' || c2.doc_id || '&p_cat=DOCS&p_id=' || c2.doc_id || '&p_user=' || v('APP_USER') || '&p_workspace=' || apex_custom_auth.get_security_group_id || '">' || c2.version_no || '</a></td>');
htp.p('<td>' || to_char(c2.created_on, 'MM/DD/YYYY HH:MI AM') || '</td>');
htp.p('<td>' || c2.created_by || '</td>');
htp.p('</tr>');
END LOOP;
htp.p('</table>');
END;
FUNCTION doc_is_updated_by(p_doc_id IN VARCHAR2) RETURN VARCHAR2 IS
BEGIN
FOR c1 IN
(SELECT updated_by
FROM doclib_documents
WHERE doc_id = p_doc_id)
LOOP
RETURN c1.updated_by;
END LOOP;
RETURN NULL;
END doc_is_updated_by;
FUNCTION doc_updated_date(p_doc_id IN VARCHAR2) RETURN VARCHAR2 IS
BEGIN
FOR c1 IN
(SELECT to_char(updated_on, 'MM/DD/YYYY HH:MI AM') updated_on
FROM doclib_documents
WHERE doc_id = p_doc_id)
LOOP
RETURN c1.updated_on;
END LOOP;
RETURN NULL;
END doc_updated_date;
FUNCTION doc_created_date(p_doc_id IN VARCHAR2) RETURN VARCHAR2 IS
BEGIN
FOR c1 IN
(SELECT to_char(created_on, 'MM/DD/YYYY HH:MI AM') created
FROM doclib_documents
WHERE doc_id = p_doc_id)
LOOP
RETURN c1.created;
END LOOP;
RETURN NULL;
END doc_created_date;
FUNCTION doc_linked_image(p_doc_id IN VARCHAR2) RETURN VARCHAR2 IS l_image_link VARCHAR2(4000);
l_image_prefix VARCHAR2(4000);
BEGIN
l_image_link := '<a id="filehref" href="apex_util.count_click?p_url=' || v('OWNER') || '.get_doc?p=' || p_doc_id || '&p_cat=DOCS&p_id=' || p_doc_id || '&p_user=' || v('APP_USER') || '&p_workspace=' || apex_custom_auth.get_security_group_id || '">';
l_image_prefix := v('APP_IMAGES');
FOR c1 IN
(SELECT mime_type,
l_image_link || '<img src="' || decode(mime_type, 'application/vnd.oasis.opendocument.text', l_image_prefix || 'icodt.GIF', 'application/vnd.ms-excel', l_image_prefix || 'ICXLS.GIF', 'application/msword', l_image_prefix || 'ICDOC.GIF', 'application/pdf', l_image_prefix || 'icpdf.GIF', 'application/vnd.ms-powerpoint', l_image_prefix || 'ICPPT.GIF', 'application/vnd.oasis.opendocument.spreadsheet', l_image_prefix || 'iccalc.GIF', 'application/vnd.oasis.opendocument.presentation', l_image_prefix || 'icodp.GIF', 'text/plain', l_image_prefix || 'ICTXT.GIF', 'application/x-zip-compressed', l_image_prefix || 'ICZIP.GIF', l_image_prefix || 'ICGEN.GIF') || '" width="16" height="16" border="0" /></a>' image
FROM doclib_documents
WHERE doc_id = p_doc_id)
LOOP
RETURN c1.image;
END LOOP;
RETURN NULL;
END doc_linked_image;
FUNCTION doc_file_type(p_doc_id IN VARCHAR2) RETURN VARCHAR2 IS l_file_type VARCHAR2(4000);
BEGIN
FOR c1 IN
(SELECT mime_type
FROM doclib_documents
WHERE doc_id = p_doc_id)
LOOP
RETURN c1.mime_type;
END LOOP;
RETURN NULL;
END doc_file_type;
PROCEDURE doc_attribute_tab(p_doc_id IN VARCHAR2, p_user_name IN VARCHAR2) IS
BEGIN
for c1 in (select attr1, attr2, attr3, description
from doclib_documents
where doc_id = p_doc_id ) loop
htp.p('<table id="doc_attribute" cellpadding="0" cellspacing="0" border="0">');
htp.p('<tr><th>'||v('DOC_WORKSPACE_LBL1')||'</th><td>'||APEX_ITEM.SELECT_LIST_FROM_LOV(1,c1.attr1,'ATTR1',null,'NO',null,null,'ATTR1')||'</td></tr>');
htp.p('<tr><th>'||v('DOC_WORKSPACE_LBL2')||'</th><td>'||APEX_ITEM.SELECT_LIST_FROM_LOV(2,c1.attr2,'ATTR2',null,'NO',null,null,'ATTR2')||'</td></tr>');
htp.p('<tr><th>'||v('DOC_WORKSPACE_LBL3')||'</th><td>'||APEX_ITEM.SELECT_LIST_FROM_LOV(3,c1.attr3,'ATTR3',null,'NO',null,null,'ATTR3')||'</td></tr>');
htp.p('<tr><td colspan="2"><b>Description</b>
<textarea id="desc">' || c1.description || '</textarea></td></tr>');
htp.p('<tr><td colspan="2"><input type="button" onclick="doc_attribute_update()" value="Update Attributes" /></td></tr>');
htp.p('</table>');
end loop;
END;
PROCEDURE doc_detail(p_doc_id IN VARCHAR2, p_user_name IN VARCHAR2) IS
l_checkedout_by VARCHAR2(4000);
l_updated_by VARCHAR2(4000);
l_created_date VARCHAR2(4000);
l_updated_date VARCHAR2(4000);
l_mime_type VARCHAR2(4000);
l_doc_name VARCHAR2(4000);
l_acl_id VARCHAR2(4000);
BEGIN
l_checkedout_by := doclib.doc_is_checkedout_by(p_doc_id);
l_doc_name := doclib.get_doc_name(p_doc_id);
l_acl_id := doclib.get_acl_id(p_user_name);
l_updated_by := doc_is_updated_by(p_doc_id);
l_mime_type := doc_file_type(p_doc_id);
l_updated_date := doc_updated_date(p_doc_id);
l_created_date := doc_created_date(p_doc_id);
apex_util.set_session_state('DOC_ID', p_doc_id);
apex_util.set_session_state('DOC_NAME', l_doc_name);
htp.p('<div id="doc_detail">');
htp.p('<div id="doc_header">');
htp.p('<div id="doc_name"><a href="apex_util.count_click?p_url=' || v('OWNER') || '.get_doc?p=' || p_doc_id || '&p_cat=DOCS&p_id=' || p_doc_id || '&p_user=' || v('APP_USER') || '&p_workspace=' || apex_custom_auth.get_security_group_id || ">' || l_doc_name || '</a></div>');
htp.p('<table><tr><td valign="top">');
htp.p('<table>');
htp.p('<tr><th>View :</th><td>' || doc_linked_image(p_doc_id) || '</td></tr>');
htp.p('<tr><th>Locked By :</th><td id="checkedoutby">' || l_checkedout_by || '</td></tr>');
htp.p('<tr><th>Modified By :</th><td id="modifiedby">' || l_updated_by || '</td></tr>');
htp.p('</table>');
htp.p('</td><td width="100">
<td><td valign="top">');
htp.p('<table>');
htp.p('<tr><th>Updated Date :</th><td id="updateddate">' || l_updated_date || '</td></tr>');
htp.p('<tr><th>Created Date :</th><td id="createddate">' || l_created_date || '</td></tr>');
htp.p('<tr><th>Send Link :</th><td id="sendlink"><a href="mailto:' || doclib.get_member_email(p_user_name) || '?subject=' || l_doc_name || '&body=' || v('BASE_URL') || '/f?p=' || v('APP_ID') || ':2:::::P2_DOC_ID:' || p_doc_id || ">Click Here</a></td></tr>');
htp.p('</table>');
htp.p('</td></tr></table>');
htp.p('</div>');
htp.p('<div id="doc_actions">Actions : ');
IF l_acl_id > 1 THEN
IF l_checkedout_by IS NULL THEN
htp.p('<a href="javascript:doc_Action(this,''' || p_doc_id || ''',''CHECKOUT'') id="checkout_button">Lock</a>');
ELSIF l_checkedout_by = p_user_name OR l_acl_id > 2 THEN
htp.p('<a href="javascript:doc_Action(this,''' || p_doc_id || ''',''UNCHECKOUT'') id="checkout_button">Unlock</a>');
END IF;
IF l_checkedout_by IS NULL OR l_checkedout_by = p_user_name THEN
htp.p('Add Version');
htp.p('Delete');
END IF;
-- htp.p('<a href="f?p=&APP_ID.:5:&SESSION.::::P5_NAME,P5_DOC_ID:' || l_doc_name || ',' || p_doc_id || ' id="versions_button">Versions</a>');
END IF;
htp.p('<a href="apex_util.count_click?p_url=' || v('OWNER') || '.get_doc?p=' || p_doc_id || '&p_cat=DOCS&p_id=' || p_doc_id || '&p_user=' || p_user_name || '&p_workspace=' || apex_custom_auth.get_security_group_id || ">View</a>');
htp.p('<a href="f?p=' || v('APP_ID') || ':95:' || v('SESSION') || '::::P95_ALERT_TYPE,P95_ALERT_INTERVAL,P95_DOC_ID:D,,' || v('DOC_ID') || ">Alert Me</a>');
htp.p('</div>');
htp.p('<div id="action_message"></div>');
htp.p('<div id="doc_tabs">');
htp.p('<div id="doc_tabsbuttons">Versions<a id="tab3" href="javascript:void(0)" onclick="doc_Comments_Tab(''tab3'')">Comments</a>');
if doclib.GET_ACL_ID(v('APP_USER')) > 1 then
htp.p('Attributes');
end if;
htp.p('</div>');
htp.p('<div id="doc_tabsbody">');
htp.p('<div id="tab1_content">');
doc_versions(p_doc_id);
IF (l_checkedout_by IS NULL OR l_checkedout_by = p_user_name) and get_acl_id(v('APP_USER')) > 1 THEN
htp.p('<hr /><input type="button" value="Delete All Versions" onclick="doc_Action(this,''' || p_doc_id || ''',''DELETE'')" />');
if doc_has_revisions(p_doc_id) > 0 then
htp.p('<input type="button" value="Delete Checked Versions" onclick="doc_Action(this,''' || p_doc_id || ''',''DELETE_CHECKED'')" />');
htp.p('<input type="button" value="Delete Current Version (Rollback Version)" onclick="doc_Action(this,''' || p_doc_id || ''',''ROLLBACK'')" />');
end if;
END IF;
htp.p('</div>');
htp.p('<div id="tab2_content" style="display:none;">');
doc_attribute_tab(p_doc_id, p_user_name);
htp.p('</div>');
htp.p('<div id="tab3_content" style="display:none;"><div id="doc_comments">
</div></div>');
htp.p('</div>');
htp.p('</div>');
htp.p('</div>');
END;
PROCEDURE doc_comments(p_doc_id IN VARCHAR2) IS
BEGIN
htp.p('<div>');
htp.p('<table id="doc_versions" cellpadding="0" border="0" cellspacing="0">');
htp.p('<tr><th>Member</th><th>Date</th><th>Comment</th></tr>');
FOR c2 IN
(SELECT description,
created_by,
created_on
FROM doclib_documents
WHERE(doc_id = p_doc_id OR revision_of = p_doc_id)
AND(description IS NOT NULL OR description != '')
AND deleted_as_of = to_date('22-04-2004','DD-MM-YYYY')
ORDER BY created_on DESC)
LOOP
htp.p('<tr>' || '<td>' || c2.created_by || '</td><td>' || to_char(c2.created_on, 'MM/DD/YYYY HH:MI AM') || '</td><td>' || c2.description || '</td></tr>');
END LOOP;
htp.p('</table>');
htp.p('</div>');
END;
/* End CBackstrom procedures and functions */
end doclib;
Error at line 1230: PL/SQL: SQL Statement ignored
sync_index.sql
declare
l_job_id binary_integer;
begin
for c1 in (select job
from user_jobs
where what = 'ctx_ddl.sync_index(''doclib_docs_idx2'', ''2M'');' ) loop
dbms_job.remove(c1.job);
end loop;
dbms_job.submit(
job => l_job_id,
what => 'ctx_ddl.sync_index(''doclib_docs_idx2'', ''2M'');',
next_date => sysdate + 15/1440,
interval => 'sysdate + 15/1440');
end;
ORA-06550: line 1, column 93:
PLS-00201: identifier 'CTX_DDL.SYNC_INDEX' must be declared
ORA-06550: line 1, column 93:
PL/SQL: Statement ignored
I would appreciate any suggestions.
Thank you for your time.
DanielD -
Packaged App - Document Library - New user password?
How do you set the password for a new user on the Document Library packaged app. The documentation suggests that by default it uses 'Standard application express authentication' which can then be changed. In which case the user admin function in the app does not work in its default state and would need to be removed if the user wants to use 'Standard application express authentication' (or does it?)
Which leads me to another question:
Is it possible to manage application express users from an application express app in Apex 3.0?
Thanks
SimonSimon:
For a new user, you also need to create them as a normal Application Express authenticated user. To do that, click the Manage Application Express Users link under Administration from the Application Expres home page.
The only thing the Document Library handles is authorization (who can do what). Authentication (who the heck are you) is determined by the application setting, which by default is standard Application Express authentication. So all you are doing in the Document Library on the user administration page, is defining who is a reader, contributor, or administrator. You are not actually creating users, you are just defining the rights for existing users.
Regarding your second question, you can use the APEX_UTIL API to handle user management within your application. See:
http://download-west.oracle.com/docs/cd/B32472_01/doc/appdev.300/b32471/api.htm#CHDBDCIE
Specifically, CREATE_USER Procedure, EDIT_USER Procedure, CHANGE_CURRENT_USER_PW Procedure, etc.
Regards,
Jason -
The Document Information Panel was unable to load. The document will continue to open ?
I am using Sharepoint 2010; DIP in microsoft word all the while is working fine, not sure why suddenly it came out the following error when save word doc into sharepoint.
ERROR MESSAGE
===========
"The Document Information Panel was unable to load. The document will continue to open.
The form contains schema validation errors.
Content for element 'documentManagement' is incomplete according to the DTD/Schema. "
How to troubleshoot? Recently I added lookup column and a workflow into the library, but I did the same thing in another library which never appear to have any issue on it.The lookup column is creating the problem , you can find powerscript solution to fix this issue , please check this -
Fix through Powershell
http://blogs.msdn.com/b/tehnoonr/archive/2012/05/17/sharepoint-2010-document-information-panel-fails-to-load-when-office-documents-are-opened-in-a-library-that-contains-lookup-columns.aspx
Fix through Code
https://social.msdn.microsoft.com/Forums/office/en-US/2a4d6d10-d1d5-4d6a-a22b-62dfb6b60685/lookup-field-creation-and-document-information-panel?forum=sharepointdevelopmentlegacy
or try this -
https://social.technet.microsoft.com/Forums/office/en-US/2552fbc8-da24-4d2b-84f6-d39c4d58b137/the-document-information-panel-was-unable-to-load-the-document-will-continue-to-open-for-more?forum=sharepointgeneralprevious
1. Open this location- C:\Program
Files\Microsoft Web Designer Tools\Office12\1033\IPEDINTL.DLL
2. copy IPEDINTL.DLL
3. paste it here- C:\Program Files\Microsoft
Office\Office12\1033\IPEDINTL.DLL
4. Close all the applications that are presently
open as well as all the browsers
5. Open the sharepoint site in a new browser
and check the results !!
Thanks
Ganesh Jat [My Blog |
LinkedIn | Twitter ]
Please click 'Mark As Answer' if a post solves your problem or 'Vote As Helpful' if it was useful. -
The server was unable to load the SSL provider library needed to log in
Hello All,
When I am trying to login to my default SQL 2008R2 SP2 instance in windows 2003 server via ssms, I am getting the below error
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (.Net SqlClient Data Provider)
When I looked into the error log and i could see lot of these messages.
The server was unable to load the SSL provider library needed to log in; the connection has been closed. SSL is used to encrypt either the login sequence or all communications, depending on how the administrator has configured the server. See Books
Online for information on this error message: 14 Not enough storage is available to complete this operation.
Force protocol encryption is set to off.
I am not sure what is the underlying problem. server's total RAM is 4 Gb and max_server_memory is set to 2 GB. CPU utilization is very normal at the time of issue.
I restarted the SQL service and i am able to connect to the instance, but the issue is repeating and i need to find a permanent fix.
ThanksI could also see the below in error log some time before i get the above alert
Error: 701, Severity: 17, State: 123.
There is insufficient system memory in resource pool 'internal' to run this query
then after sometime flurry of alerts
The server was unable to load the SSL provider library
needed to log in; the connection has been closed. SSL is used to encrypt either the login sequence or all communications, depending on how the administrator has configured the server. See Books Online for information on this error message: 14 Not enough storage
is available to complete this operation.
Thanks -
UNABLE TO INSTALL THE PACKAGED APPLICATIONS (DOCUMENT LIBRARY)
Created new workspace, and downloaded and tried to install Document Library
from http://www.oracle.com/technology/products/database/application_express/packaged_apps/packaged_apps.html#DOC_LIB .
Installed application just fine, but when Apex attempted to install the
supporting objects, it failed. It hangs for a while and then goes to “page cannot be displayed page” When I click on refresh, and I get an error.
When browse the tables under SQL Workshop, I noticed that none of the objects have been installed for that App.
When i try to run the application, i get the following error.
ORA-06550: line 3, column 19: PL/SQL: ORA-00942: table or view does not exist ORA-06550: line 1, column 17: PL/SQL: SQL Statement ignored ORA-06550: line 5, column 26: PLS-00364: loop index variable 'C1' use is invalid ORA-06550: line 5, column 3: PL/SQL: Statement ignored ORA-06550: line 6, column 26: PLS-00364: loop index variable 'C1' use is invalid ORA-06550: line 6, column 3: PL/SQL: Statement ignored ORA-06550: line 7, column 26: PLS-00364: loop index variable 'C1' use is invalid ORA-06550: line 7,
Error setting workspace attributes.
Did anyone installed this APP? if so, was it successful?Could be possible that Samsung Galaxy Fit Processor doesn't match with the system requirements of AIR. It should be ARMv7
http://www.adobe.com/products/air/systemreqs/MOBILE SYSTEM REQUIREMENTS
Android devices
VGA: Dedicated Cortex A8 (ARMv7) 550MHz App Processor with Neon for A8 only; Hardware Vector FPU
WVGA: Dedicated Cortex A8 (ARMv7) 800MHz App Processor; Hardware Vector FPU
Google Android™ 2.2 or later
-Pahup -
I have created an SSIS package in BI dev studio which i can debug and run fine. I have saved the dtsx file to a production server which calls it using dtexec as part of a batch script (we are migrating from foxpro). I am getting the following error that i dont understand.
I dont know if this is relevant but i cant execute packages by double clicking them as DTexecui is not installed (not sure why as i have installed the client tools and integration server). Hardware is Dell poweredge 2850 dual xeon 2gb ram with win 2k sp4 and sql 2005 sp1.
Microsoft (R) SQL Server Execute Package Utility
Version 9.00.1399.06 for 32-bit
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
Started: 12:29:19
Error: 2006-07-06 12:29:20.75
Code: 0xC0011007
Source: {B06EB426-BBE8-4E09-87FC-32ED753A142F}
Description: Unable to load the package as XML because of package does not ha
ve a valid XML format. A specific XML parser error will be posted.
End Error
Error: 2006-07-06 12:29:20.79
Code: 0xC0011002
Source: {B06EB426-BBE8-4E09-87FC-32ED753A142F}
Description: Failed to open package file "\\SERVER_A\Scripts\CLIENT\Package.dtsx" due to error 0x800C0006 "The system cannot locate the object specified.". This happens when loading a package and the file cannot be opened or loaded correctly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.
End Error
Could not load package "\\\\SERVER_A\Scripts\CLIENT\Package.dtsx" because of error 0xC0011002.
Description: Failed to open package file \\SERVER_A\Scripts\CLIENT\Package.dtsx" due to error 0x800C0006 "The system cannot locate the object specified.". This hap
pens when loading a package and the file cannot be opened or loaded correctly in
to the XML document. This can be the result of either providing an incorrect fil
e name was specified when calling LoadPackage or the XML file was specified and
has an incorrect format.
Source: {B06EB426-BBE8-4E09-87FC-32ED753A142F}
Started: 12:29:19
Finished: 12:29:20
Elapsed: 1.719 secondsWe are having the same problem:
My team is using SqlServer 2005 SSIS to develop package for Consolidated Views. This works fine on my machine in Visual Studio when they run it as a script from command prompt from their desktop. However, when they move this package to ETL box, the package runs fine Visual Studio environment but fails when run from the script with the errors:
Started: 12:57:45 PM
Error: 2006-08-04 12:57:45.87
Code: 0xC0011007
Source: {519D338B-8874-40A8-A385-0D53E868A57C}
Description: Unable to load the package as XML because of package does not have a valid XML format. A specific XML parser error will be posted.
End Error
Error: 2006-08-04 12:57:45.87
Code: 0xC0011002
Source: {519D338B-8874-40A8-A385-0D53E868A57C}
Description: Failed to open package file "C:\SM_BI_EXTRACTS_SHARED\Shared\Int
egrated Views\Integrated Views\CV_Product.dtsx" due to error 0x800C0006 "The system cannot locate the object specified.". This happens when loading a package a nd the file cannot be opened or loaded correctly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.
End Error
Could not load package "C:\SM_BI_EXTRACTS_SHARED\Shared\Integrated Views\Integrated Views\CV_Product.dtsx" because of error 0xC0011002.
Description: Failed to open package file "C:\SM_BI_EXTRACTS_SHARED\Shared\Integr
ated Views\Integrated Views\CV_Product.dtsx" due to error 0x800C0006 "The system cannot locate the object specified.". This happens when loading a package and the file cannot be opened or loaded correctly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.
Source: {519D338B-8874-40A8-A385-0D53E868A57C}
Started: 12:57:45 PM
Finished: 12:57:45 PM
Elapsed: 0.016 seconds
C:\SM_BI_EXTRACTS_SHARED\Shared>rem "C:\Program Files\Microsoft SQL Server\90\DT
S\Binn\dtexec" /f "C:\SM_BI_EXTRACTS_SHARED\Shared\SSIS\IntegratedViews\Integrat
edViews\CV_Sales_Rep.dtsx"
C:\SM_BI_EXTRACTS_SHARED\Shared>rem "C:\Program Files\Microsoft SQL Server\90\DT
S\Binn\dtexec" /f "C:\SM_BI_EXTRACTS_SHARED\Shared\SSIS\IntegratedViews\Integrat
edViews\CV_Sales.dtsx"
Can someone help us understand the problem? We are new to SSIS. We also want to know exactly what needs to be on the Server that will be running our SSIS ETL programs (that is, what components of SSIS -- SQL Server 2K5 is already loaded).
We are using SQL 2005 on Dell Servers running Win 2003, with the latest service packs. Microsoft SQL Server Integration Services Designer Version 9.00.2047.00 -
Unable to load photos from iPhoto library
I have around 8400 photos in my iPhoto library. I was having difficulty importing photos. It would freeze during import. Also was acting very sluggish. I reinstalled iPhoto 4.0.3 from a dvd. I also drug to the iPhoto library to my desktop so when iPhoto opened I had it creat a new library and import worked fine and the application worked fine. I did open up the original iPhoto library in finder and moved a folder out of library. Now the new library works fine but I am unable to load the photos from the original library with 8400 photos. I drug the folder I removed back into the original library. Since I have read that you are not make any changes to the library outside of iPhoto especially in finder. Any way to have access back to the photos in the original library in iPhoto.
There's also a little app callled "iPhoto Buddy".
It came with a cover disk on Macworld mag. but might be available at places like tucows or version tracker .com.
It's magic!
Otherwise, change an iPhoto library name (one character will do). When you next launch it, it will ask you to search, create new, or (I forget the other). Then you can locate your old lib. and launch that. But try to find iphoto budy first.
finallly, DON'T EVER mess with the iphoto folders! -
Attaching Attributes to Image For Loading to SharePoint Document Library
We currently have a need to create a searchable document library which will consist solely of images. The standard metadata for a file/image won't suffice in this case. We have some custom attributes that will need to be searchable.
Essentially, we will have a library of receipt images for expense reporting purposes. We get these images from a third party who handles all of our expense reporting. There are two large zipped files we receive: one file contains all the actual expense report
"data" that was processed that day(amount, date, client, job, etc.) and the second file contains all the receipt images for those expense report items. Each data file contains data for individual expense reports, and each expense report is assigned
a unique ID. Each line item in an expense report is also assigned a unique ID. Lastly, each receipt image for a line item of a specific expense report is also assigned a unique ID.
The zipped image file only contains images. There is a main image file - this contains several smaller zipped files. Each of the smaller zipped files contains all receipt images for a specific expense report. Each image file name is comprosed of three parts:
The expense report identifier, the unique image identifier, and the expense report line item identifier.
So, to put this all into perspective:
On Thursday, we received an image file named extract_images_p006320452r3_20140904171423
This file contained images for the following unique expense reports:
The compressed file 95FB8C488519427793FC contains the following receipt images:
The "data" file - as mentioned before - contains the actual info about the expense and image. These include: date of transaction, date approved, vendor, amount. GL code, type, function, client, project, billable or not, and several other attributes.
All of this information - including the location of the images - is stored in a SQL Server database and then placed in an SSAS cube.
The images are related back to the underlying data via the expense report id, and line item id.
What I need to be able to do is to somehow "tag" these images with all their underlying attributes, load then into a SharePoint document library, and make them searchable.
I have already figured out that I would need to create several SharePoint lists based on the available values in my OLAP cube (essentially a dataset each for clients, vendors, etc.). The part I have no idea how to accomplish is how to tag each image with
its respective information.
All the pertinent info is stored in the database tables, just don't know how to attach it to each image.
Hopefully, this made some kind of sense. If anyone has any idea on how to even remotely accomplish such a thing, your input would be greatly appreciated!
Thanks in advance!
A. M. RobinsonYou will have to develop a custom solution to do this. I am assuming you have taken the first steps to define separate document libraries for the expense reports and images along with site columns and contenttypes. You would define the site columns based
on the data you want to search on and assign these to corresponding contenttypes. So basically a contenttype for expense reports and receipts possibly. You would link the two contenttypes using the expense report id.
Your custom solution would have to break apart the zip files and upload and index (set site column data) for each file. Then the user could search on the expense report id and get all the files associated with the expense report.
An alternative could be to use one document library and have all the files uploaded into their own document set (folder).
Blog | SharePoint Field Notes Dev Tools |
SPFastDeploy | SPRemoteAPIExplorer -
Unable to load (packaged) locales on iOS
Hi, for last couple of days I am struggling with loading locales (of course it works on Android and in fast packaging on iOS :-) ).
Its flex project with AIR SDK 3.7 (without ASC 2.0) and Flex SDK 4.6, FB 4.7. Here's my test app:
loader = new Loader();
var url:URLRequest = new URLRequest("assets/locales/en_US.swf");
var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
loader.load(url, loaderContext);
after its successfully loaded I use ModuleManager..
modInfo = ModuleManager.getModule("assets/locales/en_US.swf");
modInfo.load(ApplicationDomain.currentDomain, null, loader.contentLoaderInfo.bytes, FlexGlobals.topLevelApplication.moduleFactory);
Result is that it stucks with loading the data to the ModuleManager with the error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.core::FlexModuleFactory/getDefinitionByName()
at mx.core::FlexModuleFactory/docFrameHandler()
at mx.core::FlexModuleFactory/docFrameListener()
at mx.core::FlexModuleFactory/docFrameListener()
I've also tried ResourceManager.loadResourceModule but it throws the same error (I guess it works the same way)
The en_US.swf file is generated with this script:
<exec dir="${APP_ROOT}" executable="C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\bin\mxmlc.exe" failonerror="true">
<arg line="-locale=en_US" />
<arg line="-static-link-runtime-shared-libraries=true -verify-digests=false" />
<arg line="-source-path='${APP_ROOT}/resources/locale/{locale}'" />
<arg line="-include-resource-bundles=rpxLocale"/>
<arg line="-swf-version=20" />
<arg line="-target-player=11.7" />
<arg line="-output='${outdir}/assets/locales/en_US.swf'" />
</exec>
A note: strange is that loading styles with StyleManager works for me:
styleManager.loadStyleDeclarations2("assets/css/style.swf", true, ApplicationDomain.currentDomain);
Thank you for any thoughts!
PeterHi,
Could you please open a new bug report on this over at bugbase.adobe.com? When adding the bug, please include reproducible sample application so we can quickly test this out internally. If you would like to keep this private, feel free to email the attachment at nimitja@adobedotcom.
Once added, please post back with the bug URL/number so that others affected can add their votes and comments.
Regards,
Nimit -
Unable to mail-enable a document library when using Directory Management Service in SharePoint 2013
I'm not able to mail-enable a library document while Directory Management Service is enabled. This behavior only happens when Directory Management Service is turned on.
Correlation ID: a8c7b29c-d193-90b5-ae14-64cd1143445f
Note that I have the OU created and permissions setup properly according to MS official documentation.Hi,
According to your post, my understanding is that you failed to mail-enable a library document while Directory Management Service is enabled.
Please make sure you configure the incoming email correctly.
For more information, you can refer to:
https://hosting.intermedia.net/support/kb/default.asp?id=2439
http://davecoleman146.com/2010/10/20/how-to-setup-mail-enabled-document-libraries-in-sharepoint-2010-part-1/
If so and the error message persists, please check the SharePoint ULS log to find more information about this error, the ULS log file is in the location: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS
You can check the ULS log by the methods here:
http://blog.credera.com/technology-insights/microsoft-solutions/troubleshooting-sharepoint-errors/
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
Unable to load Facebook app to iPad Air
I installed app onto iPad Air however , it fails to log in , it just sits at load with timer on
Also try reset iPad
Hold the Sleep/Wake and Home button down together until you see the Apple Logo.
Note: Data will not be affected. -
Unable to load updated apps to updated 3g...
Am loading previously purchased apps from iTunes to a newly aquired old 3g. The apps were on my old 3g and are updated but the new 3g will not accept them. How can I get them on my phone? Thank you!
Hi Junglegirl,
If the current versions of the apps you are trying to install on your iPhone 3g are not compatible with the iOS version you have on that phone - this happens if the developers create versions for a new model or new version of iOS - that could cause the issue you are experiencing. I would suggest using this article for help -
App Store: Install the latest compatible version of an app
http://support.apple.com/kb/HT5919
Specifically -
Some earlier versions of apps may not be downloadable from the App Store if the app's developer has chosen not to make them available. If you don't see the version of the app you are looking for, contact the app developer for more information. The developer's contact information can be found on the app's product page on the App Store.
Thanks for using Apple Support Communities.
Best,
Brett L -
Unable to Load Purchased Apps in App Store for iPad 2 WIFI Only
what do I do. literally. I have tried every dang thing in the book. no lie. please help me y'all.
Thanks, I have no way to see my purchased apps. The only way would be with iTunes on my PC.
I presume ios 6.0.1 will fix this along with many other bugs.
This is a pity and I am amazed this was not tested along the way.
Sean -
Error in packaged application Document Library: for the apex team ?
Dear team-members,
I've installed this application. Looks nice, my compliments.
I can make new announcements: it seems possible to underline, or make bullets and so on, but the "format" don't appear in the result: no bullets, no underlining, just ordinary text without spaces.....
Hope I'm clear.
LeoLeo:
That is a good point. The home page is using a derived column, and the HTML Expression for the column formatting. That must escape the HTML.
I think the fix for a future release would be to not use that derived column, and just use a standard report with a custom template. It is also possible that for announcements and tasks it is more appropriate to use a standard Textarea instead of Textarea with HTML Editor.
Thanks for your feedback,
Jason
Maybe you are looking for
-
cant sync iPod touch. comes up with "cannot be synced because there is not enough free space to hold all of the items in the iTunes library (21.6MB required, 304.8MB available)." I am so confused. I have more than enough space even on PC.
-
File based rejection handling using Debatching
Hi All, I am facing very serious issue while using debatching option in file adapter. I am reading file in de-batch mode. When any record is corrupted inside file then entire file is moving to default rejmsgs folder in SOA domain/soa_server1 folder.
-
Chat and email applications programmed in java
Can someone tell me where I can find some applications about chat and email with codes and tutorial? I have to work about these topics with some students of mine. Thanks Eugenia Mariani
-
Hi All, I have got a problem while installing soundmax audio driver on my MS6337(815EPT) mainboard. I know that there should be an ADI188x chip on my mainboard. (Can you help to confirm it?) So I tried to install Soundmax Audio driver. No problem in
-
HT201303 What to do when you can't remember the security answers
What do you have to do when you forget the security questions answers. Do you have to call apple?