DBA Data[Home] [Help]

APPS.WF_MAIL dependencies on DBMS_LOB

Line 2060: DBMS_LOB.writeAppend(lob_loc => doc,

2056: str_buffer := str_buffer || g_newLine;
2057:
2058: if(length(str_buffer) > 24000) then
2059: str_buffer := UrlEncode(str_buffer);
2060: DBMS_LOB.writeAppend(lob_loc => doc,
2061: amount => length(str_buffer),
2062: buffer => str_buffer);
2063: str_buffer := '';
2064: end if;

Line 2066: -- DBMS_LOB.writeAppend(g_LOBTable(bufferIdx).temp_lob,

2062: buffer => str_buffer);
2063: str_buffer := '';
2064: end if;
2065:
2066: -- DBMS_LOB.writeAppend(g_LOBTable(bufferIdx).temp_lob,
2067: -- length(str_buffer),
2068: -- str_buffer);
2069: -- str_buffer := '';
2070:

Line 2074: DBMS_LOB.writeAppend(lob_loc => doc,

2070:
2071: end loop;
2072: if(length(str_buffer) > 0) then
2073: str_buffer := UrlEncode(str_buffer);
2074: DBMS_LOB.writeAppend(lob_loc => doc,
2075: amount => length(str_buffer),
2076: buffer => str_buffer);
2077: str_buffer := '';
2078: end if;

Line 2079: -- DBMS_LOB.Append(doc, g_LOBTable(bufferIdx).temp_lob);

2075: amount => length(str_buffer),
2076: buffer => str_buffer);
2077: str_buffer := '';
2078: end if;
2079: -- DBMS_LOB.Append(doc, g_LOBTable(bufferIdx).temp_lob);
2080: -- wf_temp_lob.releaseLob(g_LOBTable, bufferIdx);
2081:
2082: exception
2083: when others then

Line 3425: -- DBMS_LOB.CreateTemporary(temp, TRUE, DBMS_LOB.CALL);

3421: tokenFound boolean;
3422:
3423: begin
3424:
3425: -- DBMS_LOB.CreateTemporary(temp, TRUE, DBMS_LOB.CALL);
3426: tempIdx := -1;
3427:
3428: offset := 1;
3429: sourcePos := 1;

Line 3432: msgLen := DBMS_LOB.GetLength(message);

3428: offset := 1;
3429: sourcePos := 1;
3430: targetPos := 1;
3431: continue := TRUE;
3432: msgLen := DBMS_LOB.GetLength(message);
3433: tokenLen := length(token);
3434: tokenFound := FALSE;
3435:
3436: while continue

Line 3439: pos := DBMS_LOB.Instr(message, token, offset, 1);

3435:
3436: while continue
3437: loop
3438:
3439: pos := DBMS_LOB.Instr(message, token, offset, 1);
3440: if (pos <> 0) then
3441: if (pos + tokenLen <= msgLen) then
3442: nextChar := upper(dbms_lob.substr(message, 1, pos + tokenLen));
3443: if (instr(xSet, nextChar,1,1) > 0) then

Line 3442: nextChar := upper(dbms_lob.substr(message, 1, pos + tokenLen));

3438:
3439: pos := DBMS_LOB.Instr(message, token, offset, 1);
3440: if (pos <> 0) then
3441: if (pos + tokenLen <= msgLen) then
3442: nextChar := upper(dbms_lob.substr(message, 1, pos + tokenLen));
3443: if (instr(xSet, nextChar,1,1) > 0) then
3444: validToken := false;
3445: else
3446: validToken := true;

Line 3464: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,

3460: if tempIdx = -1 then
3461: tempIdx := wf_temp_lob.getLob(g_LOBTable);
3462: end if;
3463: amount := pos - sourcePos;
3464: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,
3465: src_lob => message,
3466: amount => amount,
3467: dest_offset => targetPos,
3468: src_offset => sourcePos);

Line 3470: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob,

3466: amount => amount,
3467: dest_offset => targetPos,
3468: src_offset => sourcePos);
3469: if (tokenValue <> '' or tokenValue is not null) then
3470: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob,
3471: length(tokenValue), tokenValue);
3472: end if;
3473: sourcePos := pos + tokenLen;
3474: targetPos := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob) + 1;

Line 3474: targetPos := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob) + 1;

3470: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob,
3471: length(tokenValue), tokenValue);
3472: end if;
3473: sourcePos := pos + tokenLen;
3474: targetPos := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob) + 1;
3475: tokenFound := TRUE;
3476: end if;
3477: offset := pos + tokenLen;
3478: else

Line 3484: DBMS_LOB.Copy(g_LOBTable(tempIdx).temp_lob, message, amount,

3480: if (amount > 0)then
3481: if tempIdx = -1 then
3482: tempIdx := wf_temp_lob.getLob(g_LOBTable);
3483: end if;
3484: DBMS_LOB.Copy(g_LOBTable(tempIdx).temp_lob, message, amount,
3485: targetPos, sourcePos);
3486: end if;
3487:
3488: if (append and tokenFound = FALSE and msgLen > 0) then

Line 3493: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob,

3489: if (tokenValue <> '' or tokenValue is not null) then
3490: if tempIdx = -1 then
3491: tempIdx := wf_temp_lob.getLob(g_LOBTable);
3492: end if;
3493: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob,
3494: length(tokenValue), tokenValue);
3495: end if;
3496: end if;
3497: end if; -- CONTINUE

Line 3502: msgLen := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob);

3498:
3499: end loop;
3500:
3501: if tokenFound = TRUE then
3502: msgLen := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob);
3503: DBMS_LOB.Trim(message, 0);
3504: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob, msgLen);
3505: end if;
3506:

Line 3503: DBMS_LOB.Trim(message, 0);

3499: end loop;
3500:
3501: if tokenFound = TRUE then
3502: msgLen := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob);
3503: DBMS_LOB.Trim(message, 0);
3504: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob, msgLen);
3505: end if;
3506:
3507: -- << sstomar bug 6511028 >> Release allocated TEMP LOb.

Line 3504: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob, msgLen);

3500:
3501: if tokenFound = TRUE then
3502: msgLen := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob);
3503: DBMS_LOB.Trim(message, 0);
3504: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob, msgLen);
3505: end if;
3506:
3507: -- << sstomar bug 6511028 >> Release allocated TEMP LOb.
3508: if tempIdx <> -1 then

Line 3555: -- DBMS_LOB.CreateTemporary(temp, FALSE, DBMS_LOB.CALL);

3551: '0123456789_';
3552: tokenFound boolean;
3553:
3554: begin
3555: -- DBMS_LOB.CreateTemporary(temp, FALSE, DBMS_LOB.CALL);
3556: tempIdx := wf_temp_lob.getLob(g_LOBTable);
3557:
3558: offset := 1;
3559: sourcePos := 1;

Line 3562: msgLen := DBMS_LOB.GetLength(message);

3558: offset := 1;
3559: sourcePos := 1;
3560: targetPos := 1;
3561: continue := TRUE;
3562: msgLen := DBMS_LOB.GetLength(message);
3563: tokenLen := length(token);
3564: tokenFound := FALSE;
3565:
3566: while continue

Line 3568: pos := DBMS_LOB.Instr(message, token, offset, 1);

3564: tokenFound := FALSE;
3565:
3566: while continue
3567: loop
3568: pos := DBMS_LOB.Instr(message, token, offset, 1);
3569:
3570: if pos <> 0 then
3571: if (pos + tokenLen <= msgLen) then
3572: nextChar := upper(dbms_lob.substr(message, 1, pos + tokenLen));

Line 3572: nextChar := upper(dbms_lob.substr(message, 1, pos + tokenLen));

3568: pos := DBMS_LOB.Instr(message, token, offset, 1);
3569:
3570: if pos <> 0 then
3571: if (pos + tokenLen <= msgLen) then
3572: nextChar := upper(dbms_lob.substr(message, 1, pos + tokenLen));
3573: if (instr(xSet, nextChar,1,1) > 0) then
3574: validToken := false;
3575: else
3576: validToken := true;

Line 3589: DBMS_LOB.Copy(g_LOBTable(tempIdx).temp_lob, message, amount,

3585:
3586: if continue then
3587: if validToken then
3588: amount := pos - sourcePos;
3589: DBMS_LOB.Copy(g_LOBTable(tempIdx).temp_lob, message, amount,
3590: targetPos, sourcePos);
3591: tokenValueLen := DBMS_LOB.GetLength(tokenValue);
3592: if (tokenValueLen > 0) then
3593: DBMS_LOB.Append(g_LOBTable(tempIdx).temp_lob, tokenValue);

Line 3591: tokenValueLen := DBMS_LOB.GetLength(tokenValue);

3587: if validToken then
3588: amount := pos - sourcePos;
3589: DBMS_LOB.Copy(g_LOBTable(tempIdx).temp_lob, message, amount,
3590: targetPos, sourcePos);
3591: tokenValueLen := DBMS_LOB.GetLength(tokenValue);
3592: if (tokenValueLen > 0) then
3593: DBMS_LOB.Append(g_LOBTable(tempIdx).temp_lob, tokenValue);
3594: end if;
3595: sourcePos := pos + tokenLen;

Line 3593: DBMS_LOB.Append(g_LOBTable(tempIdx).temp_lob, tokenValue);

3589: DBMS_LOB.Copy(g_LOBTable(tempIdx).temp_lob, message, amount,
3590: targetPos, sourcePos);
3591: tokenValueLen := DBMS_LOB.GetLength(tokenValue);
3592: if (tokenValueLen > 0) then
3593: DBMS_LOB.Append(g_LOBTable(tempIdx).temp_lob, tokenValue);
3594: end if;
3595: sourcePos := pos + tokenLen;
3596: targetPos := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob) + 1;
3597: tokenFound := TRUE;

Line 3596: targetPos := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob) + 1;

3592: if (tokenValueLen > 0) then
3593: DBMS_LOB.Append(g_LOBTable(tempIdx).temp_lob, tokenValue);
3594: end if;
3595: sourcePos := pos + tokenLen;
3596: targetPos := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob) + 1;
3597: tokenFound := TRUE;
3598: end if;
3599: offset := pos + tokenLen;
3600: else

Line 3603: DBMS_LOB.Copy(g_LOBTable(tempIdx).temp_lob, message, amount,

3599: offset := pos + tokenLen;
3600: else
3601: amount := msgLen - sourcePos + 1;
3602: if (amount > 0) then
3603: DBMS_LOB.Copy(g_LOBTable(tempIdx).temp_lob, message, amount,
3604: targetPos, sourcePos);
3605: end if;
3606:
3607: if (append and tokenFound = FALSE and msgLen > 0) then

Line 3608: tokenValueLen := DBMS_LOB.GetLength(tokenValue);

3604: targetPos, sourcePos);
3605: end if;
3606:
3607: if (append and tokenFound = FALSE and msgLen > 0) then
3608: tokenValueLen := DBMS_LOB.GetLength(tokenValue);
3609: if tokenValueLen <> 0 then
3610: DBMS_LOB.Append(g_LOBTable(tempIdx).temp_lob, tokenValue);
3611: end if;
3612: end if;

Line 3610: DBMS_LOB.Append(g_LOBTable(tempIdx).temp_lob, tokenValue);

3606:
3607: if (append and tokenFound = FALSE and msgLen > 0) then
3608: tokenValueLen := DBMS_LOB.GetLength(tokenValue);
3609: if tokenValueLen <> 0 then
3610: DBMS_LOB.Append(g_LOBTable(tempIdx).temp_lob, tokenValue);
3611: end if;
3612: end if;
3613: end if;
3614: end loop;

Line 3617: msgLen := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob);

3613: end if;
3614: end loop;
3615:
3616: if tokenFound then
3617: msgLen := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob);
3618: DBMS_LOB.Trim(message, 0);
3619: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob, msgLen);
3620: end if;
3621: wf_temp_lob.releaseLob(g_LOBTable, tempIdx);

Line 3618: DBMS_LOB.Trim(message, 0);

3614: end loop;
3615:
3616: if tokenFound then
3617: msgLen := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob);
3618: DBMS_LOB.Trim(message, 0);
3619: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob, msgLen);
3620: end if;
3621: wf_temp_lob.releaseLob(g_LOBTable, tempIdx);
3622:

Line 3619: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob, msgLen);

3615:
3616: if tokenFound then
3617: msgLen := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob);
3618: DBMS_LOB.Trim(message, 0);
3619: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob, msgLen);
3620: end if;
3621: wf_temp_lob.releaseLob(g_LOBTable, tempIdx);
3622:
3623: exception

Line 3719: -- DBMS_LOB.CreateTemporary(temp, TRUE, DBMS_LOB.SESSION);

3715: --n_priority_text := wf_core.substitute('WFTKN', 'LOW');
3716: n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
3717: end if;
3718:
3719: -- DBMS_LOB.CreateTemporary(temp, TRUE, DBMS_LOB.SESSION);
3720: -- DBMS_LOB.Open(temp, DBMS_LOB.LOB_READWRITE);
3721: tempIdx := wf_temp_lob.getLob(g_LOBTable);
3722:
3723: pos := 1;

Line 3720: -- DBMS_LOB.Open(temp, DBMS_LOB.LOB_READWRITE);

3716: n_priority_text := wf_core.substitute('WFTKN', 'HIGH');
3717: end if;
3718:
3719: -- DBMS_LOB.CreateTemporary(temp, TRUE, DBMS_LOB.SESSION);
3720: -- DBMS_LOB.Open(temp, DBMS_LOB.LOB_READWRITE);
3721: tempIdx := wf_temp_lob.getLob(g_LOBTable);
3722:
3723: pos := 1;
3724: tempPos := 1;

Line 3734: -- DBMS_LOB.Copy(temp, template, (msgLen - pos)+1, tempPos, pos);

