50:
51: EXCEPTION
52:
53: WHEN OTHERS THEN
54: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
55: then FND_MSG_PUB.Add_Exc_Msg
56: (G_PKG_NAME,
57: l_api_name
58: );
51: EXCEPTION
52:
53: WHEN OTHERS THEN
54: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
55: then FND_MSG_PUB.Add_Exc_Msg
56: (G_PKG_NAME,
57: l_api_name
58: );
59: end if;
86: x_return_status := FND_API.G_Ret_Sts_Error;
87: WHEN OTHERS THEN
88:
89: x_return_status := fnd_api.g_ret_sts_unexp_error;
90: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
91: then FND_MSG_PUB.Add_Exc_Msg
92: (G_PKG_NAME,
93: l_api_name
94: );
87: WHEN OTHERS THEN
88:
89: x_return_status := fnd_api.g_ret_sts_unexp_error;
90: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
91: then FND_MSG_PUB.Add_Exc_Msg
92: (G_PKG_NAME,
93: l_api_name
94: );
95: end if;
133: x_return_status := FND_API.G_Ret_Sts_Error;
134: WHEN OTHERS THEN
135:
136: x_return_status := fnd_api.g_ret_sts_unexp_error;
137: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
138: then FND_MSG_PUB.Add_Exc_Msg
139: (G_PKG_NAME,
140: l_api_name
141: );
134: WHEN OTHERS THEN
135:
136: x_return_status := fnd_api.g_ret_sts_unexp_error;
137: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
138: then FND_MSG_PUB.Add_Exc_Msg
139: (G_PKG_NAME,
140: l_api_name
141: );
142: end if;
343: x_return_status := FND_API.G_Ret_Sts_Error;
344: WHEN OTHERS THEN
345:
346: x_return_status := fnd_api.g_ret_sts_unexp_error;
347: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
348: then FND_MSG_PUB.Add_Exc_Msg
349: (G_PKG_NAME,
350: l_api_name
351: );
344: WHEN OTHERS THEN
345:
346: x_return_status := fnd_api.g_ret_sts_unexp_error;
347: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
348: then FND_MSG_PUB.Add_Exc_Msg
349: (G_PKG_NAME,
350: l_api_name
351: );
352: end if;
395:
396: EXCEPTION
397:
398: WHEN OTHERS THEN
399: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
400: then FND_MSG_PUB.Add_Exc_Msg
401: (G_PKG_NAME,
402: l_api_name
403: );
396: EXCEPTION
397:
398: WHEN OTHERS THEN
399: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
400: then FND_MSG_PUB.Add_Exc_Msg
401: (G_PKG_NAME,
402: l_api_name
403: );
404: end if;
452: avalue => NULL
453: );
454: EXCEPTION
455: WHEN OTHERS THEN
456: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
457: then FND_MSG_PUB.Add_Exc_Msg
458: (G_PKG_NAME,
459: l_api_name
460: );
453: );
454: EXCEPTION
455: WHEN OTHERS THEN
456: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
457: then FND_MSG_PUB.Add_Exc_Msg
458: (G_PKG_NAME,
459: l_api_name
460: );
461: end if;
512:
513: EXCEPTION
514:
515: WHEN OTHERS THEN
516: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
517: then FND_MSG_PUB.Add_Exc_Msg
518: (G_PKG_NAME,
519: l_api_name
520: );
513: EXCEPTION
514:
515: WHEN OTHERS THEN
516: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
517: then FND_MSG_PUB.Add_Exc_Msg
518: (G_PKG_NAME,
519: l_api_name
520: );
521: end if;
571: );
572: EXCEPTION
573:
574: WHEN OTHERS THEN
575: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
576: then FND_MSG_PUB.Add_Exc_Msg
577: (G_PKG_NAME,
578: l_api_name
579: );
572: EXCEPTION
573:
574: WHEN OTHERS THEN
575: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
576: then FND_MSG_PUB.Add_Exc_Msg
577: (G_PKG_NAME,
578: l_api_name
579: );
580: end if;
631:
632: EXCEPTION
633:
634: WHEN OTHERS THEN
635: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
636: then FND_MSG_PUB.Add_Exc_Msg
637: (G_PKG_NAME,
638: l_api_name
639: );
632: EXCEPTION
633:
634: WHEN OTHERS THEN
635: if FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
636: then FND_MSG_PUB.Add_Exc_Msg
637: (G_PKG_NAME,
638: l_api_name
639: );
640: end if;
688: x_resource_id => l_resource_id,
689: x_person_name => l_person_name,
690: x_return_status => l_temp_status);
691:
692: if fnd_msg_pub.check_msg_level( fnd_msg_pub.g_msg_lvl_debug_medium )
693: AND l_temp_status <> FND_API.G_RET_STS_SUCCESS
694: then
695: fnd_message.set_name ('JTF', 'JTF_EC_DET_ERROR');
696: fnd_msg_pub.Add;
692: if fnd_msg_pub.check_msg_level( fnd_msg_pub.g_msg_lvl_debug_medium )
693: AND l_temp_status <> FND_API.G_RET_STS_SUCCESS
694: then
695: fnd_message.set_name ('JTF', 'JTF_EC_DET_ERROR');
696: fnd_msg_pub.Add;
697: end if;
698:
699: x_doc_type := details_rec.object_type;
700: x_doc_number := details_rec.object_number;
715: WHEN OTHERS THEN
716:
717: x_return_status := fnd_api.g_ret_sts_unexp_error;
718:
719: if FND_MSG_PUB.Check_Msg_Level
720: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
721: then
722: FND_MSG_PUB.Add_Exc_Msg
723: (G_PKG_NAME,
716:
717: x_return_status := fnd_api.g_ret_sts_unexp_error;
718:
719: if FND_MSG_PUB.Check_Msg_Level
720: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
721: then
722: FND_MSG_PUB.Add_Exc_Msg
723: (G_PKG_NAME,
724: l_api_name
718:
719: if FND_MSG_PUB.Check_Msg_Level
720: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
721: then
722: FND_MSG_PUB.Add_Exc_Msg
723: (G_PKG_NAME,
724: l_api_name
725: );
726: end if;
977: WHEN OTHERS THEN
978:
979: x_return_status := fnd_api.g_ret_sts_unexp_error;
980:
981: if FND_MSG_PUB.Check_Msg_Level
982: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
983: then
984: FND_MSG_PUB.Add_Exc_Msg
985: (G_PKG_NAME,
978:
979: x_return_status := fnd_api.g_ret_sts_unexp_error;
980:
981: if FND_MSG_PUB.Check_Msg_Level
982: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
983: then
984: FND_MSG_PUB.Add_Exc_Msg
985: (G_PKG_NAME,
986: l_api_name
980:
981: if FND_MSG_PUB.Check_Msg_Level
982: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
983: then
984: FND_MSG_PUB.Add_Exc_Msg
985: (G_PKG_NAME,
986: l_api_name
987: );
988: end if;
1154: -- Check p_init_msg_list
1155:
1156:
1157: IF FND_API.To_Boolean( p_init_msg_list ) THEN
1158: FND_MSG_PUB.initialize;
1159: END IF;
1160:
1161: -- Initialize API return status to success
1162:
1176: close resc_task_details;
1177: fnd_message.set_name ('JTF', 'JTF_EC_TASK_NOT_FOUND');
1178: fnd_message.set_token ('TASK_ID', p_task_id);
1179: -- Add message to API message list.
1180: fnd_msg_pub.Add;
1181: raise fnd_api.g_exc_error;
1182: end if;
1183: close resc_task_details;
1184:
1190: AND (p_owner_changed <> 'Y')
1191: AND (p_target_date_changed <> 'Y')
1192: then
1193: fnd_message.set_name ('JTF', 'JTF_EC_INVALID_EVENT');
1194: fnd_msg_pub.add;
1195: RAISE fnd_api.g_exc_error;
1196: end if;
1197:
1198: if (p_level_changed = 'Y') AND (p_old_level = FND_API.G_MISS_CHAR) then
1196: end if;
1197:
1198: if (p_level_changed = 'Y') AND (p_old_level = FND_API.G_MISS_CHAR) then
1199: fnd_message.set_name ('JTF', 'JTF_EC_OLD_LEVEL');
1200: fnd_msg_pub.add;
1201: RAISE fnd_api.g_exc_error;
1202: end if;
1203:
1204: if ((p_owner_changed = 'Y') AND (p_old_owner_id = FND_API.G_MISS_NUM)) then
1202: end if;
1203:
1204: if ((p_owner_changed = 'Y') AND (p_old_owner_id = FND_API.G_MISS_NUM)) then
1205: fnd_message.set_name ('JTF', 'JTF_EC_OLD_OWNER');
1206: fnd_msg_pub.add;
1207: RAISE fnd_api.g_exc_error;
1208: end if;
1209:
1210: if (p_status_changed = 'Y') AND (p_old_status_id = FND_API.G_MISS_NUM) then
1208: end if;
1209:
1210: if (p_status_changed = 'Y') AND (p_old_status_id = FND_API.G_MISS_NUM) then
1211: fnd_message.set_name ('JTF', 'JTF_EC_OLD_STATUS');
1212: fnd_msg_pub.add;
1213: RAISE fnd_api.g_exc_error;
1214: end if;
1215:
1216: if (p_target_date_changed = 'Y') AND (p_old_target_date = FND_API.G_MISS_DATE) then
1214: end if;
1215:
1216: if (p_target_date_changed = 'Y') AND (p_old_target_date = FND_API.G_MISS_DATE) then
1217: fnd_message.set_name ('JTF', 'JTF_EC_OLD_TARGET');
1218: fnd_msg_pub.add;
1219: RAISE fnd_api.g_exc_error;
1220: end if;
1221:
1222: l_owner_changed := p_owner_changed;
1355: l_owner_name := get_resource_name(task_details_rec.owner_code, task_details_rec.owner_id);
1356:
1357: if l_owner_name is NULL then
1358:
1359: if fnd_msg_pub.check_msg_level( fnd_msg_pub.g_msg_lvl_debug_medium ) then
1360: fnd_message.set_name ('JTF', 'JTF_EC_ERROR');
1361: fnd_msg_pub.Add;
1362: RAISE fnd_api.g_exc_error;
1363: end if;
1357: if l_owner_name is NULL then
1358:
1359: if fnd_msg_pub.check_msg_level( fnd_msg_pub.g_msg_lvl_debug_medium ) then
1360: fnd_message.set_name ('JTF', 'JTF_EC_ERROR');
1361: fnd_msg_pub.Add;
1362: RAISE fnd_api.g_exc_error;
1363: end if;
1364:
1365: end if;
1404: x_return_status => l_temp_status);
1405:
1406: if (l_temp_status <> FND_API.G_RET_STS_SUCCESS) then
1407:
1408: if fnd_msg_pub.check_msg_level( fnd_msg_pub.g_msg_lvl_debug_medium ) then
1409: fnd_message.set_name ('JTF', 'JTF_EC_ERROR');
1410: fnd_msg_pub.Add;
1411: RAISE fnd_api.g_exc_error;
1412: end if;
1406: if (l_temp_status <> FND_API.G_RET_STS_SUCCESS) then
1407:
1408: if fnd_msg_pub.check_msg_level( fnd_msg_pub.g_msg_lvl_debug_medium ) then
1409: fnd_message.set_name ('JTF', 'JTF_EC_ERROR');
1410: fnd_msg_pub.Add;
1411: RAISE fnd_api.g_exc_error;
1412: end if;
1413:
1414: end if;
1541: fetch c_esc_status into l_esc_status;
1542:
1543: if c_esc_status%NOTFOUND then
1544: close c_esc_status;
1545: if fnd_msg_pub.check_msg_level( fnd_msg_pub.g_msg_lvl_debug_medium ) then
1546: fnd_message.set_name ('JTF', 'JTF_EC_ERROR');
1547: fnd_msg_pub.Add;
1548: RAISE fnd_api.g_exc_error;
1549: end if;
1543: if c_esc_status%NOTFOUND then
1544: close c_esc_status;
1545: if fnd_msg_pub.check_msg_level( fnd_msg_pub.g_msg_lvl_debug_medium ) then
1546: fnd_message.set_name ('JTF', 'JTF_EC_ERROR');
1547: fnd_msg_pub.Add;
1548: RAISE fnd_api.g_exc_error;
1549: end if;
1550: end if;
1551:
1579: open c_esc_level(p_old_level);
1580: fetch c_esc_level into l_esc_level;
1581: if c_esc_level%NOTFOUND then
1582: close c_esc_level;
1583: if fnd_msg_pub.check_msg_level( fnd_msg_pub.g_msg_lvl_debug_medium ) then
1584: fnd_message.set_name ('JTF', 'JTF_EC_ERROR');
1585: fnd_msg_pub.Add;
1586: RAISE fnd_api.g_exc_error;
1587: end if;
1581: if c_esc_level%NOTFOUND then
1582: close c_esc_level;
1583: if fnd_msg_pub.check_msg_level( fnd_msg_pub.g_msg_lvl_debug_medium ) then
1584: fnd_message.set_name ('JTF', 'JTF_EC_ERROR');
1585: fnd_msg_pub.Add;
1586: RAISE fnd_api.g_exc_error;
1587: end if;
1588: end if;
1589: close c_esc_level;
1591: open c_esc_old_level(p_old_level);
1592: fetch c_esc_old_level into l_esc_level;
1593: if c_esc_old_level%NOTFOUND then
1594: close c_esc_old_level;
1595: if fnd_msg_pub.check_msg_level( fnd_msg_pub.g_msg_lvl_debug_medium ) then
1596: fnd_message.set_name ('JTF', 'JTF_EC_ERROR');
1597: fnd_msg_pub.Add;
1598: RAISE fnd_api.g_exc_error;
1599: end if;
1593: if c_esc_old_level%NOTFOUND then
1594: close c_esc_old_level;
1595: if fnd_msg_pub.check_msg_level( fnd_msg_pub.g_msg_lvl_debug_medium ) then
1596: fnd_message.set_name ('JTF', 'JTF_EC_ERROR');
1597: fnd_msg_pub.Add;
1598: RAISE fnd_api.g_exc_error;
1599: end if;
1600: end if;
1601: close c_esc_old_level;
1695: END IF;
1696:
1697: x_notif_not_sent := g_notif_not_sent;
1698:
1699: fnd_msg_pub.count_and_get
1700: ( p_count => x_msg_count,
1701: p_data => x_msg_data
1702: );
1703:
1706: WHEN fnd_api.g_exc_error
1707: THEN
1708: ROLLBACK TO Start_Resc_Workflow;
1709: x_return_status := fnd_api.g_ret_sts_error;
1710: fnd_msg_pub.count_and_get (
1711: p_count => x_msg_count,
1712: p_data => x_msg_data
1713: );
1714:
1729: if (l_errname is not null) then
1730: fnd_message.set_name('FND', 'WF_ERROR');
1731: fnd_message.set_token('ERROR_MESSAGE', l_errmsg);
1732: fnd_message.set_token('ERROR_STACK', l_errstack);
1733: fnd_msg_pub.add;
1734: end if;
1735:
1736: x_return_status := fnd_api.g_ret_sts_unexp_error;
1737: FND_MSG_PUB.Add_Exc_Msg
1733: fnd_msg_pub.add;
1734: end if;
1735:
1736: x_return_status := fnd_api.g_ret_sts_unexp_error;
1737: FND_MSG_PUB.Add_Exc_Msg
1738: (G_PKG_NAME,
1739: l_api_name
1740: );
1741: fnd_msg_pub.count_and_get (
1737: FND_MSG_PUB.Add_Exc_Msg
1738: (G_PKG_NAME,
1739: l_api_name
1740: );
1741: fnd_msg_pub.count_and_get (
1742: p_count => x_msg_count,
1743: p_data => x_msg_data
1744: );
1745:
1746: WHEN OTHERS
1747: THEN
1748: ROLLBACK TO Start_Resc_Workflow;
1749: x_return_status := fnd_api.g_ret_sts_unexp_error;
1750: if FND_MSG_PUB.Check_Msg_Level
1751: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1752: then
1753: FND_MSG_PUB.Add_Exc_Msg
1754: (G_PKG_NAME,
1747: THEN
1748: ROLLBACK TO Start_Resc_Workflow;
1749: x_return_status := fnd_api.g_ret_sts_unexp_error;
1750: if FND_MSG_PUB.Check_Msg_Level
1751: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1752: then
1753: FND_MSG_PUB.Add_Exc_Msg
1754: (G_PKG_NAME,
1755: l_api_name
1749: x_return_status := fnd_api.g_ret_sts_unexp_error;
1750: if FND_MSG_PUB.Check_Msg_Level
1751: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1752: then
1753: FND_MSG_PUB.Add_Exc_Msg
1754: (G_PKG_NAME,
1755: l_api_name
1756: );
1757: end if;
1755: l_api_name
1756: );
1757: end if;
1758:
1759: fnd_msg_pub.count_and_get (
1760: p_count => x_msg_count,
1761: p_data => x_msg_data
1762: );
1763: END Start_Resc_Workflow;