958: ,x_msg_data => l_msg_data
959: );
960:
961: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
962: WF_NOTIFICATION.WriteToClob(document, 'Content Generation failed');
963: dbms_lob.writeappend(document, 255, substr(Sqlerrm, 255));
964: end if;
965:
966:
972: document_type := 'text/html';
973:
974: EXCEPTION
975: WHEN OTHERS THEN
976: WF_NOTIFICATION.WriteToClob(document, 'Content Generation failed');
977: dbms_lob.writeappend(document, 255, substrb(Sqlerrm, 255)); -- changed substr to substrb for bug 3795807
978: NULL;
979: END show_workplan_preview;
980: /*=================================================================