3730:
3731: if amper = 0 then
3732: -- No ampers left. so write the rest of the CLOB
3733: if pos < msgLen then
3734: -- DBMS_LOB.Copy(temp, template, (msgLen - pos)+1, tempPos, pos);
3735: DBMS_LOB.Write(g_LOBTable(tempIdx).temp_lob, (msgLen - pos)+1, tempPos,
3736: substr(template, pos, (msgLen - pos)+1));
3737: end if;
3738: EXIT;

Line 3735: DBMS_LOB.Write(g_LOBTable(tempIdx).temp_lob, (msgLen - pos)+1, tempPos,

3731: if amper = 0 then
3732: -- No ampers left. so write the rest of the CLOB
3733: if pos < msgLen then
3734: -- DBMS_LOB.Copy(temp, template, (msgLen - pos)+1, tempPos, pos);
3735: DBMS_LOB.Write(g_LOBTable(tempIdx).temp_lob, (msgLen - pos)+1, tempPos,
3736: substr(template, pos, (msgLen - pos)+1));
3737: end if;
3738: EXIT;
3739: end if;

Line 3746: -- DBMS_LOB.Copy(temp, template, (amper - pos), tempPos, pos);

3742: -- token it is, if any.
3743:
3744: -- write from the last pos to the new token.
3745: if amper > pos then
3746: -- DBMS_LOB.Copy(temp, template, (amper - pos), tempPos, pos);
3747: DBMS_LOB.Write(g_LOBTable(tempIdx).temp_lob, (amper - pos), tempPos,
3748: substr(template, pos, (amper - pos)));
3749: tempPos := tempPos + ((amper - pos));
3750: end if;

Line 3747: DBMS_LOB.Write(g_LOBTable(tempIdx).temp_lob, (amper - pos), tempPos,

3743:
3744: -- write from the last pos to the new token.
3745: if amper > pos then
3746: -- DBMS_LOB.Copy(temp, template, (amper - pos), tempPos, pos);
3747: DBMS_LOB.Write(g_LOBTable(tempIdx).temp_lob, (amper - pos), tempPos,
3748: substr(template, pos, (amper - pos)));
3749: tempPos := tempPos + ((amper - pos));
3750: end if;
3751: pos := amper + 1;

Line 3768: -- DBMS_LOB.WriteAppend(temp, length(n_nidStr), n_nidStr);

3764: -- as only one token can be replaced in each iteration of while loop
3765: if instr(tokenName,'NOTIFICATION_ID',1,1)=1 then
3766: n_nidStr := to_char(n_nid);
3767: if n_nidStr is not null then
3768: -- DBMS_LOB.WriteAppend(temp, length(n_nidStr), n_nidStr);
3769: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_nidStr),
3770: n_nidStr);
3771: tempPos := tempPos + length(n_nidStr);
3772: end if;

Line 3769: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_nidStr),

3765: if instr(tokenName,'NOTIFICATION_ID',1,1)=1 then
3766: n_nidStr := to_char(n_nid);
3767: if n_nidStr is not null then
3768: -- DBMS_LOB.WriteAppend(temp, length(n_nidStr), n_nidStr);
3769: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_nidStr),
3770: n_nidStr);
3771: tempPos := tempPos + length(n_nidStr);
3772: end if;
3773: pos := amper + length('NOTIFICATION_ID') + 1;

Line 3778: -- DBMS_LOB.WriteAppend(temp, length(n_code), n_code);

3774: tokenMatch := TRUE;
3775:
3776: elsif instr(tokenName,'NOTIFICATION',1,1)=1 then
3777: if n_code is not null then
3778: -- DBMS_LOB.WriteAppend(temp, length(n_code), n_code);
3779: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_code),
3780: n_code);
3781: tempPos := tempPos + length(n_code);
3782: end if;

Line 3779: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_code),

3775:
3776: elsif instr(tokenName,'NOTIFICATION',1,1)=1 then
3777: if n_code is not null then
3778: -- DBMS_LOB.WriteAppend(temp, length(n_code), n_code);
3779: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_code),
3780: n_code);
3781: tempPos := tempPos + length(n_code);
3782: end if;
3783: pos := amper + length('NOTIFICATION') + 1;

Line 3788: -- DBMS_LOB.WriteAppend(temp, length(n_status), n_status);

3784: tokenMatch := TRUE;
3785:
3786: elsif instr(tokenName,'STATUS',1,1)=1 then
3787: if n_status is not null then
3788: -- DBMS_LOB.WriteAppend(temp, length(n_status), n_status);
3789: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_status), n_status);
3790: tempPos := tempPos + length(n_status);
3791: end if;
3792: pos := amper + length('STATUS') + 1;

Line 3789: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_status), n_status);

3785:
3786: elsif instr(tokenName,'STATUS',1,1)=1 then
3787: if n_status is not null then
3788: -- DBMS_LOB.WriteAppend(temp, length(n_status), n_status);
3789: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_status), n_status);
3790: tempPos := tempPos + length(n_status);
3791: end if;
3792: pos := amper + length('STATUS') + 1;
3793: tokenMatch := TRUE;

Line 3797: -- DBMS_LOB.WriteAppend(temp, length(r_dname), r_dname);

3793: tokenMatch := TRUE;
3794:
3795: elsif instr(tokenName, 'TO_DNAME', 1, 1)=1 then
3796: if r_dname is not null then
3797: -- DBMS_LOB.WriteAppend(temp, length(r_dname), r_dname);
3798: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(r_dname), r_dname);
3799: tempPos := tempPos + length(r_dname);
3800: end if;
3801: pos := amper + length('TO_DNAME') + 1;

Line 3798: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(r_dname), r_dname);

3794:
3795: elsif instr(tokenName, 'TO_DNAME', 1, 1)=1 then
3796: if r_dname is not null then
3797: -- DBMS_LOB.WriteAppend(temp, length(r_dname), r_dname);
3798: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(r_dname), r_dname);
3799: tempPos := tempPos + length(r_dname);
3800: end if;
3801: pos := amper + length('TO_DNAME') + 1;
3802: tokenMatch := TRUE;

Line 3806: -- DBMS_LOB.WriteAppend(temp, length(r_email), r_email);

3802: tokenMatch := TRUE;
3803:
3804: elsif instr(tokenName, 'TO_EMAIL', 1, 1)=1 then
3805: if r_email is not null then
3806: -- DBMS_LOB.WriteAppend(temp, length(r_email), r_email);
3807: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(r_email), r_email);
3808: tempPos := tempPos + length(r_email);
3809: end if;
3810: pos := amper + length('TO_EMAIL') + 1;

Line 3807: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(r_email), r_email);

3803:
3804: elsif instr(tokenName, 'TO_EMAIL', 1, 1)=1 then
3805: if r_email is not null then
3806: -- DBMS_LOB.WriteAppend(temp, length(r_email), r_email);
3807: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(r_email), r_email);
3808: tempPos := tempPos + length(r_email);
3809: end if;
3810: pos := amper + length('TO_EMAIL') + 1;
3811: tokenMatch := TRUE;

Line 3815: -- DBMS_LOB.WriteAppend(temp, length(n_to_role), n_to_role);

3811: tokenMatch := TRUE;
3812:
3813: elsif instr(tokenName,'TO',1,1)=1 then
3814: if n_to_role is not null then
3815: -- DBMS_LOB.WriteAppend(temp, length(n_to_role), n_to_role);
3816: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_to_role), n_to_role);
3817: tempPos := tempPos + length(n_to_role);
3818: end if;
3819: pos := amper + length('TO') + 1;

Line 3816: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_to_role), n_to_role);

3812:
3813: elsif instr(tokenName,'TO',1,1)=1 then
3814: if n_to_role is not null then
3815: -- DBMS_LOB.WriteAppend(temp, length(n_to_role), n_to_role);
3816: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_to_role), n_to_role);
3817: tempPos := tempPos + length(n_to_role);
3818: end if;
3819: pos := amper + length('TO') + 1;
3820: tokenMatch := TRUE;

Line 3824: -- DBMS_LOB.WriteAppend(temp, length(n_priority_text), n_priority_text);

3820: tokenMatch := TRUE;
3821:
3822: elsif instr(tokenName, 'PRIORITY', 1, 1)=1 then
3823: if n_priority_text is not null then
3824: -- DBMS_LOB.WriteAppend(temp, length(n_priority_text), n_priority_text);
3825: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_priority_text),
3826: n_priority_text);
3827: tempPos := tempPos + length(n_priority_text);
3828: end if;

Line 3825: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_priority_text),

3821:
3822: elsif instr(tokenName, 'PRIORITY', 1, 1)=1 then
3823: if n_priority_text is not null then
3824: -- DBMS_LOB.WriteAppend(temp, length(n_priority_text), n_priority_text);
3825: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_priority_text),
3826: n_priority_text);
3827: tempPos := tempPos + length(n_priority_text);
3828: end if;
3829: pos := amper + length('PRIORITY') + 1;

Line 3834: -- DBMS_LOB.WriteAppend(temp, length(n_start_date), n_start_date);

3830: tokenMatch := TRUE;
3831:
3832: elsif instr(tokenName, 'START_DATE', 1, 1)=1 then
3833: if n_start_date is not null then
3834: -- DBMS_LOB.WriteAppend(temp, length(n_start_date), n_start_date);
3835: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob,
3836: length(n_start_date_text), n_start_date_text);
3837: tempPos := tempPos + length(n_start_date_text);
3838: end if;

Line 3835: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob,

3831:
3832: elsif instr(tokenName, 'START_DATE', 1, 1)=1 then
3833: if n_start_date is not null then
3834: -- DBMS_LOB.WriteAppend(temp, length(n_start_date), n_start_date);
3835: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob,
3836: length(n_start_date_text), n_start_date_text);
3837: tempPos := tempPos + length(n_start_date_text);
3838: end if;
3839: pos := amper + length('START_DATE') + 1;

Line 3844: -- DBMS_LOB.WriteAppend(temp, length(n_due_date_text), n_due_date_text);

3840: tokenMatch := TRUE;
3841:
3842: elsif instr(tokenName, 'DUE_DATE', 1, 1)=1 then
3843: if n_due_date is not null then
3844: -- DBMS_LOB.WriteAppend(temp, length(n_due_date_text), n_due_date_text);
3845: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_due_date_text),
3846: n_due_date_text);
3847: tempPos := tempPos + length(n_due_date_text);
3848: end if;

Line 3845: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_due_date_text),

3841:
3842: elsif instr(tokenName, 'DUE_DATE', 1, 1)=1 then
3843: if n_due_date is not null then
3844: -- DBMS_LOB.WriteAppend(temp, length(n_due_date_text), n_due_date_text);
3845: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_due_date_text),
3846: n_due_date_text);
3847: tempPos := tempPos + length(n_due_date_text);
3848: end if;
3849: pos := amper + length('DUE_DATE') + 1;

Line 3854: -- DBMS_LOB.WriteAppend(temp, length(n_end_date), n_end_date);

3850: tokenMatch := TRUE;
3851:
3852: elsif instr(tokenName, 'END_DATE', 1, 1)=1 then
3853: if n_end_date is not null then
3854: -- DBMS_LOB.WriteAppend(temp, length(n_end_date), n_end_date);
3855: -- DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_end_date),
3856: -- n_end_date);
3857: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_end_date_text),
3858: n_end_date_text);

Line 3855: -- DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_end_date),

3851:
3852: elsif instr(tokenName, 'END_DATE', 1, 1)=1 then
3853: if n_end_date is not null then
3854: -- DBMS_LOB.WriteAppend(temp, length(n_end_date), n_end_date);
3855: -- DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_end_date),
3856: -- n_end_date);
3857: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_end_date_text),
3858: n_end_date_text);
3859:

Line 3857: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_end_date_text),

3853: if n_end_date is not null then
3854: -- DBMS_LOB.WriteAppend(temp, length(n_end_date), n_end_date);
3855: -- DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_end_date),
3856: -- n_end_date);
3857: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_end_date_text),
3858: n_end_date_text);
3859:
3860: tempPos := tempPos + length(n_end_date_text);
3861: end if;

Line 3867: -- DBMS_LOB.WriteAppend(temp, length(n_from_user), n_from_user);

3863: tokenMatch := TRUE;
3864:
3865: elsif instr(tokenName, 'SENDER', 1, 1)=1 then
3866: if n_from_user is not null then
3867: -- DBMS_LOB.WriteAppend(temp, length(n_from_user), n_from_user);
3868: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_from_user),
3869: n_from_user);
3870: tempPos := tempPos + length(n_from_user);
3871: end if;

Line 3868: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_from_user),

3864:
3865: elsif instr(tokenName, 'SENDER', 1, 1)=1 then
3866: if n_from_user is not null then
3867: -- DBMS_LOB.WriteAppend(temp, length(n_from_user), n_from_user);
3868: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(n_from_user),
3869: n_from_user);
3870: tempPos := tempPos + length(n_from_user);
3871: end if;
3872: pos := amper + length('SENDER') + 1;

Line 3877: -- DBMS_LOB.WriteAppend(temp, length(n_comment), n_comment);

3873: tokenMatch := TRUE;
3874:
3875: elsif instr(tokenName, 'COMMENT', 1, 1)=1 then
3876: if n_comment is not null then
3877: -- DBMS_LOB.WriteAppend(temp, length(n_comment), n_comment);
3878: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob,
3879: length(n_comment), n_comment);
3880: tempPos := tempPos + length(n_comment);
3881: end if;

Line 3878: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob,

3874:
3875: elsif instr(tokenName, 'COMMENT', 1, 1)=1 then
3876: if n_comment is not null then
3877: -- DBMS_LOB.WriteAppend(temp, length(n_comment), n_comment);
3878: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob,
3879: length(n_comment), n_comment);
3880: tempPos := tempPos + length(n_comment);
3881: end if;
3882: pos := amper + length('COMMENT') + 1;

Line 3887: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob,

