47: l_act_def_key_count NUMBER(10);
48:
49: l_temp_act_label IEU_UWQ_MACTION_DEFS_TL.ACTION_USER_LABEL%type;
50:
51: l_temp_pkg_name IEU_UWQ_MACTION_DEFS_B.ACTION_PROC%TYPE;
52:
53:
54: l_temp_aproc IEU_UWQ_MACTION_DEFS_B.ACTION_PROC%TYPE;
55:
50:
51: l_temp_pkg_name IEU_UWQ_MACTION_DEFS_B.ACTION_PROC%TYPE;
52:
53:
54: l_temp_aproc IEU_UWQ_MACTION_DEFS_B.ACTION_PROC%TYPE;
55:
56: l_temp_count NUMBER(10);
57: l_msg_count NUMBER(10);
58: l_msg_data VARCHAR2(2000);
60: l_set_id_count NUMBER(10);
61:
62: temp_act_user_label IEU_UWQ_MACTION_DEFS_TL.action_user_label%type;
63:
64: temp_act_key IEU_UWQ_MACTION_DEFS_B.MACTION_DEF_KEY%type;
65:
66:
67: BEGIN
68:
78:
79: temp_act_user_label := LTRIM(RTRIM(rec_obj.action_user_label));
80:
81: -- select count(b.maction_def_id) into l_act_usr_lbl_count
82: -- from IEU_UWQ_MACTION_DEFS_B b, IEU_UWQ_MACTION_DEFS_TL tl
83: -- where b.maction_def_id = tl.maction_def_id
84: -- and tl.language = l_language
85: -- and lower(tl.action_user_label) = lower(temp_act_user_label)
86: -- and b.maction_def_type_flag = p_maction_def_type_flag;
88:
89: if (p_maction_def_type_flag <> 'F' and p_maction_def_type_flag <> 'N' and p_maction_def_type_flag <> 'M' ) then
90:
91: select count(b.maction_def_id) into l_act_usr_lbl_count
92: from ieu_uwq_maction_defs_b b, ieu_uwq_maction_defs_tl tl, ieu_wp_action_maps m,
93: ieu_wp_act_param_sets_b s, ieu_uwq_sel_enumerators e, ieu_wp_act_param_sets_tl stl
94: where e. sel_enum_id = rec_obj.enum_id
95: -- and e.application_id = m.application_id
96: and e.enum_type_uuid = m.action_map_code
114:
115:
116:
117: select count(b.maction_def_id) into l_set_id_count
118: from ieu_uwq_maction_defs_b b, ieu_uwq_maction_defs_tl tl, ieu_wp_action_maps m,
119: ieu_wp_act_param_sets_b s, ieu_uwq_sel_enumerators e, ieu_wp_act_param_sets_tl stl
120: where e. sel_enum_id = rec_obj.enum_id
121: --and e.application_id = m.application_id
122: and e.enum_type_uuid = m.action_map_code
134:
135: elsif (p_maction_def_type_flag = 'F') then
136:
137: select count(b.maction_def_id) into l_act_usr_lbl_count
138: from ieu_uwq_maction_defs_b b, ieu_uwq_maction_defs_tl tl, ieu_wp_action_maps m,
139: ieu_wp_act_param_sets_b s, ieu_uwq_sel_enumerators e,
140: ieu_wp_act_param_sets_tl stl, ieu_uwq_node_ds ds
141: where e. sel_enum_id = rec_obj.enum_id
142: --and e.application_id = m.application_id
155:
156:
157:
158: select count(b.maction_def_id) into l_set_id_count
159: from ieu_uwq_maction_defs_b b, ieu_uwq_maction_defs_tl tl, ieu_wp_action_maps m,
160: ieu_wp_act_param_sets_b s, ieu_uwq_sel_enumerators e,
161: ieu_wp_act_param_sets_tl stl, ieu_uwq_node_ds ds
162: where e. sel_enum_id = rec_obj.enum_id
163: --and e.application_id = m.application_id
206: if (p_maction_def_type_flag = 'M' or p_maction_def_type_flag = 'N') then
207: -- count how many maction_defs of the same type have the same name, besides the current one
208: select count(mb.maction_def_id) into l_set_id_count
209: from ieu_uwq_maction_defs_tl mtl,
210: ieu_uwq_maction_defs_b mb
211: where mb.maction_def_id = mtl.maction_def_id and
212: mb.maction_def_id <> nvl(rec_obj.maction_def_id, -1) and -- ignore current action's record
213: nvl(mb.maction_def_type_flag, 'M') = p_maction_def_type_flag and
214: mtl.action_user_label = rec_obj.action_user_label and --
224: temp_act_key := LTRIM(RTRIM(rec_obj.maction_def_key));
225:
226: if (is_create = 'Y') then
227:
228: select count(*) into l_act_def_key_count from IEU_UWQ_MACTION_DEFS_B
229: where lower(MACTION_DEF_KEY) = lower(temp_act_key)
230: and maction_def_type_flag = p_maction_def_type_flag;
231:
232:
373:
374: if(p_maction_def_type_flag <> 'F') then
375:
376: select count(b.maction_def_id) into l_act_usr_lbl_count
377: from ieu_uwq_maction_defs_b b, ieu_uwq_maction_defs_tl tl, ieu_wp_action_maps m,
378: ieu_wp_act_param_sets_b s, ieu_uwq_sel_enumerators e, ieu_wp_act_param_sets_tl stl
379: where e. sel_enum_id = p_enum_id
380: -- and e.application_id = m.application_id
381: and e.enum_type_uuid = m.action_map_code
392:
393: --DBMS_OUTPUT.PUT_LINE(' maction lable count : '||l_act_usr_lbl_count);
394:
395: select count(b.maction_def_id) into l_set_id_count
396: from ieu_uwq_maction_defs_b b, ieu_uwq_maction_defs_tl tl, ieu_wp_action_maps m,
397: ieu_wp_act_param_sets_b s, ieu_uwq_sel_enumerators e, ieu_wp_act_param_sets_tl stl
398: where e. sel_enum_id = p_enum_id
399: --and e.application_id = m.application_id
400: and e.enum_type_uuid = m.action_map_code
411:
412: elsif (p_maction_def_type_flag = 'F') then
413:
414: select count(b.maction_def_id) into l_act_usr_lbl_count
415: from ieu_uwq_maction_defs_b b, ieu_uwq_maction_defs_tl tl, ieu_wp_action_maps m,
416: ieu_wp_act_param_sets_b s, ieu_uwq_sel_enumerators e, ieu_wp_act_param_sets_tl stl,
417: IEU_UWQ_NODE_DS ds
418: where e. sel_enum_id = p_enum_id
419: --and e.application_id = m.application_id
433:
434:
435:
436: select count(b.maction_def_id) into l_set_id_count
437: from ieu_uwq_maction_defs_b b, ieu_uwq_maction_defs_tl tl, ieu_wp_action_maps m,
438: ieu_wp_act_param_sets_b s, ieu_uwq_sel_enumerators e, ieu_wp_act_param_sets_tl stl, IEU_UWQ_NODE_DS ds
439: where e. sel_enum_id = p_enum_id
440: --and e.application_id = m.application_id
441: and e.enum_type_uuid = ds.ENUM_TYPE_UUID
623: l_msg_count NUMBER(2);
624:
625: l_msg_data VARCHAR2(2000);
626:
627: l_maction_def_id IEU_UWQ_MACTION_DEFS_B.MACTION_DEF_ID%TYPE;
628:
629: l_action_param_set_id IEU_WP_ACT_PARAM_SETS_B.ACTION_PARAM_SET_ID%TYPE;
630:
631: l_enum_uuid IEU_UWQ_SEL_ENUMERATORS.ENUM_TYPE_UUID%type;
676: --dbms_output.put_line('out out from validate_action :' || l_return_status);
677:
678: if (l_return_status = 'S') then
679: --dbms_output.put_line('out out from validate_action is S');
680: select IEU_UWQ_MACTION_DEFS_B_S1.NEXTVAL into l_maction_def_id from sys.dual;
681:
682: insert INTO IEU_UWQ_MACTION_DEFS_B
683: (MACTION_DEF_ID,
684: CREATED_BY,
678: if (l_return_status = 'S') then
679: --dbms_output.put_line('out out from validate_action is S');
680: select IEU_UWQ_MACTION_DEFS_B_S1.NEXTVAL into l_maction_def_id from sys.dual;
681:
682: insert INTO IEU_UWQ_MACTION_DEFS_B
683: (MACTION_DEF_ID,
684: CREATED_BY,
685: CREATION_DATE,
686: LAST_UPDATED_BY,
799:
800: if (p_maction_def_type_flag <> 'F') then
801:
802: select max(m.action_map_sequence) into l_temp_map_sequence
803: from ieu_wp_action_maps m, ieu_uwq_maction_defs_b db,
804: ieu_wp_act_param_sets_b sb
805: --where m.application_id = rec_obj.application_id
806: where m.action_map_type_code = 'NODE'
807: and m.action_map_code = l_enum_uuid
1030:
1031:
1032: if (l_return_status = 'S') then
1033: if (p_maction_def_type_flag = 'N' or p_maction_def_type_flag = 'M') then
1034: update IEU_UWQ_MACTION_DEFS_B set
1035: LAST_UPDATED_BY = FND_GLOBAL.USER_ID,
1036: LAST_UPDATE_DATE = SYSDATE,
1037: LAST_UPDATE_LOGIN = FND_GLOBAL.LOGIN_ID,
1038: ACTION_PROC = LTRIM(RTRIM(rec_obj.action_proc)),
1050: and l_language IN (language, source_lang);
1051:
1052:
1053: else
1054: update IEU_UWQ_MACTION_DEFS_B set
1055: LAST_UPDATED_BY = FND_GLOBAL.USER_ID,
1056: LAST_UPDATE_DATE = SYSDATE,
1057: LAST_UPDATE_LOGIN = FND_GLOBAL.LOGIN_ID,
1058: ACTION_PROC = LTRIM(RTRIM(rec_obj.action_proc)),
1119: where WP_ACTION_DEF_ID = x_action_def_id;
1120:
1121:
1122:
1123: delete from IEU_UWQ_MACTION_DEFS_B
1124: where MACTION_DEF_ID = x_action_def_id;
1125:
1126: if (sql%notfound) then
1127: null;
1182:
1183: l_language VARCHAR2(4);
1184:
1185: l_action_param_set_id IEU_WP_ACT_PARAM_SETS_B.ACTION_PARAM_SET_ID%type;
1186: l_maction_def_id IEU_UWQ_MACTION_DEFS_B.MACTION_DEF_ID%type;
1187: l_num_map_entries NUMBER;
1188: l_num_set_entries NUMBER;
1189:
1190: l_count_map NUMBER;
1187: l_num_map_entries NUMBER;
1188: l_num_set_entries NUMBER;
1189:
1190: l_count_map NUMBER;
1191: l_def_type_flag IEU_UWQ_MACTION_DEFS_B.MACTION_DEF_TYPE_FLAG%type;
1192: l_mact_def_id IEU_UWQ_MACTION_DEFS_B.MACTION_DEF_ID%type;
1193: l_section_id number;
1194:
1195: BEGIN
1188: l_num_set_entries NUMBER;
1189:
1190: l_count_map NUMBER;
1191: l_def_type_flag IEU_UWQ_MACTION_DEFS_B.MACTION_DEF_TYPE_FLAG%type;
1192: l_mact_def_id IEU_UWQ_MACTION_DEFS_B.MACTION_DEF_ID%type;
1193: l_section_id number;
1194:
1195: BEGIN
1196: x_return_status := fnd_api.g_ret_sts_success;
1208:
1209: --I.
1210: SELECT db.maction_def_type_flag
1211: into l_def_type_flag
1212: FROM ieu_uwq_maction_defs_b db,
1213: ieu_wp_act_param_sets_b sb
1214: WHERE db.maction_def_id = sb.wp_action_def_id
1215: AND sb.action_param_set_id = x_param_set_id;
1216:
1262: (SELECT action_param_set_id
1263: FROM ieu_wp_act_param_sets_b
1264: WHERE wp_action_def_id in
1265: (select maction_def_id
1266: from ieu_uwq_maction_defs_b
1267: where maction_def_type_flag = l_def_type_flag
1268: )
1269: );
1270: if (l_count_map = 0) then
1338:
1339: DELETE FROM ieu_uwq_maction_defs_tl
1340: WHERE maction_def_id = l_maction_def_id;
1341:
1342: DELETE FROM ieu_uwq_maction_defs_b
1343: WHERE maction_def_id = l_maction_def_id;
1344: END IF;
1345: END IF;
1346:
2745: from ieu_uwq_sel_enumerators
2746: where sel_enum_id = p_enum_id;
2747:
2748: select max(m.action_map_sequence) into l_temp_map_sequence
2749: from ieu_wp_action_maps m, ieu_uwq_maction_defs_b db,
2750: ieu_wp_act_param_sets_b sb
2751: --where m.application_id = p_application
2752: where m.action_map_type_code = 'NODE'
2753: and m.action_map_code = l_enum_uuid