31: G_WF_ITM_RESULT CONSTANT wf_item_attributes.name%TYPE DEFAULT 'RESULT';
32: G_WF_ITM_APPROVED_YN_YES CONSTANT wf_item_attributes.name%TYPE DEFAULT 'APPROVED';
33: G_WF_ITM_APPROVED_YN_NO CONSTANT wf_item_attributes.name%TYPE DEFAULT 'REJECTED';
34:
35: --function to return the message from fnd message for the subject of the notifications
36:
37: FUNCTION get_message(p_msg_name IN VARCHAR2, object_name IN VARCHAR2,
38: object_value IN VARCHAR2) RETURN VARCHAR2 IS
39: l_message VARCHAR2(100);
40:
41: BEGIN
42:
43: IF p_msg_name IS NOT NULL THEN
44: Fnd_Message.SET_NAME(APPLICATION => G_APP_NAME, NAME => p_msg_name);
45: Fnd_Message.SET_TOKEN(TOKEN => G_MSG_TOKEN_OBJECT_NAME,
46: VALUE => object_name);
47: Fnd_Message.SET_TOKEN(TOKEN => G_MSG_TOKEN_NAME, VALUE => object_value);
48: l_message := fnd_message.get();
41: BEGIN
42:
43: IF p_msg_name IS NOT NULL THEN
44: Fnd_Message.SET_NAME(APPLICATION => G_APP_NAME, NAME => p_msg_name);
45: Fnd_Message.SET_TOKEN(TOKEN => G_MSG_TOKEN_OBJECT_NAME,
46: VALUE => object_name);
47: Fnd_Message.SET_TOKEN(TOKEN => G_MSG_TOKEN_NAME, VALUE => object_value);
48: l_message := fnd_message.get();
49: END IF;
43: IF p_msg_name IS NOT NULL THEN
44: Fnd_Message.SET_NAME(APPLICATION => G_APP_NAME, NAME => p_msg_name);
45: Fnd_Message.SET_TOKEN(TOKEN => G_MSG_TOKEN_OBJECT_NAME,
46: VALUE => object_name);
47: Fnd_Message.SET_TOKEN(TOKEN => G_MSG_TOKEN_NAME, VALUE => object_value);
48: l_message := fnd_message.get();
49: END IF;
50: RETURN l_message;
51: EXCEPTION
44: Fnd_Message.SET_NAME(APPLICATION => G_APP_NAME, NAME => p_msg_name);
45: Fnd_Message.SET_TOKEN(TOKEN => G_MSG_TOKEN_OBJECT_NAME,
46: VALUE => object_name);
47: Fnd_Message.SET_TOKEN(TOKEN => G_MSG_TOKEN_NAME, VALUE => object_value);
48: l_message := fnd_message.get();
49: END IF;
50: RETURN l_message;
51: EXCEPTION
52: WHEN OTHERS THEN
52: WHEN OTHERS THEN
53: RETURN NULL;
54: END get_message;
55:
56: -- get the message for a message name frm fnd messages
57:
58: FUNCTION get_token(p_msg_name IN VARCHAR2, token_name IN VARCHAR2,
59: token_value IN VARCHAR2) RETURN VARCHAR2 IS
60: l_message VARCHAR2(100);
61:
62: BEGIN
63:
64: IF p_msg_name IS NOT NULL THEN
65: Fnd_Message.SET_NAME(APPLICATION => G_APP_NAME, NAME => p_msg_name);
66: Fnd_Message.SET_TOKEN(TOKEN => token_name, VALUE => token_value);
67: l_message := fnd_message.get();
68: END IF;
69: RETURN l_message;
62: BEGIN
63:
64: IF p_msg_name IS NOT NULL THEN
65: Fnd_Message.SET_NAME(APPLICATION => G_APP_NAME, NAME => p_msg_name);
66: Fnd_Message.SET_TOKEN(TOKEN => token_name, VALUE => token_value);
67: l_message := fnd_message.get();
68: END IF;
69: RETURN l_message;
70: EXCEPTION
63:
64: IF p_msg_name IS NOT NULL THEN
65: Fnd_Message.SET_NAME(APPLICATION => G_APP_NAME, NAME => p_msg_name);
66: Fnd_Message.SET_TOKEN(TOKEN => token_name, VALUE => token_value);
67: l_message := fnd_message.get();
68: END IF;
69: RETURN l_message;
70: EXCEPTION
71: WHEN OTHERS THEN