1 Package AHL_PRD_PRINT_CUHK AUTHID CURRENT_USER AS
2 /*$Header: AHLCPPRS.pls 120.0.12020000.2 2012/12/12 06:39:09 kasridha ship $*/
3
4 ------------------------
5 -- Declare Procedures --
6 ------------------------
7 -- Start of Comments --
8 --
9 -- Procedure name : Generate_JCG_XML_PRE
10 -- Type : Public
11 -- Function : Provide User Hooks for the customer to add validations
12 -- before Enigma work card request is processed.
13 --
14 -- Standard IN Parameters :
15 --
16 -- Standard OUT Parameters :
17 -- x_return_status OUT VARCHAR2 Required
18 -- x_msg_count OUT NUMBER Required
19 -- x_msg_data OUT VARCHAR2 Required
20 --
21 -- Generate_JCG_XML_PRE Parameters :
22 -- p_object_type: Entity Type of the workcard request
23 -- p_object_type = 'VST' if work card request is for a Visit.
24 -- p_object_type = 'MR' if work card request is for a Maintenance Requirement.
25 -- p_object_type = 'WO' if work card request is for a work order.
26 --
27 -- p_object_id : Object ID.
28 -- p_object_id = ahl_visits_b.visit_id if work card request is for a Visit.
29 -- p_object_id = ahl_unit_effectivities_b.unit_effectivity_id if work card request is for a Maintenance Requirement.
30 -- p_object_id = ahl_workorders.workorder_id if work card request is for a work order.
31 --
32 -- p_split_flag : Valid values are 'Y' or 'N'. Indicates if separate work cards for work orders also need to be generated along with
33 -- MR and Visit bundle. Valid only when p_object_type: is MR or VST.
34 --
35 -- Version :
36 -- Initial Version 1.0
37 --
38 -- End of Comments --
39
40 PROCEDURE Generate_JCG_XML_PRE ( p_object_type IN VARCHAR2,
41 p_object_id IN NUMBER,
42 p_split_flag IN VARCHAR2,
43 x_msg_count IN OUT NOCOPY VARCHAR2,
44 x_msg_data IN OUT NOCOPY VARCHAR2,
45 x_return_status IN OUT NOCOPY VARCHAR2);
46
47
48 --Start of Comments --
49 --
50 -- Procedure name : Generate_JCG_XML_POST
51 -- Type : Public
52 -- Function : Provide User Hooks for the customer for post-processing
53 -- after work card request data file(XML) is created. Customer
54 -- can modify input filename or output a new filename altogether that
55 -- contains all information (in the XML specification that Enigma JCG server is expecting)
56 -- needed for Enigma JCG server to generate the job card.
57 --
58 -- Standard IN Parameters :
59 --
60 -- Standard OUT Parameters :
61 -- x_return_status OUT VARCHAR2 Required
62 -- x_msg_count OUT NUMBER Required
63 -- x_msg_data OUT VARCHAR2 Required
64 --
65 -- PERFORM_MTLTXN_POST Parameters :
66 -- p_object_type: Entity Type of the workcard request
67 -- p_object_type = 'VST' if work card request is for a Visit.
68 -- p_object_type = 'MR' if work card request is for a Maintenance Requirement.
69 -- p_object_type = 'WO' if work card request is for a work order.
70 --
71 -- p_object_id : Object ID.
72 -- p_object_id = ahl_visits_b.visit_id if work card request is for a Visit.
73 -- p_object_id = ahl_unit_effectivities_b.unit_effectivity_id if work card request is for a Maintenance Requirement.
74 -- p_object_id = ahl_workorders.workorder_id if work card request is for a work order.
75 --
76 -- p_split_flag : Valid values are 'Y' or 'N'. Indicates if separate work cards for work orders also need to be generated along with
77 -- MR and Visit bundle. Valid only when p_object_type: is MR or VST.
78 --
79 -- p_ahl_wrkpkg_xml : Input XML CLOB generated by caller API that is based on the CMRO-JCG WorkPackage XSD definition
80 -- documented in CMRO-Enigma JCG Setup document. This XSD is different than the one required by Enigma to generate
81 -- the job card. This CLOB contains various CMRO/Oracle EBS attributes related to the work orders, MR and Visit
82 -- for the input object_type and object_id.
83 --
84 -- p_jcg_wrkpkg_location : directory on the DB server where the XML file to be processed by the Enigma JCG server needs to be created.
85 --
86 -- x_jcg_wrkpkg_file : The custom hook code is expected to generate this file as per the Enigma JCG DTD. The caller API will
87 -- will invoke the Enigma JCG Web Service with this filename information.
88 -- Custom XML for Enigma JCG can be created by combining the information provided in p_ahl_wrkpkg_xml and
89 -- adding custom attributes.
90 -- When generating XML using custom code, it will be customer's responsibility to ensure that the right file
91 -- adhering to Enigma DTD format is generated, saved in the directory p_jcg_wrkpkg_location and filename
92 -- is returned to the caller API in variable p_x_xml_filename.
93 -- Following rules need to be followed when creating this XML file to make the CMRO-Enigma JCG integration
94 -- work:
95 -- 1) workpackage:
96 -- @id should be formed as a concatenation of p_object_type, hyphen and p_object_id. No spaces must be
97 -- embedded. Example: VST-10023 or MR-34828 or WO-83773
98 -- If any other custom identifications are needed, then they can be appended after this string.
99 -- 2) job_card:
100 -- @id should be mapped to CMRO-JCG WorkPackage jobcard[@workorderid]
101 --
102 -- Any errors related to data in the XML file have to be addressed by the Customer.
103 --
104 -- Version :
105 -- Initial Version 1.0
106 --
107 -- End of Comments --
108
109 PROCEDURE Generate_JCG_XML_POST ( p_object_type IN VARCHAR2,
110 p_object_id IN NUMBER,
111 p_split_flag IN VARCHAR2,
112 p_ahl_wrkpkg_xml IN CLOB,
113 p_jcg_wrkpkg_location IN VARCHAR2,
114 x_msg_count OUT NOCOPY VARCHAR2,
115 x_msg_data OUT NOCOPY VARCHAR2,
116 x_return_status OUT NOCOPY VARCHAR2,
117 x_jcg_wrkpkg_file OUT NOCOPY VARCHAR2);
118
119
120
121 END AHL_PRD_PRINT_CUHK;