vspacer
 
vspacer
 

Kintana Script : List Step Source

 

Purpose

This script pulls together a record of all the code you have used in a workflow.

It's an easy way to get over all visibility on the functionality that is buried clicks deep in workflow steps.
It doesn't hurt to check it in to your version control system either...

Tested

With HP PPM (Project and Portfolio Management) Kintana v6.0.

Usage

Paste the script into SQL Runner

Omit the comment, spool, and linesize statements unless you're using a PL-SQL editor. SQL Runner only supports select statements and you'll get a KNTA-10648 error. If using PL-SQL change 'yyyymmdd' in the output file name to today's date.

Script
-- List Step Source
-- Note! 'My Workflow Name' MUST be changed in four places!
spool c:\list_step_source_yyyymmdd.txt
set linesize 1000
-- EXECUTION steps
select ww.workflow_name, wws.sort_order "Step#", wws.step_name, wws.step_type_code,
       we.execution_name "Name", we.description "Description", we.execution_type_code "Type Code"
from KWFL_WORKFLOW_STEPS wws, KWFL_WORKFLOWS ww,
     KWFL_EXECUTIONS we
where ww.workflow_id = wws.workflow_id
  and ww.workflow_name = 'My Workflow Name'  -- limit to one workflow
  and wws.step_type_code = 'EXECUTION'
  and wws.step_source_id = we.execution_id
UNION ALL
-- APPROVAL steps
select ww.workflow_name, wws.sort_order "Step#", wws.step_name, wws.step_type_code,
       wa.approval_name "Name", wa.description "Description", wa.approvals_required_code "Type Code"
from KWFL_WORKFLOW_STEPS wws, KWFL_WORKFLOWS ww,
     KWFL_APPROVALS wa
where ww.workflow_id = wws.workflow_id
  and ww.workflow_name = 'My Workflow Name'  -- limit to one workflow
  and wws.step_type_code = 'APPROVAL'
  and wws.step_source_id = wa.approval_id
UNION ALL
-- CONDITION steps
select ww.workflow_name, wws.sort_order "Step#", wws.step_name, wws.step_type_code,
       wc.condition_name "Name", wc.description "Description", wc.condition_type_code "Type Code"
from KWFL_WORKFLOW_STEPS wws, KWFL_WORKFLOWS ww,
     KWFL_CONDITIONS wc
where ww.workflow_id = wws.workflow_id
  and ww.workflow_name = 'My Workflow Name'  -- limit to one workflow
  and wws.step_type_code = 'CONDITION'
  and wws.step_source_id = wc.condition_id
UNION ALL
-- (SUB)WORKFLOW steps
select unique ww.workflow_name, wws.sort_order "Step#", wws.step_name, wws.step_type_code,
       ' ' "Name", ' ' "Description", ' ' "Type Code"
from KWFL_WORKFLOW_STEPS wws, KWFL_WORKFLOWS ww,
     KWFL_APPROVALS wc
where ww.workflow_id = wws.workflow_id
  and ww.workflow_name = 'My Workflow Name'  -- limit to one workflow
  and wws.step_type_code = 'WORKFLOW'
spool off
Output In execution order so that common code is grouped.
WORKFLOW_NAME      STEP# STEP_NAME          STEP_TYPE_CODE Name                Description                            Type Code
Inventory Returns   23   Inward Inspection  EXECUTION      Inward Inspection   ZDS_PROC.Rfidvalidation(R.REQUEST_ID)  RFID International
...

To extract the output, click on the [Open as Text] button.

This opens a text window from which you can copy and paste.

Download

KintanaScripts.zip (79 Kb)

Kintana™, 'Mercury IT Governance™', 'HP PPM (Project and Portfolio Management)™
are trademarks of ChainLink, Mercury Interactive Corporation, and Hewlett Packard Corporation respectively.


   


Back to top | ZDS Home | This article updated November 18, 2008.