cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

Limit Promotion Request Select Participants to Only One User???

TomU
23-Emerald IV

Limit Promotion Request Select Participants to Only One User???

When creating a new promotion request, is there any way to limit the select participants step so it only allows one user to be selected per role?

1 REPLY 1
Mandar
5-Regular Member
(To:TomU)

Hello TomU,
Currently PDMLink doesn't provide any validations for selection of participants in promotion process except some site level preferences included in OOTB implementation.
You can find those under site->utilities->preference management.
In order to restrict promotion request creator to select only one user, you will have to validate the submitted form result. You can extend the validator from CreatePromotionRequestValidator and override the method public UIValidationResult validateFormSubmission(
UIValidationKey validationKey, UIValidationCriteria criteria,
Locale locale). Using criteria.getChecked you will get a map for users selected.
Deploy the validator by overriding action entry for workflowParticipantsStep in promotion requests action and putting afterVK entry for the same. Register the validator in site.xconf with the same selector you used in afterVK.
But the above approach is not reliable and may give unwanted results in some releases.
Another approach is you can override the FormDelegate used for this step. You can find this FormDelegate in same entry i mentioned above for workflowParticipantsStep in promotion requests action. You can call super.getParticipantsToProcess to get map of participants selected.
Top Tags