1 PACKAGE XDP_WF_MIGRATE AUTHID CURRENT_USER AS
2 /* $Header: XDPMWFS.pls 120.0 2005/05/30 12:51:00 appldev noship $ */
3
4 -- These are Package Level Variables which stores the new ID's during Pre Processing
5 g_WF_ADHOC_ROLE_S_SEQ number;
6 g_WF_NOTIFICATIONS_S_SEQ number;
7 g_WF_PROCESS_ACTIVITIES_S_SEQ number;
8 g_UniqueSuffix varchar2(3);
9
10 -- The COMMIT count. If large amounts of data is expected set this appropriately.
11 g_CommitCount number;
12 g_ItemKeyCount number;
13
14 e_WrongDataException exception;
15
16 -- PL/SQL Record to store any Lookup Type (Internal Name) Conflicts
17 TYPE WF_LOOKUP_TYPE_TL_REC is RECORD
18 (LOOKUP_TYPE varchar2(30),
19 LOOKUP_TYPE_NEW varchar2(30));
20
21 -- PL/SQL Record to store any Lookup Type (Display Name) Conflicts
22 TYPE WF_LOOKUP_TYPE_TL_DISP_REC is RECORD
23 (DISPLAY_NAME varchar2(80),
24 LANGUAGE varchar2(30),
25 DISPLAY_NAME_NEW varchar2(80));
26
27 -- PL/SQL Record to store Item Types to be moved
28 TYPE WF_ITEM_TYPE_REC is RECORD
29 (ITEM_TYPE varchar2(8));
30
31 -- Table of Lookup Type Conflicts Record
32 TYPE WF_LOOKUP_TYPE_TL_LIST is TABLE of WF_LOOKUP_TYPE_TL_REC
33 INDEX BY BINARY_INTEGER;
34
35 -- Table of Display Name Conflicts Record
36 TYPE WF_LOOKUP_TYPE_TL_DISP_LIST is TABLE of WF_LOOKUP_TYPE_TL_DISP_REC
37 INDEX BY BINARY_INTEGER;
38
39 -- Table of Item Types
40 TYPE WF_ITEM_TYPE_LIST is TABLE of WF_ITEM_TYPE_REC
41 INDEX BY BINARY_INTEGER;
42
43 -- Global Table of Records used
44 g_WF_LOOKUP_TYPE_TL_LIST WF_LOOKUP_TYPE_TL_LIST;
45 g_WF_LOOKUP_TYPE_TL_DISP_LIST WF_LOOKUP_TYPE_TL_DISP_LIST;
46 g_WF_ITEM_TYPE_LIST WF_ITEM_TYPE_LIST;
47
48
49 -- Function to Verify the Suffix which will be used when Lookup Type and Display Name
50 -- conflicts are found
51 Function VerifySuffix (UniqueSuffix in varchar2) return boolean;
52
53 -- Function to Verify if the Item Type can be moved. Non WF Item Types which are
54 -- NOT present in the Target can only be moved
55 Function VerifyItemType return boolean;
56
57 -- Verify the WF_ROLES definition. Check is the values from Source are present at Target
58 Function VerifyDirectory return boolean;
59
60 -- Construct the new lookup type when a conflict is found
61 Function GetUniqueLookupType(LookupType in varchar2, Suffix in varchar2) return varchar2;
62
63 -- Construct the new lookup type when a conflict is found
64 Function GetUniqueLookupType(LookupType in varchar2) return varchar2;
65 pragma RESTRICT_REFERENCES(GetUniqueLookupType, WNDS, WNPS);
66
67 -- Construct the new display name when a conflict is found
68 Function GetUniqueDisplayName(DisplayName in varchar2, Suffix in varchar2) return varchar2;
69
70 -- Construct the new display name when a conflict is found
71 Function GetUniqueDisplayName(DisplayName in varchar2) return varchar2;
72 pragma RESTRICT_REFERENCES(GetUniqueDisplayName, WNDS, WNPS);
73
74 -- Procedures used in the Pre Processing Stage
75 Procedure InitializeSequences;
76 Procedure PreProcessMigration;
77 Procedure PreProcessLookupTypes;
78 Procedure ResetSequenceNumbers;
79
80
81 -- Move Configuration Data
82 Procedure MoveConfigData;
83
84 -- Move Move RunTime Data Data
85 Procedure MoveRunTimeData;
86
87 -- Move WF_LOCAL Roles
88 Procedure MoveLocalRoles;
89
90 -- Move WF_LOCAL Users
91 Procedure MoveLocalUsers;
92
93 -- Move WF_LOCAL User Roles
94 Procedure MoveLocalUserRoles;
95
96
97 -- Post Processing
98 Procedure ReEnqueueDefferedAct;
99 Procedure PostProcess;
100
101 Procedure Display(text_value in varchar2, which in varchar2) ;
102
103 -- Create log files
104 Procedure Create_Log_Files (p_log_prefix IN VARCHAR2 DEFAULT 'XDPMIGRT_');
105
106 end XDP_WF_MIGRATE;