3883: tokenMatch := TRUE;
3884:
3885: elsif instr(tokenName, 'TIMEZONE', 1, 1)=1 then
3886: if n_timezone is not null then
3887: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob,
3888: length(n_timezone), n_timezone);
3889: tempPos := tempPos + length(n_timezone);
3890: end if;
3891: pos := amper + length('TIMEZONE') + 1;

Line 3896: -- DBMS_LOB.WriteAppend(temp, length(m_subject), m_subject);

3892: tokenMatch := TRUE;
3893:
3894: elsif instr(tokenName, 'SUBJECT', 1, 1)=1 then
3895: if m_subject is not null then
3896: -- DBMS_LOB.WriteAppend(temp, length(m_subject), m_subject);
3897: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(m_subject), m_subject);
3898: tempPos := tempPos + length(m_subject);
3899: end if;
3900: pos := amper + length('SUBJECT') + 1;

Line 3897: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(m_subject), m_subject);

3893:
3894: elsif instr(tokenName, 'SUBJECT', 1, 1)=1 then
3895: if m_subject is not null then
3896: -- DBMS_LOB.WriteAppend(temp, length(m_subject), m_subject);
3897: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(m_subject), m_subject);
3898: tempPos := tempPos + length(m_subject);
3899: end if;
3900: pos := amper + length('SUBJECT') + 1;
3901: tokenMatch := TRUE;

Line 3905: --DBMS_LOB.WriteAppend(temp, length(m_header), m_header);

3901: tokenMatch := TRUE;
3902:
3903: elsif instr(tokenName, 'HEADER', 1, 1)=1 then
3904: if m_header is not null then
3905: --DBMS_LOB.WriteAppend(temp, length(m_header), m_header);
3906: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(m_header), m_header);
3907: tempPos := tempPos + length(m_header);
3908: end if;
3909: pos := amper + length('HEADER') + 1;

Line 3906: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(m_header), m_header);

3902:
3903: elsif instr(tokenName, 'HEADER', 1, 1)=1 then
3904: if m_header is not null then
3905: --DBMS_LOB.WriteAppend(temp, length(m_header), m_header);
3906: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(m_header), m_header);
3907: tempPos := tempPos + length(m_header);
3908: end if;
3909: pos := amper + length('HEADER') + 1;
3910: tokenMatch := TRUE;

Line 3913: if (m_body is not null and dbms_lob.getLength(m_body) > 0) or not g_isFwkNtf then

3909: pos := amper + length('HEADER') + 1;
3910: tokenMatch := TRUE;
3911:
3912: elsif instr(tokenName, 'BODY', 1, 1)=1 then
3913: if (m_body is not null and dbms_lob.getLength(m_body) > 0) or not g_isFwkNtf then
3914: DBMS_LOB.Append(g_LOBTable(tempIdx).temp_lob, m_body);
3915: tempPos := tempPos + DBMS_LOB.GetLength(m_body);
3916: pos := amper + length('BODY') + 1;
3917: tokenMatch := TRUE;

Line 3914: DBMS_LOB.Append(g_LOBTable(tempIdx).temp_lob, m_body);

3910: tokenMatch := TRUE;
3911:
3912: elsif instr(tokenName, 'BODY', 1, 1)=1 then
3913: if (m_body is not null and dbms_lob.getLength(m_body) > 0) or not g_isFwkNtf then
3914: DBMS_LOB.Append(g_LOBTable(tempIdx).temp_lob, m_body);
3915: tempPos := tempPos + DBMS_LOB.GetLength(m_body);
3916: pos := amper + length('BODY') + 1;
3917: tokenMatch := TRUE;
3918: else

Line 3915: tempPos := tempPos + DBMS_LOB.GetLength(m_body);

3911:
3912: elsif instr(tokenName, 'BODY', 1, 1)=1 then
3913: if (m_body is not null and dbms_lob.getLength(m_body) > 0) or not g_isFwkNtf then
3914: DBMS_LOB.Append(g_LOBTable(tempIdx).temp_lob, m_body);
3915: tempPos := tempPos + DBMS_LOB.GetLength(m_body);
3916: pos := amper + length('BODY') + 1;
3917: tokenMatch := TRUE;
3918: else
3919: tokenMatch := FALSE;

Line 3924: -- DBMS_LOB.WriteAppend(temp, length(err_name), err_name);

3920: end if;
3921:
3922: elsif instr(tokenName, 'MAIL_ERROR_NAME', 1, 1)=1 then
3923: if err_name is not null then
3924: -- DBMS_LOB.WriteAppend(temp, length(err_name), err_name);
3925: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(err_name), err_name);
3926: tempPos := tempPos + length(err_name);
3927: end if;
3928: pos := amper + length('MAIL_ERROR_NAME') + 1;

Line 3925: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(err_name), err_name);

3921:
3922: elsif instr(tokenName, 'MAIL_ERROR_NAME', 1, 1)=1 then
3923: if err_name is not null then
3924: -- DBMS_LOB.WriteAppend(temp, length(err_name), err_name);
3925: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(err_name), err_name);
3926: tempPos := tempPos + length(err_name);
3927: end if;
3928: pos := amper + length('MAIL_ERROR_NAME') + 1;
3929: tokenMatch := TRUE;

Line 3933: -- DBMS_LOB.WriteAppend(temp, length(err_message), err_message);

3929: tokenMatch := TRUE;
3930:
3931: elsif instr(tokenName, 'MAIL_ERROR_MESSAGE', 1, 1)=1 then
3932: if err_message is not null then
3933: -- DBMS_LOB.WriteAppend(temp, length(err_message), err_message);
3934: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(err_message),
3935: err_message);
3936: tempPos := tempPos + length(err_message);
3937: end if;

Line 3934: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(err_message),

3930:
3931: elsif instr(tokenName, 'MAIL_ERROR_MESSAGE', 1, 1)=1 then
3932: if err_message is not null then
3933: -- DBMS_LOB.WriteAppend(temp, length(err_message), err_message);
3934: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(err_message),
3935: err_message);
3936: tempPos := tempPos + length(err_message);
3937: end if;
3938: pos := amper + length('MAIL_ERROR_MESSAGE') + 1;

Line 3948: -- DBMS_LOB.WriteAppend(temp, length(err_invalid), err_invalid);

3944: -- to go with the WARNING message
3945:
3946: elsif instr(tokenName, 'MAIL_VALUE_FOUND', 1, 1)=1 then
3947: if err_invalid is not null then
3948: -- DBMS_LOB.WriteAppend(temp, length(err_invalid), err_invalid);
3949: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(err_invalid),
3950: err_invalid);
3951: tempPos := tempPos + length(err_invalid);
3952: end if;

Line 3949: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(err_invalid),

3945:
3946: elsif instr(tokenName, 'MAIL_VALUE_FOUND', 1, 1)=1 then
3947: if err_invalid is not null then
3948: -- DBMS_LOB.WriteAppend(temp, length(err_invalid), err_invalid);
3949: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(err_invalid),
3950: err_invalid);
3951: tempPos := tempPos + length(err_invalid);
3952: end if;
3953: pos := amper + length('MAIL_VALUE_FOUND') + 1;

Line 3959: -- DBMS_LOB.WriteAppend(temp, length(err_expected), err_expected);

3955:
3956:
3957: elsif instr(tokenName, 'MAIL_EXP_VALUES', 1, 1)=1 then
3958: if err_expected is not null then
3959: -- DBMS_LOB.WriteAppend(temp, length(err_expected), err_expected);
3960: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(err_expected),
3961: err_expected);
3962: tempPos := tempPos + length(err_expected);
3963: end if;

Line 3960: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(err_expected),

3956:
3957: elsif instr(tokenName, 'MAIL_EXP_VALUES', 1, 1)=1 then
3958: if err_expected is not null then
3959: -- DBMS_LOB.WriteAppend(temp, length(err_expected), err_expected);
3960: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, length(err_expected),
3961: err_expected);
3962: tempPos := tempPos + length(err_expected);
3963: end if;
3964: pos := amper + length('MAIL_EXP_VALUES') + 1;

Line 3969: -- DBMS_LOB.WriteAppend(temp, 1, '&');

3965: tokenMatch := TRUE;
3966: end if;
3967:
3968: if not tokenMatch and amper > 0 then
3969: -- DBMS_LOB.WriteAppend(temp, 1, '&');
3970: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, 1, '&');
3971: tempPos := tempPos + 1;
3972: end if;
3973:

Line 3970: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, 1, '&');

3966: end if;
3967:
3968: if not tokenMatch and amper > 0 then
3969: -- DBMS_LOB.WriteAppend(temp, 1, '&');
3970: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, 1, '&');
3971: tempPos := tempPos + 1;
3972: end if;
3973:
3974: end loop;

Line 3976: -- msgLen := DBMS_LOB.GetLength(temp);

3972: end if;
3973:
3974: end loop;
3975:
3976: -- msgLen := DBMS_LOB.GetLength(temp);
3977: msgLen := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob);
3978: if msgLen > 0 then
3979: DBMS_LOB.Trim(m_body, 0);
3980: -- DBMS_LOB.Copy(m_body, temp, msgLen);

Line 3977: msgLen := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob);

3973:
3974: end loop;
3975:
3976: -- msgLen := DBMS_LOB.GetLength(temp);
3977: msgLen := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob);
3978: if msgLen > 0 then
3979: DBMS_LOB.Trim(m_body, 0);
3980: -- DBMS_LOB.Copy(m_body, temp, msgLen);
3981: DBMS_LOB.Copy(m_body, g_LOBTable(tempIdx).temp_lob, msgLen);

Line 3979: DBMS_LOB.Trim(m_body, 0);

3975:
3976: -- msgLen := DBMS_LOB.GetLength(temp);
3977: msgLen := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob);
3978: if msgLen > 0 then
3979: DBMS_LOB.Trim(m_body, 0);
3980: -- DBMS_LOB.Copy(m_body, temp, msgLen);
3981: DBMS_LOB.Copy(m_body, g_LOBTable(tempIdx).temp_lob, msgLen);
3982: end if;
3983:

Line 3980: -- DBMS_LOB.Copy(m_body, temp, msgLen);

3976: -- msgLen := DBMS_LOB.GetLength(temp);
3977: msgLen := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob);
3978: if msgLen > 0 then
3979: DBMS_LOB.Trim(m_body, 0);
3980: -- DBMS_LOB.Copy(m_body, temp, msgLen);
3981: DBMS_LOB.Copy(m_body, g_LOBTable(tempIdx).temp_lob, msgLen);
3982: end if;
3983:
3984: -- DBMS_LOB.Close(temp);

Line 3981: DBMS_LOB.Copy(m_body, g_LOBTable(tempIdx).temp_lob, msgLen);

3977: msgLen := DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob);
3978: if msgLen > 0 then
3979: DBMS_LOB.Trim(m_body, 0);
3980: -- DBMS_LOB.Copy(m_body, temp, msgLen);
3981: DBMS_LOB.Copy(m_body, g_LOBTable(tempIdx).temp_lob, msgLen);
3982: end if;
3983:
3984: -- DBMS_LOB.Close(temp);
3985: -- DBMS_LOB.FreeTemporary(temp);

Line 3984: -- DBMS_LOB.Close(temp);

3980: -- DBMS_LOB.Copy(m_body, temp, msgLen);
3981: DBMS_LOB.Copy(m_body, g_LOBTable(tempIdx).temp_lob, msgLen);
3982: end if;
3983:
3984: -- DBMS_LOB.Close(temp);
3985: -- DBMS_LOB.FreeTemporary(temp);
3986: wf_temp_lob.releaseLob(g_LOBTable, tempIdx);
3987:
3988: exception

Line 3985: -- DBMS_LOB.FreeTemporary(temp);

3981: DBMS_LOB.Copy(m_body, g_LOBTable(tempIdx).temp_lob, msgLen);
3982: end if;
3983:
3984: -- DBMS_LOB.Close(temp);
3985: -- DBMS_LOB.FreeTemporary(temp);
3986: wf_temp_lob.releaseLob(g_LOBTable, tempIdx);
3987:
3988: exception
3989: when others then

Line 4030: str_length := DBMS_LOB.GetLength(message);

4026: --
4027: lnsize := lineSize;
4028: start_cnt := 1;
4029: end_cnt := lnsize;
4030: str_length := DBMS_LOB.GetLength(message);
4031: if str_length = 0 then
4032: return;
4033: end if;
4034:

Line 4035: -- DBMS_LOB.CreateTemporary(temp, TRUE, DBMS_LOB.CALL);

4031: if str_length = 0 then
4032: return;
4033: end if;
4034:
4035: -- DBMS_LOB.CreateTemporary(temp, TRUE, DBMS_LOB.CALL);
4036: -- DBMS_LOB.CreateTemporary(line, TRUE, DBMS_LOB.CALL);
4037: -- DBMS_LOB.Open(temp, DBMS_LOB.LOB_READWRITE);
4038: -- DBMS_LOB.Open(line, DBMS_LOB.LOB_READWRITE);
4039: tempIdx := wf_temp_lob.getLob(g_LOBTable);

Line 4036: -- DBMS_LOB.CreateTemporary(line, TRUE, DBMS_LOB.CALL);

4032: return;
4033: end if;
4034:
4035: -- DBMS_LOB.CreateTemporary(temp, TRUE, DBMS_LOB.CALL);
4036: -- DBMS_LOB.CreateTemporary(line, TRUE, DBMS_LOB.CALL);
4037: -- DBMS_LOB.Open(temp, DBMS_LOB.LOB_READWRITE);
4038: -- DBMS_LOB.Open(line, DBMS_LOB.LOB_READWRITE);
4039: tempIdx := wf_temp_lob.getLob(g_LOBTable);
4040: lineIdx := wf_temp_lob.getLob(g_LOBTable);

Line 4037: -- DBMS_LOB.Open(temp, DBMS_LOB.LOB_READWRITE);

