Set Mandatory Variable Validation using PD

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.

  • 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?

  • 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

  • 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 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.

  • 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.
  • 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.
  • Verified Answer

    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?