Siebel Workflow Related SQLs and Queries

Siebel Workflow back-end SQL Queries.

You can use these SQL queries to find out Siebel Workflow policies, Business Process, Sub processes and the steps being used.

To find the Workflow in which Busines Service is used:
SELECT
T1.SERVICE_NAME "BS",
T2.name "WF",
T2.status_cd "WF Status"
FROM
S_WF_STEP T1,
s_wf_step T2
WHERE
T1.row_id = T2.process_id and
T2.SERVICE_NAME like ('BS NAME')
and T1.status_cd ='ACTIVE'
To find all the input arguments passed to the method of particular Business Service through particular workflow
SELECT P.NAME PROCESS, S.NAME STEP, s.service_name BS_NAME , s.method_name , A.NAME ARGUMENT ,A.VAL_TYPE_CD VALUE_TYPE, A.VAL VALUE
FROM S_WF_STEP P, S_WF_STEP S, S_WF_STEP_ARG A
WHERE P.NAME = 'Account Status Update' -- Name of Workflow
AND P.TYPE_CD = 'PROCESS'
AND P.STATUS_CD = 'ACTIVE'
AND P.ROW_ID = S.PROCESS_ID
AND S.ROW_ID = A.STEP_ID
AND A.INPUT_FLG = 'I'
AND s.service_name is not null
AND s.method_name is not null
ORDER BY 1,2,3,4,5
To find out all the Steps of a Siebel Workflow
SELECT P.NAME PROCESS, S.NAME STEP --A.NAME ARG,A.VAL_TYPE_CD VAL_TYPE, A.VAL VAL
FROM S_WF_STEP P, S_WF_STEP S
WHERE P.TYPE_CD = 'PROCESS'
AND P.STATUS_CD = 'ACTIVE'
AND P.ROW_ID = S.PROCESS_ID
AND P.NAME = 'Status Change' --- WF Name 
To find Workflow Policy from Workflow Process:
select t1.name from siebel.s_escl_rule t1, s_escl_action t2,s_action_arg t3 where
t1.row_id = t2.rule_id and
t2.action_id = t3.action_id and
t3.DEFAULT_VALUE like 'WF Process Name'
To find parent Workflow Process from a Workflow sub process:
select distinct(name) from s_wf_step where
status_cd ='ACTIVE' and
type_cd='PROCESS' and row_id in
(select distinct(process_id) from s_wf_step where method_name like
'Sub Process Name'
and type_cd ='SUB_PROCESS')
Related Posts

No comments:

 

Aired | Copyright © 2009-2014| All Rights Reserved 2014

Contact Us | About Us