4033: end if;
4034:
4035: -- DBMS_LOB.CreateTemporary(temp, TRUE, DBMS_LOB.CALL);
4036: -- DBMS_LOB.CreateTemporary(line, TRUE, DBMS_LOB.CALL);
4037: -- DBMS_LOB.Open(temp, DBMS_LOB.LOB_READWRITE);
4038: -- DBMS_LOB.Open(line, DBMS_LOB.LOB_READWRITE);
4039: tempIdx := wf_temp_lob.getLob(g_LOBTable);
4040: lineIdx := wf_temp_lob.getLob(g_LOBTable);
4041:

Line 4038: -- DBMS_LOB.Open(line, DBMS_LOB.LOB_READWRITE);

4034:
4035: -- DBMS_LOB.CreateTemporary(temp, TRUE, DBMS_LOB.CALL);
4036: -- DBMS_LOB.CreateTemporary(line, TRUE, DBMS_LOB.CALL);
4037: -- DBMS_LOB.Open(temp, DBMS_LOB.LOB_READWRITE);
4038: -- DBMS_LOB.Open(line, DBMS_LOB.LOB_READWRITE);
4039: tempIdx := wf_temp_lob.getLob(g_LOBTable);
4040: lineIdx := wf_temp_lob.getLob(g_LOBTable);
4041:
4042: while start_cnt < str_length loop

Line 4044: crpos := DBMS_LOB.instr(message, g_newLine, start_cnt+1, 1) - start_cnt;

4040: lineIdx := wf_temp_lob.getLob(g_LOBTable);
4041:
4042: while start_cnt < str_length loop
4043: -- use the existing newlines as a natural break
4044: crpos := DBMS_LOB.instr(message, g_newLine, start_cnt+1, 1) - start_cnt;
4045:
4046:
4047: if crpos > 0 and crpos < end_cnt then
4048: -- If there was a line bread and it is positioned less than the

Line 4058: DBMS_LOB.substr(message, 1, start_cnt + end_cnt)

4054: end if;
4055:
4056: -- Move forward to the next white space.
4057: while (start_cnt + end_cnt < str_length) and
4058: DBMS_LOB.substr(message, 1, start_cnt + end_cnt)
4059: not in (' ', g_newLine, g_tab)
4060: and end_cnt < maxLineSize loop
4061: end_cnt := end_cnt + 1;
4062: end loop;

Line 4071: DBMS_LOB.substr(message, 1, start_cnt + end_cnt)

4067:
4068: if end_cnt >= (maxLineSize) then
4069: end_cnt := lnsize;
4070: while (start_cnt + end_cnt > start_cnt) and
4071: DBMS_LOB.substr(message, 1, start_cnt + end_cnt)
4072: not in (' ', g_newLine, g_tab)
4073: and end_cnt > 0 loop
4074: end_cnt := end_cnt - 1;
4075: end loop;

Line 4084: -- DBMS_LOB.Trim(line, 0);

4080: end if;
4081: end if;
4082:
4083: -- Ensure the last characters are not lost.
4084: -- DBMS_LOB.Trim(line, 0);
4085: DBMS_LOB.Trim(g_LOBTable(lineIdx).temp_lob, 0);
4086: tempOffset := dbms_lob.getLength(g_LOBTable(tempIdx).temp_lob) +1;
4087: if start_cnt + end_cnt >= str_length then
4088: -- line := DBMS_LOB.substr(message, start_cnt);

Line 4085: DBMS_LOB.Trim(g_LOBTable(lineIdx).temp_lob, 0);

4081: end if;
4082:
4083: -- Ensure the last characters are not lost.
4084: -- DBMS_LOB.Trim(line, 0);
4085: DBMS_LOB.Trim(g_LOBTable(lineIdx).temp_lob, 0);
4086: tempOffset := dbms_lob.getLength(g_LOBTable(tempIdx).temp_lob) +1;
4087: if start_cnt + end_cnt >= str_length then
4088: -- line := DBMS_LOB.substr(message, start_cnt);
4089: -- DBMS_LOB.Copy(line, message,

Line 4086: tempOffset := dbms_lob.getLength(g_LOBTable(tempIdx).temp_lob) +1;

4082:
4083: -- Ensure the last characters are not lost.
4084: -- DBMS_LOB.Trim(line, 0);
4085: DBMS_LOB.Trim(g_LOBTable(lineIdx).temp_lob, 0);
4086: tempOffset := dbms_lob.getLength(g_LOBTable(tempIdx).temp_lob) +1;
4087: if start_cnt + end_cnt >= str_length then
4088: -- line := DBMS_LOB.substr(message, start_cnt);
4089: -- DBMS_LOB.Copy(line, message,
4090: -- DBMS_LOB.GetLength(message) - start_cnt +1 , 1,

Line 4088: -- line := DBMS_LOB.substr(message, start_cnt);

4084: -- DBMS_LOB.Trim(line, 0);
4085: DBMS_LOB.Trim(g_LOBTable(lineIdx).temp_lob, 0);
4086: tempOffset := dbms_lob.getLength(g_LOBTable(tempIdx).temp_lob) +1;
4087: if start_cnt + end_cnt >= str_length then
4088: -- line := DBMS_LOB.substr(message, start_cnt);
4089: -- DBMS_LOB.Copy(line, message,
4090: -- DBMS_LOB.GetLength(message) - start_cnt +1 , 1,
4091: -- start_cnt);
4092: -- DBMS_LOB.Copy(g_LOBTable(lineIdx).temp_lob, message,

Line 4089: -- DBMS_LOB.Copy(line, message,

4085: DBMS_LOB.Trim(g_LOBTable(lineIdx).temp_lob, 0);
4086: tempOffset := dbms_lob.getLength(g_LOBTable(tempIdx).temp_lob) +1;
4087: if start_cnt + end_cnt >= str_length then
4088: -- line := DBMS_LOB.substr(message, start_cnt);
4089: -- DBMS_LOB.Copy(line, message,
4090: -- DBMS_LOB.GetLength(message) - start_cnt +1 , 1,
4091: -- start_cnt);
4092: -- DBMS_LOB.Copy(g_LOBTable(lineIdx).temp_lob, message,
4093: -- DBMS_LOB.GetLength(message) - start_cnt +1 , 1,

Line 4090: -- DBMS_LOB.GetLength(message) - start_cnt +1 , 1,

4086: tempOffset := dbms_lob.getLength(g_LOBTable(tempIdx).temp_lob) +1;
4087: if start_cnt + end_cnt >= str_length then
4088: -- line := DBMS_LOB.substr(message, start_cnt);
4089: -- DBMS_LOB.Copy(line, message,
4090: -- DBMS_LOB.GetLength(message) - start_cnt +1 , 1,
4091: -- start_cnt);
4092: -- DBMS_LOB.Copy(g_LOBTable(lineIdx).temp_lob, message,
4093: -- DBMS_LOB.GetLength(message) - start_cnt +1 , 1,
4094: -- start_cnt);

Line 4092: -- DBMS_LOB.Copy(g_LOBTable(lineIdx).temp_lob, message,

4088: -- line := DBMS_LOB.substr(message, start_cnt);
4089: -- DBMS_LOB.Copy(line, message,
4090: -- DBMS_LOB.GetLength(message) - start_cnt +1 , 1,
4091: -- start_cnt);
4092: -- DBMS_LOB.Copy(g_LOBTable(lineIdx).temp_lob, message,
4093: -- DBMS_LOB.GetLength(message) - start_cnt +1 , 1,
4094: -- start_cnt);
4095: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,
4096: src_lob => message,

Line 4093: -- DBMS_LOB.GetLength(message) - start_cnt +1 , 1,

4089: -- DBMS_LOB.Copy(line, message,
4090: -- DBMS_LOB.GetLength(message) - start_cnt +1 , 1,
4091: -- start_cnt);
4092: -- DBMS_LOB.Copy(g_LOBTable(lineIdx).temp_lob, message,
4093: -- DBMS_LOB.GetLength(message) - start_cnt +1 , 1,
4094: -- start_cnt);
4095: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,
4096: src_lob => message,
4097: amount => DBMS_LOB.GetLength(message) - start_cnt +1 ,

Line 4095: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,

4091: -- start_cnt);
4092: -- DBMS_LOB.Copy(g_LOBTable(lineIdx).temp_lob, message,
4093: -- DBMS_LOB.GetLength(message) - start_cnt +1 , 1,
4094: -- start_cnt);
4095: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,
4096: src_lob => message,
4097: amount => DBMS_LOB.GetLength(message) - start_cnt +1 ,
4098: dest_offset => tempOffset,
4099: src_offset => start_cnt);

Line 4097: amount => DBMS_LOB.GetLength(message) - start_cnt +1 ,

4093: -- DBMS_LOB.GetLength(message) - start_cnt +1 , 1,
4094: -- start_cnt);
4095: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,
4096: src_lob => message,
4097: amount => DBMS_LOB.GetLength(message) - start_cnt +1 ,
4098: dest_offset => tempOffset,
4099: src_offset => start_cnt);
4100:
4101: else

Line 4102: -- line := DBMS_LOB.substr(message, start_cnt, end_cnt);

4098: dest_offset => tempOffset,
4099: src_offset => start_cnt);
4100:
4101: else
4102: -- line := DBMS_LOB.substr(message, start_cnt, end_cnt);
4103: -- DBMS_LOB.Copy(line, message, end_cnt, 1, start_cnt);
4104: -- DBMS_LOB.Copy(g_LOBTable(lineIdx).temp_lob, message, end_cnt, 1,
4105: -- start_cnt);
4106: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,

Line 4103: -- DBMS_LOB.Copy(line, message, end_cnt, 1, start_cnt);

4099: src_offset => start_cnt);
4100:
4101: else
4102: -- line := DBMS_LOB.substr(message, start_cnt, end_cnt);
4103: -- DBMS_LOB.Copy(line, message, end_cnt, 1, start_cnt);
4104: -- DBMS_LOB.Copy(g_LOBTable(lineIdx).temp_lob, message, end_cnt, 1,
4105: -- start_cnt);
4106: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,
4107: src_lob => message,

Line 4104: -- DBMS_LOB.Copy(g_LOBTable(lineIdx).temp_lob, message, end_cnt, 1,

4100:
4101: else
4102: -- line := DBMS_LOB.substr(message, start_cnt, end_cnt);
4103: -- DBMS_LOB.Copy(line, message, end_cnt, 1, start_cnt);
4104: -- DBMS_LOB.Copy(g_LOBTable(lineIdx).temp_lob, message, end_cnt, 1,
4105: -- start_cnt);
4106: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,
4107: src_lob => message,
4108: amount => end_cnt,

Line 4106: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,

4102: -- line := DBMS_LOB.substr(message, start_cnt, end_cnt);
4103: -- DBMS_LOB.Copy(line, message, end_cnt, 1, start_cnt);
4104: -- DBMS_LOB.Copy(g_LOBTable(lineIdx).temp_lob, message, end_cnt, 1,
4105: -- start_cnt);
4106: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,
4107: src_lob => message,
4108: amount => end_cnt,
4109: dest_offset => tempOffset,
4110: src_offset => start_cnt);

Line 4114: -- DBMS_LOB.Append(temp, line);

4110: src_offset => start_cnt);
4111: end if;
4112:
4113: -- temp := temp || line;
4114: -- DBMS_LOB.Append(temp, line);
4115: -- DBMS_LOB.Append(g_LOBTable(tempIdx).temp_lob,
4116: -- g_LOBTable(lineIdx).temp_lob);
4117:
4118: -- If there is a newline at this point,

Line 4115: -- DBMS_LOB.Append(g_LOBTable(tempIdx).temp_lob,

4111: end if;
4112:
4113: -- temp := temp || line;
4114: -- DBMS_LOB.Append(temp, line);
4115: -- DBMS_LOB.Append(g_LOBTable(tempIdx).temp_lob,
4116: -- g_LOBTable(lineIdx).temp_lob);
4117:
4118: -- If there is a newline at this point,
4119: -- then do not bother with another.

Line 4120: if DBMS_LOB.substr(message, 1, start_cnt + end_cnt) <>

4116: -- g_LOBTable(lineIdx).temp_lob);
4117:
4118: -- If there is a newline at this point,
4119: -- then do not bother with another.
4120: if DBMS_LOB.substr(message, 1, start_cnt + end_cnt) <>
4121: g_newLine then
4122: -- DBMS_LOB.WriteAppend(temp, 1, g_newLine);
4123: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, 1, g_newLine);
4124: end if;

Line 4122: -- DBMS_LOB.WriteAppend(temp, 1, g_newLine);

4118: -- If there is a newline at this point,
4119: -- then do not bother with another.
4120: if DBMS_LOB.substr(message, 1, start_cnt + end_cnt) <>
4121: g_newLine then
4122: -- DBMS_LOB.WriteAppend(temp, 1, g_newLine);
4123: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, 1, g_newLine);
4124: end if;
4125:
4126: -- We do not want to start the new line with the space.

Line 4123: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, 1, g_newLine);

4119: -- then do not bother with another.
4120: if DBMS_LOB.substr(message, 1, start_cnt + end_cnt) <>
4121: g_newLine then
4122: -- DBMS_LOB.WriteAppend(temp, 1, g_newLine);
4123: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, 1, g_newLine);
4124: end if;
4125:
4126: -- We do not want to start the new line with the space.
4127: if DBMS_LOB.substr(message, 1, start_cnt + end_cnt) = ' ' then

Line 4127: if DBMS_LOB.substr(message, 1, start_cnt + end_cnt) = ' ' then

4123: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, 1, g_newLine);
4124: end if;
4125:
4126: -- We do not want to start the new line with the space.
4127: if DBMS_LOB.substr(message, 1, start_cnt + end_cnt) = ' ' then
4128: start_cnt := start_cnt + end_cnt + 1;
4129: else
4130: start_cnt := start_cnt + end_cnt;
4131: end if;

Line 4134: DBMS_LOB.Trim(message, 0);

4130: start_cnt := start_cnt + end_cnt;
4131: end if;
4132: end_cnt := lnsize;
4133: end loop;
4134: DBMS_LOB.Trim(message, 0);
4135: -- DBMS_LOB.Copy(message, temp, DBMS_LOB.GetLength(temp), 1, 1);
4136: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob,
4137: DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob), 1, 1);
4138:

