Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..
209 views

Set Mandatory Variable Validation using PD

Jump to solution

Experts,

I am trying to validate "No of open tasks when the user tries to move to next phase'.

Env is SMv9.40 PD.

On the WorkFlow phase exit, i have added the Ruleset as shown in the attached.

I am trying to validate the thread variable to restrict the user was moving to the next phase, if any open tasks are available.

I am unable to do so with the way I have configured (attached screenshot).

Could some one please guide me.

thx

dev.

I am Listening..
0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Set Mandatory Variable Validation using PD

Jump to solution

You're right, my approach does not give user a hint that there are open tasks to be closed.

Only way to fully achieve a functionality you want (that I can imagine) is indeed to use mandatory checks. What you can do, is to use a "dummy" field instead of variable. I mean, you could

1) Find a field (varchar, number, boolean) in a table you know you don't use (typically, value is null). There should be plenty of those available.

2) Use that field to hold information if there are open tasks or not

3) Create a mandatory check pointing to that field

4) Clean up the field after the phase transition is completed

Have you considered to implement an automatic change phase transition, when open tasks per phase are closed? Or is a manual transition a mandatory requirement?

---
Moving on, this account is no longer active. Best regards, Kelalek
- So Long, and Thanks for All the Fish

View solution in original post

0 Likes
7 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Set Mandatory Variable Validation using PD

Jump to solution

Hello Brav0,

hope you are doing well.

I just wanted to let you that I am testing and making an investigation about your concern, as soon as I have an update I will let you know.

Based on that, I believe that for designe, SM allow change phase with open tasks, please let me confirm this information. I understand your porpuse is no open tasks in the process, correct?

Carlos Villalobos R
Customer Support Engineer
If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Set Mandatory Variable Validation using PD

Jump to solution

Yes Carlos.

 

I am Listening..
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Set Mandatory Variable Validation using PD

Jump to solution

Hi, Can you please share if your issue is resolved ? If yes then you can post the answer here, it ll help others too. If not then you can log a case with HP Software support or Professional Services for customization requests.
Regards,
HPE Software Support

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Set Mandatory Variable Validation using PD

Jump to solution
yes Initially I used the ruletype as 'Mandatory Variables' in the rule set, which didn't work out for me. Instead I used Pop up Message Box and its working. attached is the screenshot. If anyone is having a working example on how to use the mandatory variable, please share.
I am Listening..
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Set Mandatory Variable Validation using PD

Jump to solution

I am not aware that there's a possibility to have mandatory variables.

But if your intention is to block movement from phase to another, you could use the "Condition" in Transition's Details-panel. It accepts variables and you should be able to hide "Next phase" buttons and therefore no need for mandatory checks are needed.

Honestly speaking, I've to say I'd avoid using variables. You've to make sure you clean those after initialisation. Easily causes headaches, because tracking variables in SM is a bit difficult. Instead I'd prefer using a JS function, which you call by using a jscall RAD function.

I've used a following condition to enable automatic movement from phase 1 to phase 3.  If certain IP(s) are found from description, the phase #2 is skipped.

jscall("adminIPCheck.searchStringFromArray",description in $file,"mysearchkey")=false

EDIT: Stripped off the rule engine's remarks.

---
Moving on, this account is no longer active. Best regards, Kelalek
- So Long, and Thanks for All the Fish
0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Set Mandatory Variable Validation using PD

Jump to solution
Thank you for the reply Kelalek2 If I make the next phase button invisible, how would I let know the user with a message that you need to close the related tasks for moving to next phase ?. In my case, I have tasks which are getting open one after the other ( closure of one, creates the next task). I created this ruleset only because the out of the box legacy cm3rcatphase check box function failed to check the open cm3t tasks.
I am Listening..
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Set Mandatory Variable Validation using PD

Jump to solution

You're right, my approach does not give user a hint that there are open tasks to be closed.

Only way to fully achieve a functionality you want (that I can imagine) is indeed to use mandatory checks. What you can do, is to use a "dummy" field instead of variable. I mean, you could

1) Find a field (varchar, number, boolean) in a table you know you don't use (typically, value is null). There should be plenty of those available.

2) Use that field to hold information if there are open tasks or not

3) Create a mandatory check pointing to that field

4) Clean up the field after the phase transition is completed

Have you considered to implement an automatic change phase transition, when open tasks per phase are closed? Or is a manual transition a mandatory requirement?

---
Moving on, this account is no longer active. Best regards, Kelalek
- So Long, and Thanks for All the Fish

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.