Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

How to find the workflow steps in which the environment is used?

SOLVED
Go to solution
Highlighted
TurboMan
Member

How to find the workflow steps in which the environment is used?

Hi,

 

I am trying to delete an environment but fails with "environment cannot be deleted it is used on a workflow step".

I don't wanna go through all workflow steps because there are thousands.

I wonder if there is way of finding out the environmet variable is used in which workflow?

 

Regards

TM

2 REPLIES
Celil
Esteemed Contributor

Re: How to find the workflow steps in which the environment is used?

Hi TM,

 

There is a relation betwwen environment definitions and workflows ;

KENV_ENVIRONMENTS <-> KWFL_WORKFLOW_STEPS
source_environment_id = environment_id
dest_environment_id = environment_id

 

Please find more details at enclosed screenshot.

 

PS: Please inform us if it useful for u.

Celil

IT Governance Professional
& PPM Solution Architect
Akif Saburi
Regular Collector
Solution

Re: How to find the workflow steps in which the environment is used?

Hi,

 

Run the below script in PPM Database.

 

select ww.workflow_name,
wws.step_name,
ee.environment_name, ee.description
from KENV_ENVIRONMENTS ee,
KWFL_WORKFLOWS ww,
KWFL_WORKFLOW_STEPS wws
where ( wws.source_environment_id != 0 or wws.dest_environment_id != 0 )
and wws.workflow_id = ww.workflow_id
and ( wws.source_environment_id = ee.environment_id or
wws.dest_environment_id = ee.environment_id )
and ee.environment_name = 'MYENVIRONMENT'
order by ee.environment_name


Replace "MYENVIRONMENT" by the environment name which you are trying to delete.

 

Hope it helps.

 

Regards,

Akif

//Add this to "OnDomLoad" event