Line 4135: -- DBMS_LOB.Copy(message, temp, DBMS_LOB.GetLength(temp), 1, 1);

4131: end if;
4132: end_cnt := lnsize;
4133: end loop;
4134: DBMS_LOB.Trim(message, 0);
4135: -- DBMS_LOB.Copy(message, temp, DBMS_LOB.GetLength(temp), 1, 1);
4136: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob,
4137: DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob), 1, 1);
4138:
4139:

Line 4136: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob,

4132: end_cnt := lnsize;
4133: end loop;
4134: DBMS_LOB.Trim(message, 0);
4135: -- DBMS_LOB.Copy(message, temp, DBMS_LOB.GetLength(temp), 1, 1);
4136: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob,
4137: DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob), 1, 1);
4138:
4139:
4140: -- if DBMS_LOB.IsOpen(temp)=1 then

Line 4137: DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob), 1, 1);

4133: end loop;
4134: DBMS_LOB.Trim(message, 0);
4135: -- DBMS_LOB.Copy(message, temp, DBMS_LOB.GetLength(temp), 1, 1);
4136: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob,
4137: DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob), 1, 1);
4138:
4139:
4140: -- if DBMS_LOB.IsOpen(temp)=1 then
4141: -- DBMS_LOB.Close(temp);

Line 4140: -- if DBMS_LOB.IsOpen(temp)=1 then

4136: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob,
4137: DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob), 1, 1);
4138:
4139:
4140: -- if DBMS_LOB.IsOpen(temp)=1 then
4141: -- DBMS_LOB.Close(temp);
4142: -- DBMS_LOB.FreeTemporary(temp);
4143: -- end if;
4144: -- if DBMS_LOB.IsOpen(line)=1 then

Line 4141: -- DBMS_LOB.Close(temp);

4137: DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob), 1, 1);
4138:
4139:
4140: -- if DBMS_LOB.IsOpen(temp)=1 then
4141: -- DBMS_LOB.Close(temp);
4142: -- DBMS_LOB.FreeTemporary(temp);
4143: -- end if;
4144: -- if DBMS_LOB.IsOpen(line)=1 then
4145: -- DBMS_LOB.Close(line);

Line 4142: -- DBMS_LOB.FreeTemporary(temp);

4138:
4139:
4140: -- if DBMS_LOB.IsOpen(temp)=1 then
4141: -- DBMS_LOB.Close(temp);
4142: -- DBMS_LOB.FreeTemporary(temp);
4143: -- end if;
4144: -- if DBMS_LOB.IsOpen(line)=1 then
4145: -- DBMS_LOB.Close(line);
4146: -- DBMS_LOB.FreeTemporary(line);

Line 4144: -- if DBMS_LOB.IsOpen(line)=1 then

4140: -- if DBMS_LOB.IsOpen(temp)=1 then
4141: -- DBMS_LOB.Close(temp);
4142: -- DBMS_LOB.FreeTemporary(temp);
4143: -- end if;
4144: -- if DBMS_LOB.IsOpen(line)=1 then
4145: -- DBMS_LOB.Close(line);
4146: -- DBMS_LOB.FreeTemporary(line);
4147: -- end if;
4148: wf_temp_lob.releaseLob(g_LOBTable, lineIdx);

Line 4145: -- DBMS_LOB.Close(line);

4141: -- DBMS_LOB.Close(temp);
4142: -- DBMS_LOB.FreeTemporary(temp);
4143: -- end if;
4144: -- if DBMS_LOB.IsOpen(line)=1 then
4145: -- DBMS_LOB.Close(line);
4146: -- DBMS_LOB.FreeTemporary(line);
4147: -- end if;
4148: wf_temp_lob.releaseLob(g_LOBTable, lineIdx);
4149: wf_temp_lob.releaseLob(g_LOBTable, tempIdx);

Line 4146: -- DBMS_LOB.FreeTemporary(line);

4142: -- DBMS_LOB.FreeTemporary(temp);
4143: -- end if;
4144: -- if DBMS_LOB.IsOpen(line)=1 then
4145: -- DBMS_LOB.Close(line);
4146: -- DBMS_LOB.FreeTemporary(line);
4147: -- end if;
4148: wf_temp_lob.releaseLob(g_LOBTable, lineIdx);
4149: wf_temp_lob.releaseLob(g_LOBTable, tempIdx);
4150:

Line 4184: doc_length := DBMS_LOB.GetLength(message);

4180: lnsize := textWidth;
4181: bfr_start := 1;
4182: chk_start := 1;
4183: line_size := lnsize;
4184: doc_length := DBMS_LOB.GetLength(message);
4185: if doc_length = 0 or doc_length < line_size then
4186: return;
4187: end if;
4188:

Line 4201: crpos := DBMS_LOB.instr(lob_loc => message,

4197: insertNewLine := false;
4198:
4199: -- use the existing newlines as a natural break. If found
4200: -- crpos will be the relative position from chk_start.
4201: crpos := DBMS_LOB.instr(lob_loc => message,
4202: pattern => g_newLine,
4203: offset => chk_start,
4204: nth => 1) - chk_start;
4205:

Line 4216: wsLoc := DBMS_LOB.instr(lob_loc => message,

4212: insertNewLine := false;
4213: else
4214: -- Move forward to the next white space.
4215:
4216: wsLoc := DBMS_LOB.instr(lob_loc => message,
4217: pattern => ' ',
4218: offset => (chk_start + line_size),
4219: nth => 1) - chk_start;
4220:

Line 4221: crpos := DBMS_LOB.instr(lob_loc => message,

4217: pattern => ' ',
4218: offset => (chk_start + line_size),
4219: nth => 1) - chk_start;
4220:
4221: crpos := DBMS_LOB.instr(lob_loc => message,
4222: pattern => g_newline,
4223: offset => (chk_start + line_size),
4224: nth => 1) - chk_start;
4225:

Line 4235: wsLoc := DBMS_LOB.instr(lob_loc => message,

4231: insertNewLine := true;
4232: whitespace := true;
4233: else
4234:
4235: wsLoc := DBMS_LOB.instr(lob_loc => message,
4236: pattern => g_newLine,
4237: offset => chk_start + line_size,
4238: nth => 1) - chk_start;
4239:

Line 4247: wsLoc := DBMS_LOB.instr(lob_loc => message,

4243: insertNewLine := false;
4244: whitespace := true;
4245: else
4246:
4247: wsLoc := DBMS_LOB.instr(lob_loc => message,
4248: pattern => g_tab,
4249: offset => chk_start + line_size,
4250: nth => 1) - chk_start;
4251:

Line 4268: tempOffset := dbms_lob.getLength(g_LOBTable(tempIdx).temp_lob) +1;

4264:
4265: -- Ensure the last characters are not lost.
4266: if chk_start + line_size >= doc_length then
4267: -- copy from the chk_start to the end of the document.
4268: tempOffset := dbms_lob.getLength(g_LOBTable(tempIdx).temp_lob) +1;
4269:
4270: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,
4271: src_lob => message,
4272: amount => doc_length - bfr_start +1 ,

Line 4270: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,

4266: if chk_start + line_size >= doc_length then
4267: -- copy from the chk_start to the end of the document.
4268: tempOffset := dbms_lob.getLength(g_LOBTable(tempIdx).temp_lob) +1;
4269:
4270: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,
4271: src_lob => message,
4272: amount => doc_length - bfr_start +1 ,
4273: dest_offset => tempOffset,
4274: src_offset => bfr_start);

Line 4277: -- This is to minimise the number of calls to dbms_lob.copy.

4273: dest_offset => tempOffset,
4274: src_offset => bfr_start);
4275: elsif insertNewLine then
4276: -- Copy partial and make note of the current position
4277: -- This is to minimise the number of calls to dbms_lob.copy.
4278: tempOffset := dbms_lob.getLength(g_LOBTable(tempIdx).temp_lob) +1;
4279: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,
4280: src_lob => message,
4281: amount => (chk_start - bfr_start) + line_size,

Line 4278: tempOffset := dbms_lob.getLength(g_LOBTable(tempIdx).temp_lob) +1;

4274: src_offset => bfr_start);
4275: elsif insertNewLine then
4276: -- Copy partial and make note of the current position
4277: -- This is to minimise the number of calls to dbms_lob.copy.
4278: tempOffset := dbms_lob.getLength(g_LOBTable(tempIdx).temp_lob) +1;
4279: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,
4280: src_lob => message,
4281: amount => (chk_start - bfr_start) + line_size,
4282: dest_offset => tempOffset,

Line 4279: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,

4275: elsif insertNewLine then
4276: -- Copy partial and make note of the current position
4277: -- This is to minimise the number of calls to dbms_lob.copy.
4278: tempOffset := dbms_lob.getLength(g_LOBTable(tempIdx).temp_lob) +1;
4279: DBMS_LOB.Copy(dest_lob => g_LOBTable(tempIdx).temp_lob,
4280: src_lob => message,
4281: amount => (chk_start - bfr_start) + line_size,
4282: dest_offset => tempOffset,
4283: src_offset => bfr_start);

Line 4284: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, 1, g_newLine);

4280: src_lob => message,
4281: amount => (chk_start - bfr_start) + line_size,
4282: dest_offset => tempOffset,
4283: src_offset => bfr_start);
4284: DBMS_LOB.WriteAppend(g_LOBTable(tempIdx).temp_lob, 1, g_newLine);
4285: bfr_start := chk_start + line_size +1;
4286: end if;
4287:
4288: if wsLoc > 0 then

Line 4296: DBMS_LOB.Trim(message, 0);

4292: end if;
4293: line_size := lnsize;
4294: end loop;
4295:
4296: DBMS_LOB.Trim(message, 0);
4297: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob,
4298: DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob), 1, 1);
4299:
4300: DBMS_LOB.Trim(g_LOBTable(tempIdx).temp_lob, 0);

Line 4297: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob,

4293: line_size := lnsize;
4294: end loop;
4295:
4296: DBMS_LOB.Trim(message, 0);
4297: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob,
4298: DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob), 1, 1);
4299:
4300: DBMS_LOB.Trim(g_LOBTable(tempIdx).temp_lob, 0);
4301: wf_temp_lob.releaseLob(g_LOBTable, tempIdx);

Line 4298: DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob), 1, 1);

4294: end loop;
4295:
4296: DBMS_LOB.Trim(message, 0);
4297: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob,
4298: DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob), 1, 1);
4299:
4300: DBMS_LOB.Trim(g_LOBTable(tempIdx).temp_lob, 0);
4301: wf_temp_lob.releaseLob(g_LOBTable, tempIdx);
4302:

Line 4300: DBMS_LOB.Trim(g_LOBTable(tempIdx).temp_lob, 0);

4296: DBMS_LOB.Trim(message, 0);
4297: DBMS_LOB.Copy(message, g_LOBTable(tempIdx).temp_lob,
4298: DBMS_LOB.GetLength(g_LOBTable(tempIdx).temp_lob), 1, 1);
4299:
4300: DBMS_LOB.Trim(g_LOBTable(tempIdx).temp_lob, 0);
4301: wf_temp_lob.releaseLob(g_LOBTable, tempIdx);
4302:
4303: end OBSOLETE2LOBLineBreak;
4304:

Line 4335: l_amount := dbms_lob.getLength(message);

4331: begin
4332:
4333: l_tempIdx := wf_temp_lob.getLob(g_LOBTable);
4334:
4335: l_amount := dbms_lob.getLength(message);
4336: l_offset := 1;
4337: l_bufferSize := l_lineSize;
4338: l_forcedBreak := false;
4339:

