1.3 Creating Procedure

  1. Login into database using schema user (OBAPISCHEMA).
  2. Compile following procedure.
  • For Feedback :

    Pre- requisites before compiling below procedure

Execute below steps to make Scale(Rating) icons available for Feedback Module.

Note:

The images can be found at below location : clip/trunk/core/channel/images/feedback.
Insert Query for DIGX_CM_CONTENT
TableInsert into DIGX_CM_CONTENT
(ID,PARTY_ID,DOCUMENT_CHECKLIST_ID,TITLE,MIME_TYPE,CONTENT_CATEGORY,
CONTENT_TYPE,FILE_CONTENT,CONTENT_SIZE,SHARED_FLAG,OBJECT_VERSION_NUMBER,
CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,OBJECT_STATUS)
 values (‘${contentId1}’,null,null,'heart-fill.svg','image/svg',null,null,
null,'','Y',1,'superadmin',sysdate,'superadmin',sysdate,null);
Insert into DIGX_CM_CONTENT
(ID,PARTY_ID,DOCUMENT_CHECKLIST_ID,TITLE,MIME_TYPE,CONTENT_CATEGORY,
CONTENT_TYPE,FILE_CONTENT,CONTENT_SIZE,SHARED_FLAG,OBJECT_VERSION_NUMBER,
CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,OBJECT_STATUS)
values (‘${contentId2}’,null,null,'star.png','image/jpeg',null,null,
null,'','Y',1,'superadmin',sysdate,'superadmin',sysdate,null);
Insert into DIGX_CM_CONTENT
(ID,PARTY_ID,DOCUMENT_CHECKLIST_ID,TITLE,MIME_TYPE,CONTENT_CATEGORY,
CONTENT_TYPE,FILE_CONTENT,CONTENT_SIZE,SHARED_FLAG,OBJECT_VERSION_NUMBER,
CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,OBJECT_STATUS)
values (‘${contentId3}’,null,null,'thumbs-up.svg','image/jpeg',null,null,
 null,'','Y',1,'superadmin',sysdate,'superadmin',sysdate,null);

“Kindly Refer this folder location for all the three icons to be used in below steps:

[\clip\core\channel\images\feedback]”

Update the content in digx_fd_scale table.

update  digx_fd_scale set content_id=‘${contentId1}’ where
determinant_value in  ('*','OBDX_BU') and  id='1';
update  digx_fd_scale set content_id=‘${contentId2}’ where
determinant_value in  ('*','OBDX_BU') and  id='2';
update  digx_fd_scale set content_id=‘${contentId3}’ where
determinant_value in  ('*','OBDX_BU') and  id='3';
  • Procedure:

create or replace procedure load_file_to_content( p_file_path in varchar2, p_file_name in varchar2, p_content_id in varchar2 ) as

l_blob  blob; l_file_content bfile := bfilename(p_file_path,
p_file_name);begin    update DIGX_CM_CONTENT set FILE_CONTENT =
empty_blob() WHERE ID = p_content_id;    SELECT FILE_CONTENT into l_blob FROM
DIGX_CM_CONTENT WHERE ID = p_content_id;    dbms_lob.open(l_file_content,
dbms_lob.lob_readonly); dbms_lob.open(l_blob,
dbms_lob.lob_readwrite); dbms_lob.loadfromfile(dest_lob => l_blob,                          
src_lob  => l_file_content, amount => dbms_lob.getlength(l_file_content));   
dbms_lob.close(l_file_content); dbms_lob.close(l_blob); commit;end;/