3910: procedure getWorkflowLog(applicationIdIn in integer,
3911: transactionIdIn in varchar2 default null,
3912: logOut out nocopy ame_util.workflowLogTable) as
3913: type logCursorReturnType is record(
3914: item_key wf_item_activity_statuses.item_key%type,
3915: error_name wf_item_activity_statuses.error_name%type,
3916: error_message wf_item_activity_statuses.error_message%type,
3917: error_stack wf_item_activity_statuses.error_stack%type);
3918: type logCursorType is ref cursor return logCursorReturnType;
3911: transactionIdIn in varchar2 default null,
3912: logOut out nocopy ame_util.workflowLogTable) as
3913: type logCursorReturnType is record(
3914: item_key wf_item_activity_statuses.item_key%type,
3915: error_name wf_item_activity_statuses.error_name%type,
3916: error_message wf_item_activity_statuses.error_message%type,
3917: error_stack wf_item_activity_statuses.error_stack%type);
3918: type logCursorType is ref cursor return logCursorReturnType;
3919: badCallException exception;
3912: logOut out nocopy ame_util.workflowLogTable) as
3913: type logCursorReturnType is record(
3914: item_key wf_item_activity_statuses.item_key%type,
3915: error_name wf_item_activity_statuses.error_name%type,
3916: error_message wf_item_activity_statuses.error_message%type,
3917: error_stack wf_item_activity_statuses.error_stack%type);
3918: type logCursorType is ref cursor return logCursorReturnType;
3919: badCallException exception;
3920: currentCallStart integer;
3913: type logCursorReturnType is record(
3914: item_key wf_item_activity_statuses.item_key%type,
3915: error_name wf_item_activity_statuses.error_name%type,
3916: error_message wf_item_activity_statuses.error_message%type,
3917: error_stack wf_item_activity_statuses.error_stack%type);
3918: type logCursorType is ref cursor return logCursorReturnType;
3919: badCallException exception;
3920: currentCallStart integer;
3921: currentCallDot integer;
3928: logCursor logCursorType;
3929: logCursorValues logCursorReturnType;
3930: tempIndex integer;
3931: transactionTypeId ame_calling_apps.transaction_type_id%type;
3932: workflowItemKey wf_item_activity_statuses.item_key%type;
3933: workflowItemType wf_item_activity_statuses.item_type%type;
3934: begin
3935: ame_util.getFndApplicationId(applicationIdIn => applicationIdIn,
3936: fndApplicationIdOut => fndAppId,
3929: logCursorValues logCursorReturnType;
3930: tempIndex integer;
3931: transactionTypeId ame_calling_apps.transaction_type_id%type;
3932: workflowItemKey wf_item_activity_statuses.item_key%type;
3933: workflowItemType wf_item_activity_statuses.item_type%type;
3934: begin
3935: ame_util.getFndApplicationId(applicationIdIn => applicationIdIn,
3936: fndApplicationIdOut => fndAppId,
3937: transactionTypeIdOut => transactionTypeId);
3941: workflowItemTypeOut => workflowItemType);
3942: if(transactionIdIn is null) then
3943: open logCursor for
3944: select
3945: wf_item_activity_statuses.item_key,
3946: wf_item_activity_statuses.error_name,
3947: wf_item_activity_statuses.error_message,
3948: wf_item_activity_statuses.error_stack
3949: from
3942: if(transactionIdIn is null) then
3943: open logCursor for
3944: select
3945: wf_item_activity_statuses.item_key,
3946: wf_item_activity_statuses.error_name,
3947: wf_item_activity_statuses.error_message,
3948: wf_item_activity_statuses.error_stack
3949: from
3950: wf_item_activity_statuses,
3943: open logCursor for
3944: select
3945: wf_item_activity_statuses.item_key,
3946: wf_item_activity_statuses.error_name,
3947: wf_item_activity_statuses.error_message,
3948: wf_item_activity_statuses.error_stack
3949: from
3950: wf_item_activity_statuses,
3951: wf_items
3944: select
3945: wf_item_activity_statuses.item_key,
3946: wf_item_activity_statuses.error_name,
3947: wf_item_activity_statuses.error_message,
3948: wf_item_activity_statuses.error_stack
3949: from
3950: wf_item_activity_statuses,
3951: wf_items
3952: where
3946: wf_item_activity_statuses.error_name,
3947: wf_item_activity_statuses.error_message,
3948: wf_item_activity_statuses.error_stack
3949: from
3950: wf_item_activity_statuses,
3951: wf_items
3952: where
3953: wf_item_activity_statuses.item_type = workflowItemType and
3954: wf_item_activity_statuses.activity_status = 'ERROR' and
3949: from
3950: wf_item_activity_statuses,
3951: wf_items
3952: where
3953: wf_item_activity_statuses.item_type = workflowItemType and
3954: wf_item_activity_statuses.activity_status = 'ERROR' and
3955: wf_item_activity_statuses.error_stack like (wf_core.newline || 'AME_%') and
3956: wf_item_activity_statuses.item_type = wf_items.item_type and
3957: wf_item_activity_statuses.item_key = wf_items.item_key and
3950: wf_item_activity_statuses,
3951: wf_items
3952: where
3953: wf_item_activity_statuses.item_type = workflowItemType and
3954: wf_item_activity_statuses.activity_status = 'ERROR' and
3955: wf_item_activity_statuses.error_stack like (wf_core.newline || 'AME_%') and
3956: wf_item_activity_statuses.item_type = wf_items.item_type and
3957: wf_item_activity_statuses.item_key = wf_items.item_key and
3958: wf_items.end_date is null;
3951: wf_items
3952: where
3953: wf_item_activity_statuses.item_type = workflowItemType and
3954: wf_item_activity_statuses.activity_status = 'ERROR' and
3955: wf_item_activity_statuses.error_stack like (wf_core.newline || 'AME_%') and
3956: wf_item_activity_statuses.item_type = wf_items.item_type and
3957: wf_item_activity_statuses.item_key = wf_items.item_key and
3958: wf_items.end_date is null;
3959: else
3952: where
3953: wf_item_activity_statuses.item_type = workflowItemType and
3954: wf_item_activity_statuses.activity_status = 'ERROR' and
3955: wf_item_activity_statuses.error_stack like (wf_core.newline || 'AME_%') and
3956: wf_item_activity_statuses.item_type = wf_items.item_type and
3957: wf_item_activity_statuses.item_key = wf_items.item_key and
3958: wf_items.end_date is null;
3959: else
3960: open logCursor for
3953: wf_item_activity_statuses.item_type = workflowItemType and
3954: wf_item_activity_statuses.activity_status = 'ERROR' and
3955: wf_item_activity_statuses.error_stack like (wf_core.newline || 'AME_%') and
3956: wf_item_activity_statuses.item_type = wf_items.item_type and
3957: wf_item_activity_statuses.item_key = wf_items.item_key and
3958: wf_items.end_date is null;
3959: else
3960: open logCursor for
3961: select
3958: wf_items.end_date is null;
3959: else
3960: open logCursor for
3961: select
3962: wf_item_activity_statuses.item_key, /* We need to select this column to use the same cursor. */
3963: wf_item_activity_statuses.error_name,
3964: wf_item_activity_statuses.error_message,
3965: wf_item_activity_statuses.error_stack
3966: from
3959: else
3960: open logCursor for
3961: select
3962: wf_item_activity_statuses.item_key, /* We need to select this column to use the same cursor. */
3963: wf_item_activity_statuses.error_name,
3964: wf_item_activity_statuses.error_message,
3965: wf_item_activity_statuses.error_stack
3966: from
3967: wf_item_activity_statuses,
3960: open logCursor for
3961: select
3962: wf_item_activity_statuses.item_key, /* We need to select this column to use the same cursor. */
3963: wf_item_activity_statuses.error_name,
3964: wf_item_activity_statuses.error_message,
3965: wf_item_activity_statuses.error_stack
3966: from
3967: wf_item_activity_statuses,
3968: wf_items
3961: select
3962: wf_item_activity_statuses.item_key, /* We need to select this column to use the same cursor. */
3963: wf_item_activity_statuses.error_name,
3964: wf_item_activity_statuses.error_message,
3965: wf_item_activity_statuses.error_stack
3966: from
3967: wf_item_activity_statuses,
3968: wf_items
3969: where
3963: wf_item_activity_statuses.error_name,
3964: wf_item_activity_statuses.error_message,
3965: wf_item_activity_statuses.error_stack
3966: from
3967: wf_item_activity_statuses,
3968: wf_items
3969: where
3970: wf_item_activity_statuses.item_type = workflowItemType and
3971: wf_item_activity_statuses.item_key = workflowItemKey and
3966: from
3967: wf_item_activity_statuses,
3968: wf_items
3969: where
3970: wf_item_activity_statuses.item_type = workflowItemType and
3971: wf_item_activity_statuses.item_key = workflowItemKey and
3972: wf_item_activity_statuses.activity_status = 'ERROR' and
3973: wf_item_activity_statuses.error_stack like (wf_core.newline || 'AME_%') and
3974: wf_item_activity_statuses.item_type = wf_items.item_type and
3967: wf_item_activity_statuses,
3968: wf_items
3969: where
3970: wf_item_activity_statuses.item_type = workflowItemType and
3971: wf_item_activity_statuses.item_key = workflowItemKey and
3972: wf_item_activity_statuses.activity_status = 'ERROR' and
3973: wf_item_activity_statuses.error_stack like (wf_core.newline || 'AME_%') and
3974: wf_item_activity_statuses.item_type = wf_items.item_type and
3975: wf_item_activity_statuses.item_key = wf_items.item_key and
3968: wf_items
3969: where
3970: wf_item_activity_statuses.item_type = workflowItemType and
3971: wf_item_activity_statuses.item_key = workflowItemKey and
3972: wf_item_activity_statuses.activity_status = 'ERROR' and
3973: wf_item_activity_statuses.error_stack like (wf_core.newline || 'AME_%') and
3974: wf_item_activity_statuses.item_type = wf_items.item_type and
3975: wf_item_activity_statuses.item_key = wf_items.item_key and
3976: wf_items.end_date is null;
3969: where
3970: wf_item_activity_statuses.item_type = workflowItemType and
3971: wf_item_activity_statuses.item_key = workflowItemKey and
3972: wf_item_activity_statuses.activity_status = 'ERROR' and
3973: wf_item_activity_statuses.error_stack like (wf_core.newline || 'AME_%') and
3974: wf_item_activity_statuses.item_type = wf_items.item_type and
3975: wf_item_activity_statuses.item_key = wf_items.item_key and
3976: wf_items.end_date is null;
3977: end if;
3970: wf_item_activity_statuses.item_type = workflowItemType and
3971: wf_item_activity_statuses.item_key = workflowItemKey and
3972: wf_item_activity_statuses.activity_status = 'ERROR' and
3973: wf_item_activity_statuses.error_stack like (wf_core.newline || 'AME_%') and
3974: wf_item_activity_statuses.item_type = wf_items.item_type and
3975: wf_item_activity_statuses.item_key = wf_items.item_key and
3976: wf_items.end_date is null;
3977: end if;
3978: tempIndex := 1;
3971: wf_item_activity_statuses.item_key = workflowItemKey and
3972: wf_item_activity_statuses.activity_status = 'ERROR' and
3973: wf_item_activity_statuses.error_stack like (wf_core.newline || 'AME_%') and
3974: wf_item_activity_statuses.item_type = wf_items.item_type and
3975: wf_item_activity_statuses.item_key = wf_items.item_key and
3976: wf_items.end_date is null;
3977: end if;
3978: tempIndex := 1;
3979: loop