Primary Key Vs Surrogate Key
What is the difference between Primary Key and Surrogate Key?
October 13, 2017
Why Unconnected Lookup cannot be dynamic?
November 2, 2017
Show all

Query to get the workflows/sessions run history

Repository Queries

Repository Queries

This repository query will provide the list of workflows and the sessions run time along with the folder name and number of minutes the session taken to complete the run.

SELECT DISTINCT
opb_subject.subj_name,
opb_wflow_run.workflow_name,
opb_task_inst_run.instance_name,
trunc(opb_task_inst_run.start_time) load_date,
TO_CHAR(
opb_task_inst_run.start_time,
‘HH24:MI.SS’
) sess_start_time,
TO_CHAR(
opb_task_inst_run.end_time,
‘HH24:MI.SS’
) sess_end_time,
trunc(
(opb_task_inst_run.end_time – opb_task_inst_run.start_time) * 1440,
2
) duration_in_mins
FROM
opb_subject,
opb_task_inst_run,
opb_wflow_run,
opb_object_type,
opb_sess_task_log
WHERE
opb_subject.subj_id = opb_task_inst_run.subject_id
AND
opb_wflow_run.workflow_id = opb_task_inst_run.workflow_id
AND
opb_wflow_run.workflow_run_id = opb_task_inst_run.workflow_run_id
AND
opb_task_inst_run.task_type = opb_object_type.object_type_id
AND
opb_object_type.object_type = 68
AND
opb_wflow_run.workflow_id = opb_sess_task_log.workflow_id
AND
opb_wflow_run.workflow_run_id = opb_sess_task_log.workflow_run_id
AND
opb_task_inst_run.worklet_run_id = opb_sess_task_log.worklet_run_id
AND
opb_task_inst_run.instance_id = opb_sess_task_log.instance_id;

You can customize the query based on your need and what you are looking for.

Leave a Reply

Your email address will not be published. Required fields are marked *

Share
+1
Tweet
Pin
Share