Line 4345: dbms_lob.read(lob_loc => message, amount => l_lineSize,

4341: loop
4342: l_lastCR := 0;
4343: l_forcedBreak := false;
4344: if(l_amount > l_lineSize) then
4345: dbms_lob.read(lob_loc => message, amount => l_lineSize,
4346: offset => l_offSet, buffer => l_strBuffer);
4347:
4348: l_lastCR := instr(l_strBuffer, wf_core.newline, -1);
4349: l_lastWS := instr(l_strBuffer, ' ', -1);

Line 4371: DBMS_LOB.writeAppend(lob_loc => g_LOBTable(l_tempIdx).temp_lob,

4367: -- same size as the space that was removed
4368: l_bufferSize := length(l_strBuffer);
4369: end if;
4370:
4371: DBMS_LOB.writeAppend(lob_loc => g_LOBTable(l_tempIdx).temp_lob,
4372: amount => l_bufferSize,
4373: buffer => l_strBuffer);
4374:
4375: l_strBuffer := '';

Line 4378: l_amount := (dbms_lob.getLength(message) - l_offset) + 1;

4374:
4375: l_strBuffer := '';
4376: else
4377:
4378: l_amount := (dbms_lob.getLength(message) - l_offset) + 1;
4379: dbms_lob.read(lob_loc => message, amount => l_amount,
4380: offset => l_offset, buffer => l_strBuffer);
4381:
4382: dbms_lob.writeAppend(lob_loc => g_LOBTable(l_tempIdx).temp_lob,

Line 4379: dbms_lob.read(lob_loc => message, amount => l_amount,

4375: l_strBuffer := '';
4376: else
4377:
4378: l_amount := (dbms_lob.getLength(message) - l_offset) + 1;
4379: dbms_lob.read(lob_loc => message, amount => l_amount,
4380: offset => l_offset, buffer => l_strBuffer);
4381:
4382: dbms_lob.writeAppend(lob_loc => g_LOBTable(l_tempIdx).temp_lob,
4383: amount => l_amount,

Line 4382: dbms_lob.writeAppend(lob_loc => g_LOBTable(l_tempIdx).temp_lob,

4378: l_amount := (dbms_lob.getLength(message) - l_offset) + 1;
4379: dbms_lob.read(lob_loc => message, amount => l_amount,
4380: offset => l_offset, buffer => l_strBuffer);
4381:
4382: dbms_lob.writeAppend(lob_loc => g_LOBTable(l_tempIdx).temp_lob,
4383: amount => l_amount,
4384: buffer => l_strBuffer);
4385:
4386: exit;

Line 4389: DBMS_LOB.Trim(message, 0);

4385:
4386: exit;
4387: end if;
4388: end loop;
4389: DBMS_LOB.Trim(message, 0);
4390: DBMS_LOB.Copy(message, g_LOBTable(l_tempIdx).temp_lob,
4391: DBMS_LOB.GetLength(g_LOBTable(l_tempIdx).temp_lob), 1, 1);
4392:
4393: DBMS_LOB.Trim(g_LOBTable(l_tempIdx).temp_lob, 0);

Line 4390: DBMS_LOB.Copy(message, g_LOBTable(l_tempIdx).temp_lob,

4386: exit;
4387: end if;
4388: end loop;
4389: DBMS_LOB.Trim(message, 0);
4390: DBMS_LOB.Copy(message, g_LOBTable(l_tempIdx).temp_lob,
4391: DBMS_LOB.GetLength(g_LOBTable(l_tempIdx).temp_lob), 1, 1);
4392:
4393: DBMS_LOB.Trim(g_LOBTable(l_tempIdx).temp_lob, 0);
4394: wf_temp_lob.releaseLob(g_LOBTable, l_tempIdx);

Line 4391: DBMS_LOB.GetLength(g_LOBTable(l_tempIdx).temp_lob), 1, 1);

4387: end if;
4388: end loop;
4389: DBMS_LOB.Trim(message, 0);
4390: DBMS_LOB.Copy(message, g_LOBTable(l_tempIdx).temp_lob,
4391: DBMS_LOB.GetLength(g_LOBTable(l_tempIdx).temp_lob), 1, 1);
4392:
4393: DBMS_LOB.Trim(g_LOBTable(l_tempIdx).temp_lob, 0);
4394: wf_temp_lob.releaseLob(g_LOBTable, l_tempIdx);
4395: end if;

Line 4393: DBMS_LOB.Trim(g_LOBTable(l_tempIdx).temp_lob, 0);

4389: DBMS_LOB.Trim(message, 0);
4390: DBMS_LOB.Copy(message, g_LOBTable(l_tempIdx).temp_lob,
4391: DBMS_LOB.GetLength(g_LOBTable(l_tempIdx).temp_lob), 1, 1);
4392:
4393: DBMS_LOB.Trim(g_LOBTable(l_tempIdx).temp_lob, 0);
4394: wf_temp_lob.releaseLob(g_LOBTable, l_tempIdx);
4395: end if;
4396:
4397: -- exception

Line 4453: -- DBMS_LOB.createTemporary(buffer, FALSE, dbms_lob.call);

4449:
4450:
4451: -- Clear buffer
4452: str_buffer := '';
4453: -- DBMS_LOB.createTemporary(buffer, FALSE, dbms_lob.call);
4454: bufferIdx := wf_temp_lob.getLob(g_LOBTable);
4455:
4456: -- URL RESPONSE attributes overrides the normal RESULT attributes.
4457: -- So, my goal here is to check for this case.

Line 4477: -- DBMS_LOB.writeAppend(buffer, length(str_buffer), str_buffer);

4473: '" target="_top">';
4474: str_buffer := str_buffer||' '||rec.display_name;
4475: str_buffer := str_buffer||'
'||'';
4476: str_buffer := str_buffer||g_newLine;
4477: -- DBMS_LOB.writeAppend(buffer, length(str_buffer), str_buffer);
4478: DBMS_LOB.writeAppend(g_LOBTable(bufferIdx).temp_lob, length(str_buffer), str_buffer);
4479: str_buffer := '';
4480: end loop;
4481:

Line 4478: DBMS_LOB.writeAppend(g_LOBTable(bufferIdx).temp_lob, length(str_buffer), str_buffer);

4474: str_buffer := str_buffer||' '||rec.display_name;
4475: str_buffer := str_buffer||'
'||'';
4476: str_buffer := str_buffer||g_newLine;
4477: -- DBMS_LOB.writeAppend(buffer, length(str_buffer), str_buffer);
4478: DBMS_LOB.writeAppend(g_LOBTable(bufferIdx).temp_lob, length(str_buffer), str_buffer);
4479: str_buffer := '';
4480: end loop;
4481:
4482: -- if (dbms_lob.GetLength(buffer) > 0) then

Line 4482: -- if (dbms_lob.GetLength(buffer) > 0) then

4478: DBMS_LOB.writeAppend(g_LOBTable(bufferIdx).temp_lob, length(str_buffer), str_buffer);
4479: str_buffer := '';
4480: end loop;
4481:
4482: -- if (dbms_lob.GetLength(buffer) > 0) then
4483: if (dbms_lob.GetLength(g_LOBTable(bufferIdx).temp_lob) > 0) then
4484: -- LOBReplace(doc, '&'||'MAILTO', buffer, FALSE);
4485: LOBReplace(doc, '&'||'MAILTO', g_LOBTable(bufferIdx).temp_lob, FALSE);
4486: RETURN;

Line 4483: if (dbms_lob.GetLength(g_LOBTable(bufferIdx).temp_lob) > 0) then

4479: str_buffer := '';
4480: end loop;
4481:
4482: -- if (dbms_lob.GetLength(buffer) > 0) then
4483: if (dbms_lob.GetLength(g_LOBTable(bufferIdx).temp_lob) > 0) then
4484: -- LOBReplace(doc, '&'||'MAILTO', buffer, FALSE);
4485: LOBReplace(doc, '&'||'MAILTO', g_LOBTable(bufferIdx).temp_lob, FALSE);
4486: RETURN;
4487: end if;

Line 4550: DBMS_LOB.WriteAppend(g_LOBTable(bufferIdx).temp_lob, length(str_buffer), str_buffer);

4546: str_buffer := str_buffer||'

'||disp_name||': '||''||
4559: g_noResult||'
'||'
';
4560:
4561: DBMS_LOB.WriteAppend(g_LOBTable(bufferIdx).temp_lob, length(str_buffer), str_buffer);
4562: str_buffer := '';
4563:
4564: ELSE -- 'LOOKUP' Type Result Attribute.
4565:

Line 4604: -- DBMS_LOB.WriteAppend(buffer, length(str_buffer), str_buffer);

4600: '?subject=%20'||UrlEncode(subject)||'&'||'body=%20';
4601:
4602: end if;
4603:
4604: -- DBMS_LOB.WriteAppend(buffer, length(str_buffer), str_buffer);
4605: DBMS_LOB.WriteAppend(g_LOBTable(bufferIdx).temp_lob, length(str_buffer), str_buffer);
4606: str_buffer := '';
4607: end loop;
4608:

Line 4605: DBMS_LOB.WriteAppend(g_LOBTable(bufferIdx).temp_lob, length(str_buffer), str_buffer);

4601:
4602: end if;
4603:
4604: -- DBMS_LOB.WriteAppend(buffer, length(str_buffer), str_buffer);
4605: DBMS_LOB.WriteAppend(g_LOBTable(bufferIdx).temp_lob, length(str_buffer), str_buffer);
4606: str_buffer := '';
4607: end loop;
4608:
4609: end if;

Line 5282: DBMS_LOB.WriteAppend(g_LOBTable(g_text_messageIdx).temp_lob,

5278: while not (end_of_message) loop
5279: WF_NOTIFICATION.GetFullBody(nid, buffer, end_of_message,
5280: g_ntfDocText);
5281: if buffer is not null and length(buffer) > 0 then
5282: DBMS_LOB.WriteAppend(g_LOBTable(g_text_messageIdx).temp_lob,
5283: length(buffer), buffer);
5284: end if;
5285: end loop;
5286: exception

Line 5317: DBMS_LOB.WriteAppend(g_LOBTable(g_html_messageIdx).temp_lob,

5313: while not (end_of_message) loop
5314: WF_NOTIFICATION.GetFullBody(nid, buffer, end_of_message,
5315: g_ntfDocHtml);
5316: if buffer is not null and length(buffer) > 0 then
5317: DBMS_LOB.WriteAppend(g_LOBTable(g_html_messageIdx).temp_lob,
5318: length(buffer), buffer);
5319: end if;
5320: end loop;
5321: exception

Line 5399: -- DBMS_LOB.Write(template_html, length(t_html_body), 1, t_html_body);

5395: end if;
5396: end if;
5397: end if;
5398:
5399: -- DBMS_LOB.Write(template_html, length(t_html_body), 1, t_html_body);
5400:
5401: if wf_mail.direct_response then
5402: n_direct := '[2]';
5403: else

Line 5538: DBMS_LOB.WriteAppend(g_LOBTable(g_html_messageIdx).temp_lob,

5534: -- HTML. Since this is rendered in a LOB, there should be no
5535: -- cause for the exising end /body tag should drop off the end
5536: -- like what would happen in the varchar2 version.
5537: if textForHtml then
5538: DBMS_LOB.WriteAppend(g_LOBTable(g_html_messageIdx).temp_lob,
5539: length(''), '');
5540: end if;
5541:
5542: end if;

Line 5565: -- if (DBMS_LOB.IsOpen(template_text)=1) then

5561: -- html_body := n_html_body;
5562: -- this is for the little attachment to the detail frame
5563: body_atth := m_html;
5564:
5565: -- if (DBMS_LOB.IsOpen(template_text)=1) then
5566: -- DBMS_LOB.Close(template_text);
5567: -- DBMS_LOB.FreeTemporary(template_text);
5568: -- end if;
5569: -- if (DBMS_LOB.IsOpen(template_html)=1) then

Line 5566: -- DBMS_LOB.Close(template_text);

5562: -- this is for the little attachment to the detail frame
5563: body_atth := m_html;
5564:
5565: -- if (DBMS_LOB.IsOpen(template_text)=1) then
5566: -- DBMS_LOB.Close(template_text);
5567: -- DBMS_LOB.FreeTemporary(template_text);
5568: -- end if;
5569: -- if (DBMS_LOB.IsOpen(template_html)=1) then
5570: -- DBMS_LOB.Close(template_html);

Line 5567: -- DBMS_LOB.FreeTemporary(template_text);

5563: body_atth := m_html;
5564:
5565: -- if (DBMS_LOB.IsOpen(template_text)=1) then
5566: -- DBMS_LOB.Close(template_text);
5567: -- DBMS_LOB.FreeTemporary(template_text);
5568: -- end if;
5569: -- if (DBMS_LOB.IsOpen(template_html)=1) then
5570: -- DBMS_LOB.Close(template_html);
5571: -- DBMS_LOB.FreeTemporary(template_html);

Line 5569: -- if (DBMS_LOB.IsOpen(template_html)=1) then

5565: -- if (DBMS_LOB.IsOpen(template_text)=1) then
5566: -- DBMS_LOB.Close(template_text);
5567: -- DBMS_LOB.FreeTemporary(template_text);
5568: -- end if;
5569: -- if (DBMS_LOB.IsOpen(template_html)=1) then
5570: -- DBMS_LOB.Close(template_html);
5571: -- DBMS_LOB.FreeTemporary(template_html);
5572: -- end if;
5573:

Line 5570: -- DBMS_LOB.Close(template_html);

5566: -- DBMS_LOB.Close(template_text);
5567: -- DBMS_LOB.FreeTemporary(template_text);
5568: -- end if;
5569: -- if (DBMS_LOB.IsOpen(template_html)=1) then
5570: -- DBMS_LOB.Close(template_html);
5571: -- DBMS_LOB.FreeTemporary(template_html);
5572: -- end if;
5573:
5574: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then

Line 5571: -- DBMS_LOB.FreeTemporary(template_html);

5567: -- DBMS_LOB.FreeTemporary(template_text);
5568: -- end if;
5569: -- if (DBMS_LOB.IsOpen(template_html)=1) then
5570: -- DBMS_LOB.Close(template_html);
5571: -- DBMS_LOB.FreeTemporary(template_html);
5572: -- end if;
5573:
5574: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
5575: wf_log_pkg.string(WF_LOG_PKG.level_procedure,

Line 6109: -- DBMS_LOB.CreateTemporary(g_text_message, TRUE, DBMS_LOB.SESSION);

6105: lob := 'Y';
6106:
6107: if NOT lob_init then
6108: lob_init := TRUE;
6109: -- DBMS_LOB.CreateTemporary(g_text_message, TRUE, DBMS_LOB.SESSION);
6110: -- DBMS_LOB.Open(g_text_message, DBMS_LOB.LOB_READWRITE);
6111:
6112: -- This g_text_messageIdx Locator will be returned back to pool within caller
6113: -- GenerateSummaryDoc -> getBodyPart

Line 6110: -- DBMS_LOB.Open(g_text_message, DBMS_LOB.LOB_READWRITE);

6106:
6107: if NOT lob_init then
6108: lob_init := TRUE;
6109: -- DBMS_LOB.CreateTemporary(g_text_message, TRUE, DBMS_LOB.SESSION);
6110: -- DBMS_LOB.Open(g_text_message, DBMS_LOB.LOB_READWRITE);
6111:
6112: -- This g_text_messageIdx Locator will be returned back to pool within caller
6113: -- GenerateSummaryDoc -> getBodyPart
6114: g_text_messageIdx := wf_temp_lob.getLob(g_LOBTable);

Line 6116: DBMS_LOB.WriteAppend(g_LOBTable(g_text_messageIdx).temp_lob,

6112: -- This g_text_messageIdx Locator will be returned back to pool within caller
6113: -- GenerateSummaryDoc -> getBodyPart
6114: g_text_messageIdx := wf_temp_lob.getLob(g_LOBTable);
6115: if contType = g_ntfDocText then
6116: DBMS_LOB.WriteAppend(g_LOBTable(g_text_messageIdx).temp_lob,
6117: length(t_body), t_body);
6118: else
6119: DBMS_LOB.WriteAppend(g_LOBTable(g_text_messageIdx).temp_lob,
6120: length(t_html_body), t_html_body);

Line 6119: DBMS_LOB.WriteAppend(g_LOBTable(g_text_messageIdx).temp_lob,

6115: if contType = g_ntfDocText then
6116: DBMS_LOB.WriteAppend(g_LOBTable(g_text_messageIdx).temp_lob,
6117: length(t_body), t_body);
6118: else
6119: DBMS_LOB.WriteAppend(g_LOBTable(g_text_messageIdx).temp_lob,
6120: length(t_html_body), t_html_body);
6121: end if;
6122:
6123: -- DBMS_LOB.CreateTemporary(temp_text, FALSE, DBMS_LOB.CALL);

Line 6123: -- DBMS_LOB.CreateTemporary(temp_text, FALSE, DBMS_LOB.CALL);

6119: DBMS_LOB.WriteAppend(g_LOBTable(g_text_messageIdx).temp_lob,
6120: length(t_html_body), t_html_body);
6121: end if;
6122:
6123: -- DBMS_LOB.CreateTemporary(temp_text, FALSE, DBMS_LOB.CALL);
6124: temp_textIdx := wf_temp_lob.getLob(g_LOBTable);
6125: end if;
6126: DBMS_LOB.WriteAppend(g_LOBTable(temp_textIdx).temp_lob,
6127: length(n_summ), n_summ);

Line 6126: DBMS_LOB.WriteAppend(g_LOBTable(temp_textIdx).temp_lob,

6122:
6123: -- DBMS_LOB.CreateTemporary(temp_text, FALSE, DBMS_LOB.CALL);
6124: temp_textIdx := wf_temp_lob.getLob(g_LOBTable);
6125: end if;
6126: DBMS_LOB.WriteAppend(g_LOBTable(temp_textIdx).temp_lob,
6127: length(n_summ), n_summ);
6128: n_summ := '';
6129: end if;
6130: end loop;

Line 6134: DBMS_LOB.WriteAppend(g_LOBTable(temp_textIdx).temp_lob,

6130: end loop;
6131: if lob = 'Y' then
6132: t_body := '';
6133: t_html_body := '';
6134: DBMS_LOB.WriteAppend(g_LOBTable(temp_textIdx).temp_lob,
6135: length(n_summ), n_summ);
6136: LOBReplace(g_LOBTable(g_text_messageIdx).temp_lob, '&'||'SUMMARY',
6137: g_LOBTable(temp_textIdx).temp_lob, FALSE);
6138:

Line 6220: -- doc_length := DBMS_LOB.GetLength(g_html_message);

6216: is
6217: begin
6218: if doc_type = g_ntfDocHtml then
6219: g_html_chunk := 0;
6220: -- doc_length := DBMS_LOB.GetLength(g_html_message);
6221: doc_length := DBMS_LOB.GetLength(g_LOBTable(g_html_messageIdx).temp_lob);
6222: else
6223: -- Always assume that the caller wants the TEXT
6224: g_text_chunk := 0;

Line 6221: doc_length := DBMS_LOB.GetLength(g_LOBTable(g_html_messageIdx).temp_lob);

6217: begin
6218: if doc_type = g_ntfDocHtml then
6219: g_html_chunk := 0;
6220: -- doc_length := DBMS_LOB.GetLength(g_html_message);
6221: doc_length := DBMS_LOB.GetLength(g_LOBTable(g_html_messageIdx).temp_lob);
6222: else
6223: -- Always assume that the caller wants the TEXT
6224: g_text_chunk := 0;
6225: -- doc_length := DBMS_LOB.GetLength(g_text_message);

Line 6225: -- doc_length := DBMS_LOB.GetLength(g_text_message);

6221: doc_length := DBMS_LOB.GetLength(g_LOBTable(g_html_messageIdx).temp_lob);
6222: else
6223: -- Always assume that the caller wants the TEXT
6224: g_text_chunk := 0;
6225: -- doc_length := DBMS_LOB.GetLength(g_text_message);
6226: doc_length := DBMS_LOB.GetLength(g_LOBTable(g_text_messageIdx).temp_lob);
6227: end if;
6228: end InitFetchLOB;
6229:

Line 6226: doc_length := DBMS_LOB.GetLength(g_LOBTable(g_text_messageIdx).temp_lob);

6222: else
6223: -- Always assume that the caller wants the TEXT
6224: g_text_chunk := 0;
6225: -- doc_length := DBMS_LOB.GetLength(g_text_message);
6226: doc_length := DBMS_LOB.GetLength(g_LOBTable(g_text_messageIdx).temp_lob);
6227: end if;
6228: end InitFetchLOB;
6229:
6230:

Line 6255: -- DBMS_LOB.Read(g_html_message, buffer_length, pos, buffer);

6251: buffer_length pls_integer := 16000;
6252: begin
6253: if doc_type = g_ntfDocHtml then
6254: pos := (buffer_length * nvl(g_html_chunk,0))+1;
6255: -- DBMS_LOB.Read(g_html_message, buffer_length, pos, buffer);
6256: DBMS_LOB.Read(g_LOBTable(g_html_messageIdx).temp_lob, buffer_length, pos, buffer);
6257: if pos+buffer_length > DBMS_LOB.GetLength(g_LOBTable(g_html_messageIdx).temp_lob) then
6258: end_of_clob := 1;
6259: g_html_chunk := 0;

Line 6256: DBMS_LOB.Read(g_LOBTable(g_html_messageIdx).temp_lob, buffer_length, pos, buffer);

6252: begin
6253: if doc_type = g_ntfDocHtml then
6254: pos := (buffer_length * nvl(g_html_chunk,0))+1;
6255: -- DBMS_LOB.Read(g_html_message, buffer_length, pos, buffer);
6256: DBMS_LOB.Read(g_LOBTable(g_html_messageIdx).temp_lob, buffer_length, pos, buffer);
6257: if pos+buffer_length > DBMS_LOB.GetLength(g_LOBTable(g_html_messageIdx).temp_lob) then
6258: end_of_clob := 1;
6259: g_html_chunk := 0;
6260: else

Line 6257: if pos+buffer_length > DBMS_LOB.GetLength(g_LOBTable(g_html_messageIdx).temp_lob) then

6253: if doc_type = g_ntfDocHtml then
6254: pos := (buffer_length * nvl(g_html_chunk,0))+1;
6255: -- DBMS_LOB.Read(g_html_message, buffer_length, pos, buffer);
6256: DBMS_LOB.Read(g_LOBTable(g_html_messageIdx).temp_lob, buffer_length, pos, buffer);
6257: if pos+buffer_length > DBMS_LOB.GetLength(g_LOBTable(g_html_messageIdx).temp_lob) then
6258: end_of_clob := 1;
6259: g_html_chunk := 0;
6260: else
6261: g_html_chunk := g_html_chunk + 1;

Line 6266: -- DBMS_LOB.Read(g_text_message, buffer_length, pos, buffer);

6262: end if;
6263: else
6264: -- Always assume that the caller wants the TEXT
6265: pos := (buffer_length * nvl(g_text_chunk,0))+1;
6266: -- DBMS_LOB.Read(g_text_message, buffer_length, pos, buffer);
6267: DBMS_LOB.Read(g_LOBTable(g_text_messageIdx).temp_lob, buffer_length, pos, buffer);
6268: if pos+buffer_length > DBMS_LOB.GetLength(g_LOBTable(g_text_messageIdx).temp_lob) then
6269: end_of_clob := 1;
6270: g_text_chunk := 0;

Line 6267: DBMS_LOB.Read(g_LOBTable(g_text_messageIdx).temp_lob, buffer_length, pos, buffer);

6263: else
6264: -- Always assume that the caller wants the TEXT
6265: pos := (buffer_length * nvl(g_text_chunk,0))+1;
6266: -- DBMS_LOB.Read(g_text_message, buffer_length, pos, buffer);
6267: DBMS_LOB.Read(g_LOBTable(g_text_messageIdx).temp_lob, buffer_length, pos, buffer);
6268: if pos+buffer_length > DBMS_LOB.GetLength(g_LOBTable(g_text_messageIdx).temp_lob) then
6269: end_of_clob := 1;
6270: g_text_chunk := 0;
6271: else

Line 6268: if pos+buffer_length > DBMS_LOB.GetLength(g_LOBTable(g_text_messageIdx).temp_lob) then

6264: -- Always assume that the caller wants the TEXT
6265: pos := (buffer_length * nvl(g_text_chunk,0))+1;
6266: -- DBMS_LOB.Read(g_text_message, buffer_length, pos, buffer);
6267: DBMS_LOB.Read(g_LOBTable(g_text_messageIdx).temp_lob, buffer_length, pos, buffer);
6268: if pos+buffer_length > DBMS_LOB.GetLength(g_LOBTable(g_text_messageIdx).temp_lob) then
6269: end_of_clob := 1;
6270: g_text_chunk := 0;
6271: else
6272: g_text_chunk := g_text_chunk + 1;

Line 6288: -- DBMS_LOB.close(g_html_message);

6284: procedure CloseLOB(doc_type in VARCHAR2)
6285: is
6286: begin
6287: if doc_type = g_ntfDocHtml then
6288: -- DBMS_LOB.close(g_html_message);
6289: -- DBMS_LOB.FreeTemporary(g_html_message);
6290: wf_temp_lob.releaseLob(g_LOBTable, g_html_messageIdx);
6291: else
6292: -- DBMS_LOB.close(g_text_message);

Line 6289: -- DBMS_LOB.FreeTemporary(g_html_message);

6285: is
6286: begin
6287: if doc_type = g_ntfDocHtml then
6288: -- DBMS_LOB.close(g_html_message);
6289: -- DBMS_LOB.FreeTemporary(g_html_message);
6290: wf_temp_lob.releaseLob(g_LOBTable, g_html_messageIdx);
6291: else
6292: -- DBMS_LOB.close(g_text_message);
6293: -- DBMS_LOB.FreeTemporary(g_text_message);

Line 6292: -- DBMS_LOB.close(g_text_message);

6288: -- DBMS_LOB.close(g_html_message);
6289: -- DBMS_LOB.FreeTemporary(g_html_message);
6290: wf_temp_lob.releaseLob(g_LOBTable, g_html_messageIdx);
6291: else
6292: -- DBMS_LOB.close(g_text_message);
6293: -- DBMS_LOB.FreeTemporary(g_text_message);
6294: wf_temp_lob.releaseLob(g_LOBTable, g_text_messageIdx);
6295: end if;
6296: exception

Line 6293: -- DBMS_LOB.FreeTemporary(g_text_message);

6289: -- DBMS_LOB.FreeTemporary(g_html_message);
6290: wf_temp_lob.releaseLob(g_LOBTable, g_html_messageIdx);
6291: else
6292: -- DBMS_LOB.close(g_text_message);
6293: -- DBMS_LOB.FreeTemporary(g_text_message);
6294: wf_temp_lob.releaseLob(g_LOBTable, g_text_messageIdx);
6295: end if;
6296: exception
6297: when others then

Line 6512: -- DBMS_LOB.CreateTemporary(g_html_message, true, dbms_lob.SESSION);

6508: -- First go for the PLSQL: if that returns the name of the
6509: -- attribute, then try the PLSQLCLOB:
6510: doc := WF_NOTIFICATION.GetAttrDoc(nid, docattrname, disptype);
6511: if disptype = g_ntfDocHtml then
6512: -- DBMS_LOB.CreateTemporary(g_html_message, true, dbms_lob.SESSION);
6513: -- DBMS_LOB.Open(g_html_message, DBMS_LOB.LOB_READWRITE);
6514: g_html_messageIdx := wf_temp_lob.getLob(g_LOBTable);
6515: if doc = '&'||docattrname then
6516: Wf_Notification.GetAttrCLOB(nid, docattrname, disptype,

Line 6513: -- DBMS_LOB.Open(g_html_message, DBMS_LOB.LOB_READWRITE);

6509: -- attribute, then try the PLSQLCLOB:
6510: doc := WF_NOTIFICATION.GetAttrDoc(nid, docattrname, disptype);
6511: if disptype = g_ntfDocHtml then
6512: -- DBMS_LOB.CreateTemporary(g_html_message, true, dbms_lob.SESSION);
6513: -- DBMS_LOB.Open(g_html_message, DBMS_LOB.LOB_READWRITE);
6514: g_html_messageIdx := wf_temp_lob.getLob(g_LOBTable);
6515: if doc = '&'||docattrname then
6516: Wf_Notification.GetAttrCLOB(nid, docattrname, disptype,
6517: g_LOBTable(g_html_messageIdx).temp_lob, doctype, aname);

Line 6519: DBMS_LOB.Write(g_LOBTable(g_html_messageIdx).temp_lob, length(doc), 1, doc);

6515: if doc = '&'||docattrname then
6516: Wf_Notification.GetAttrCLOB(nid, docattrname, disptype,
6517: g_LOBTable(g_html_messageIdx).temp_lob, doctype, aname);
6518: else
6519: DBMS_LOB.Write(g_LOBTable(g_html_messageIdx).temp_lob, length(doc), 1, doc);
6520: end if;
6521: else
6522: -- DBMS_LOB.CreateTemporary(g_text_message, true, dbms_lob.SESSION);
6523: -- DBMS_LOB.Open(g_text_message, DBMS_LOB.LOB_READWRITE);

Line 6522: -- DBMS_LOB.CreateTemporary(g_text_message, true, dbms_lob.SESSION);

6518: else
6519: DBMS_LOB.Write(g_LOBTable(g_html_messageIdx).temp_lob, length(doc), 1, doc);
6520: end if;
6521: else
6522: -- DBMS_LOB.CreateTemporary(g_text_message, true, dbms_lob.SESSION);
6523: -- DBMS_LOB.Open(g_text_message, DBMS_LOB.LOB_READWRITE);
6524: g_text_messageIdx := wf_temp_lob.getLob(g_LOBTable);
6525: if doc = '&'||docattrname then
6526: Wf_Notification.GetAttrCLOB(nid, docattrname, disptype,

Line 6523: -- DBMS_LOB.Open(g_text_message, DBMS_LOB.LOB_READWRITE);

6519: DBMS_LOB.Write(g_LOBTable(g_html_messageIdx).temp_lob, length(doc), 1, doc);
6520: end if;
6521: else
6522: -- DBMS_LOB.CreateTemporary(g_text_message, true, dbms_lob.SESSION);
6523: -- DBMS_LOB.Open(g_text_message, DBMS_LOB.LOB_READWRITE);
6524: g_text_messageIdx := wf_temp_lob.getLob(g_LOBTable);
6525: if doc = '&'||docattrname then
6526: Wf_Notification.GetAttrCLOB(nid, docattrname, disptype,
6527: g_LOBTable(g_text_messageIdx).temp_lob, doctype, aname);

Line 6529: DBMS_LOB.Write(g_LOBTable(g_text_messageIdx).temp_lob, length(doc), 1, doc);

6525: if doc = '&'||docattrname then
6526: Wf_Notification.GetAttrCLOB(nid, docattrname, disptype,
6527: g_LOBTable(g_text_messageIdx).temp_lob, doctype, aname);
6528: else
6529: DBMS_LOB.Write(g_LOBTable(g_text_messageIdx).temp_lob, length(doc), 1, doc);
6530: end if;
6531: end if;
6532:
6533:

Line 7932: if (p_subject is null and (p_message is null or dbms_lob.GetLength(p_message)=0)) then

7928: wf_core.raise('WFMLR_NO_RECIPIENTS');
7929: end if;
7930:
7931: -- At least subject or body is required
7932: if (p_subject is null and (p_message is null or dbms_lob.GetLength(p_message)=0)) then
7933: if (wf_log_pkg.level_procedure >= fnd_log.g_current_runtime_level) then
7934: wf_log_pkg.string(WF_LOG_PKG.level_procedure,
7935: 'wf.plsql.WF_MAIL.send',
7936: 'Subject and Message Contents are blank or null. ');

Line 7953: dbms_lob.createTemporary(l_msg_doc, TRUE, dbms_lob.call);

7949:
7950: wf_core.raise('WFMLR_NO_MODULE');
7951: end if;
7952:
7953: dbms_lob.createTemporary(l_msg_doc, TRUE, dbms_lob.call);
7954: l_str := '';
7955: l_pos := length(l_str);
7956: dbms_lob.write(l_msg_doc, l_pos, 1, l_str);
7957:

Line 7956: dbms_lob.write(l_msg_doc, l_pos, 1, l_str);

7952:
7953: dbms_lob.createTemporary(l_msg_doc, TRUE, dbms_lob.call);
7954: l_str := '';
7955: l_pos := length(l_str);
7956: dbms_lob.write(l_msg_doc, l_pos, 1, l_str);
7957:
7958: -- begin
7959: wf_xml.AddElementAttribute('maxcount', '1', l_attrlist);
7960: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'NOTIFICATIONGROUP', '', l_attrlist);

Line 8008: dbms_lob.createTemporary(l_recp_clob, TRUE, dbms_lob.call);

8004:
8005: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'NOTIFICATION', '', l_attrlist);
8006: l_attrlist.DELETE;
8007:
8008: dbms_lob.createTemporary(l_recp_clob, TRUE, dbms_lob.call);
8009:
8010: l_recp_pos := 0;
8011: l_recp_tmp := '';
8012:

Line 8041: dbms_lob.WriteAppend(l_recp_clob, l_recp_len, l_recp_tmp);

8037: i := p_recipient_list.next(i);
8038:
8039: l_recp_len := length(l_recp_tmp);
8040: if (l_recp_len > 30000) then
8041: dbms_lob.WriteAppend(l_recp_clob, l_recp_len, l_recp_tmp);
8042: l_recp_tmp := '';
8043: l_recp_pos := 0;
8044: l_recp_is_lob := true;
8045: end if;

Line 8050: dbms_lob.WriteAppend(l_recp_clob, l_recp_len, l_recp_tmp);

8046: end loop;
8047:
8048: l_recp_len := length(l_recp_tmp);
8049: if(l_recp_len > 0 and l_recp_is_lob) then
8050: dbms_lob.WriteAppend(l_recp_clob, l_recp_len, l_recp_tmp);
8051: end if;
8052:
8053: -- start
8054: l_recp_pos := 0;

Line 8056: dbms_lob.createTemporary(l_recp, TRUE, dbms_lob.call);

8052:
8053: -- start
8054: l_recp_pos := 0;
8055: if (l_recp_is_lob) then
8056: dbms_lob.createTemporary(l_recp, TRUE, dbms_lob.call);
8057: l_recp_pos := wf_xml.NewLOBTag(l_recp, l_recp_pos, 'RECIPIENTLIST', l_recp_clob, l_attrlist);
8058: l_recp_pos := wf_xml.SkipLOBTag(l_recp, 'RECIPIENTLIST', l_recp_pos, l_occurance);
8059: else
8060: l_recp_pos := wf_xml.NewTag(l_recp_txt, l_recp_pos, 'RECIPIENTLIST', l_recp_tmp, l_attrlist);

Line 8099: dbms_lob.WriteAppend(l_recp, length(l_hdr_tmp), l_hdr_tmp);

8095: l_hdr_pos := wf_xml.NewTag(l_hdr_tmp, l_hdr_pos, 'SUBJECT', l_subject, l_attrlist);
8096: l_hdr_pos := wf_xml.SkipTag(l_hdr_tmp, 'SUBJECT', l_hdr_pos, l_occurance);
8097:
8098: if (l_recp_is_lob) then
8099: dbms_lob.WriteAppend(l_recp, length(l_hdr_tmp), l_hdr_tmp);
8100: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'HEADER', l_recp, l_attrlist);
8101: else
8102: l_hdr_tmp := l_recp_txt || l_hdr_tmp;
8103: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'HEADER', l_hdr_tmp, l_attrlist);

Line 8121: dbms_lob.trim(g_LOBTable(l_messageIdx).temp_lob,0);

8117: --
8118:
8119: l_messageIdx := wf_temp_lob.getLOB(g_LOBTable);
8120:
8121: dbms_lob.trim(g_LOBTable(l_messageIdx).temp_lob,0);
8122:
8123: dbms_lob.writeAppend(g_LOBTable(l_messageIdx).temp_lob,
8124: length(l_start_cdata), l_start_cdata);
8125:

Line 8123: dbms_lob.writeAppend(g_LOBTable(l_messageIdx).temp_lob,

8119: l_messageIdx := wf_temp_lob.getLOB(g_LOBTable);
8120:
8121: dbms_lob.trim(g_LOBTable(l_messageIdx).temp_lob,0);
8122:
8123: dbms_lob.writeAppend(g_LOBTable(l_messageIdx).temp_lob,
8124: length(l_start_cdata), l_start_cdata);
8125:
8126: dbms_lob.append(dest_lob => g_LOBTable(l_messageIdx).temp_lob,
8127: src_lob => p_message);

Line 8126: dbms_lob.append(dest_lob => g_LOBTable(l_messageIdx).temp_lob,

8122:
8123: dbms_lob.writeAppend(g_LOBTable(l_messageIdx).temp_lob,
8124: length(l_start_cdata), l_start_cdata);
8125:
8126: dbms_lob.append(dest_lob => g_LOBTable(l_messageIdx).temp_lob,
8127: src_lob => p_message);
8128:
8129: if l_idstr is not null and l_fyi_flag = false then
8130: l_idstr := wf_core.newline||l_idstr;

Line 8132: dbms_lob.writeAppend(lob_loc => g_LOBTable(l_messageIdx).temp_lob,

8128:
8129: if l_idstr is not null and l_fyi_flag = false then
8130: l_idstr := wf_core.newline||l_idstr;
8131: l_idsize := length(l_idstr);
8132: dbms_lob.writeAppend(lob_loc => g_LOBTable(l_messageIdx).temp_lob,
8133: amount => l_idsize,
8134: buffer => l_idstr);
8135: end if;
8136:

Line 8137: dbms_lob.writeAppend(g_LOBTable(l_messageIdx).temp_lob,

8133: amount => l_idsize,
8134: buffer => l_idstr);
8135: end if;
8136:
8137: dbms_lob.writeAppend(g_LOBTable(l_messageIdx).temp_lob,
8138: length(l_end_cdata), l_end_cdata);
8139:
8140: -- Alert Message has been appended in XML Payload, can be released now
8141: l_pos := wf_xml.NewLOBTag(l_msg_doc, l_pos, 'MESSAGE',

Line 8425: dbms_lob.createtemporary(l_msg_doc, TRUE,dbms_lob.CALL);

8421: -- reset the session language
8422: WF_Notification.SetNLSLanguage(l_orig_lang, l_orig_terr);
8423:
8424: -- LOB to store message payload.
8425: dbms_lob.createtemporary(l_msg_doc, TRUE,dbms_lob.CALL);
8426:
8427: l_str := '';
8428: l_pos := LENGTH(l_str);
8429: dbms_lob.WRITE(l_msg_doc, l_pos, 1, l_str);

Line 8429: dbms_lob.WRITE(l_msg_doc, l_pos, 1, l_str);

8425: dbms_lob.createtemporary(l_msg_doc, TRUE,dbms_lob.CALL);
8426:
8427: l_str := '';
8428: l_pos := LENGTH(l_str);
8429: dbms_lob.WRITE(l_msg_doc, l_pos, 1, l_str);
8430:
8431: -- begin
8432: wf_xml.AddElementAttribute('maxcount','1',l_attrlist);
8433: l_pos := wf_xml.newlobtag(l_msg_doc,l_pos,'NOTIFICATIONGROUP','',l_attrlist);

Line 8541: dbms_lob.TRIM(g_lobtable(l_messageidx).temp_lob,0);

8537:
8538:
8539: l_messageidx := wf_temp_lob.getlob(g_lobtable);
8540:
8541: dbms_lob.TRIM(g_lobtable(l_messageidx).temp_lob,0);
8542:
8543: dbms_lob.writeappend(g_lobtable(l_messageidx).temp_lob,
8544: LENGTH(l_start_cdata), l_start_cdata);
8545:

Line 8543: dbms_lob.writeappend(g_lobtable(l_messageidx).temp_lob,

8539: l_messageidx := wf_temp_lob.getlob(g_lobtable);
8540:
8541: dbms_lob.TRIM(g_lobtable(l_messageidx).temp_lob,0);
8542:
8543: dbms_lob.writeappend(g_lobtable(l_messageidx).temp_lob,
8544: LENGTH(l_start_cdata), l_start_cdata);
8545:
8546: dbms_lob.append(dest_lob=>g_lobtable(l_messageidx).temp_lob,
8547: src_lob=>l_text_body);

Line 8546: dbms_lob.append(dest_lob=>g_lobtable(l_messageidx).temp_lob,

8542:
8543: dbms_lob.writeappend(g_lobtable(l_messageidx).temp_lob,
8544: LENGTH(l_start_cdata), l_start_cdata);
8545:
8546: dbms_lob.append(dest_lob=>g_lobtable(l_messageidx).temp_lob,
8547: src_lob=>l_text_body);
8548:
8549: dbms_lob.writeappend(g_lobtable(l_messageidx).temp_lob,
8550: LENGTH(l_end_cdata),l_end_cdata);

Line 8549: dbms_lob.writeappend(g_lobtable(l_messageidx).temp_lob,

8545:
8546: dbms_lob.append(dest_lob=>g_lobtable(l_messageidx).temp_lob,
8547: src_lob=>l_text_body);
8548:
8549: dbms_lob.writeappend(g_lobtable(l_messageidx).temp_lob,
8550: LENGTH(l_end_cdata),l_end_cdata);
8551:
8552: -- l_attrlist content-type='text/plain' will be used same
8553: -- as for BODYPART

Line 8571: --dbms_lob.trim(g_LOBTable(l_messageidx).temp_lob, 0);

8567: -- commenting below code as of now.
8568:
8569: -- reuse same LOB for html body
8570: -- Check if same can be re-used or not.
8571: --dbms_lob.trim(g_LOBTable(l_messageidx).temp_lob, 0);
8572:
8573: --l_attrlist.DELETE;
8574:
8575: -- start

Line 8579: --dbms_lob.writeappend(g_lobtable(l_messageidx).temp_lob,

8575: -- start
8576: --wf_xml.AddElementAttribute('content-type','text/html', l_attrlist);
8577: --l_pos := wf_xml.NewLOBTag(l_msg_doc,l_pos,'BODYPART', '', l_attrlist);
8578:
8579: --dbms_lob.writeappend(g_lobtable(l_messageidx).temp_lob,
8580: -- LENGTH(l_start_cdata), l_start_cdata);
8581:
8582: --dbms_lob.append(dest_lob=>g_lobtable(l_messageidx).temp_lob,
8583: -- src_lob=>l_html_body);

Line 8582: --dbms_lob.append(dest_lob=>g_lobtable(l_messageidx).temp_lob,

8578:
8579: --dbms_lob.writeappend(g_lobtable(l_messageidx).temp_lob,
8580: -- LENGTH(l_start_cdata), l_start_cdata);
8581:
8582: --dbms_lob.append(dest_lob=>g_lobtable(l_messageidx).temp_lob,
8583: -- src_lob=>l_html_body);
8584:
8585: --dbms_lob.writeappend(g_lobtable(l_messageidx).temp_lob,
8586: -- LENGTH(l_end_cdata),l_end_cdata);

Line 8585: --dbms_lob.writeappend(g_lobtable(l_messageidx).temp_lob,

8581:
8582: --dbms_lob.append(dest_lob=>g_lobtable(l_messageidx).temp_lob,
8583: -- src_lob=>l_html_body);
8584:
8585: --dbms_lob.writeappend(g_lobtable(l_messageidx).temp_lob,
8586: -- LENGTH(l_end_cdata),l_end_cdata);
8587:
8588: --l_pos := wf_xml.NewLOBTag(l_msg_doc,l_pos, 'MESSAGE',
8589: -- g_lobtable(l_messageidx).temp_lob,