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

Is there a way to check if an object type was used on any package lines?

Highlighted
bzdafro
Collector

Is there a way to check if an object type was used on any package lines?

I have a workflow with serveral object types. One of the object types' needs to perform additional steps (but only after all lines have deployed, and only 1 time) If I use the last line condition, it would work, but only if that object type was the very last line in the package. If I set a token, such as [p.run_manifest]=yes, its set for each pkg.line individually. I would need to run a query to check [p.run_manifest] from all the package.package lines. Is there a way to (1) check the value of all [PKGL.OBJECT_TYPE], or (2) any creative way to use the "last line" condition, and have it know if a particular object type was used (and not cancelled), or use some other token in the condition?

Otherwise, I will just separate the object types into their own workflows.
2 REPLIES
Mohan Raju C
Occasional Contributor

Re: Is there a way to check if an object type was used on any package lines?

Hi,

You can use the object type command to check if the line is last one or not. You can write a script which will login to your DB and query the database to check if this line is last one and use the local variable to store it. Based on that value you can execute your additional steps.

Dynamically create an SQL file with the query and login to the DB and execute that SQL file.

Capture the output of that SQL in a local variable and proceed with your additional steps accordingly.

Let me know if this helps you.

Thanks!
Jim Esler
Honored Contributor

Re: Is there a way to check if an object type was used on any package lines?

Keep in mind that a user can execute package lines in any order and at any time they want to and all lines do not need to be executed at any workflow step. Maybe you have well disciplined users, but that subject usually brings the term "herding cats" to mind.
//Add this to "OnDomLoad" event