How Do I Jump states in ClearQuest?

943 views Asked by At

Hi,

I have a requirement, i need to modify a ClearQuest schema. This modification is
done based on the application name(application_name field)in the form. For a particular application an additional approval from a group is required. For rest of the application needs to be eliminated.

enter image description here

Is there any way this can be achieved?

Thanks

2

There are 2 answers

0
AdamSkwersky On

To do this, you would change the access control hook for the Level3Approval action, such that the action is not permitted in the condition in which you want to force Level2Approval first. And also you would have an action hook which does not permit Level2Approval when you want it to use Level3Approval.

When you do that, the only actions you want show up in the drop down menu.

0
Jozef On

Yes, that is possible by changing your Action Level3Approval to type RECORD_SCRIPT_ALIAS and pointing it to a Record Script. It should have both the Level1Approval and Level2Approval states as Source states.

Put something like the following in the Record Script:

If GetFieldValue("AppName").GetValue = "A" Then
    EditEntity "Level2Approval"
Else
    EditEntity "Level3Approval"
End If
Validate

Depending on the value of AppName, executing Level3Approval will now bring you to the Level2Approval or Level3Approval states.

You could also decide to rename the Level3Approval action to something more generic, because it does not always bring you to the Level3Approval state.