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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

To show confirmation popup if user selects him self as "Reviewer" while creating Promotion Request

LB_10619520
4-Participant

To show confirmation popup if user selects him self as "Reviewer" while creating Promotion Request

Version: Windchill 12.1

 

Use Case: When a user creates a Promotion Request in the system and selects themselves as the "Reviewer," the application should trigger a confirmation popup to ensure the action is intentional. This confirmation mechanism is necessary to prevent potential conflicts of interest or unintentional self-selection. The popup will serve as a checkpoint, prompting the user with a message such as, "You have selected yourself as the Reviewer. Are you sure you want to proceed?" This will provide the user an opportunity to reconsider their choice or confirm it before finalizing the request.


Description:

I am customizing the Promotion Request functionality in Windchill and need help implementing a confirmation popup. Specifically, the popup should appear when a user selects themselves as the "Reviewer" during the promotion request creation process.

I referred to this documentation, but it doesn't provide sufficient details for implementing this scenario.

Could someone guide me on how to achieve this? Any references to APIs, workflows, or UI customizations in Windchill that could help would be greatly appreciated.

ACCEPTED SOLUTION

Accepted Solutions

Hi @LB_10619520 

First I would advice to study the customization guide

also check a customization catalog directly in the Windchill

CS60345 - Customization Guide of Windchill PLM

https://serverAdress.com/Windchill/app/#ptc1/componentCatalog/componentCatalog

 

You have several options.

1. Implement own custom validator for the promotion request and verify if the logged user is not in the required role. 

The out of the box PromotionParticipantsFormDelegate is supported and can be extended.

wtCustom-action.xml configuration and change the class to own one. 

<action name="workflowParticipantsStep" required="false" preloadWizardPage="false">
<description>Promote wizard promotion objects step</description>
<command class="com.ptc.windchill.enterprise.maturity.forms.delegates.PromotionParticipantsFormDelegate" windowType="wizard_step"/>
</action>

in the preprocess(NmCommandBean nmCommandBean, List<ObjectBean> objectBeans) get the selected roles and users and check if the role contains the same user. 

here is an example how to set the confirmation message

CS151142 - How to display a confirmation popup at the end of a customized wizard

 

2. You can add a control mechanism in the workflow robot pf the promotion request. in the WF check the participant with user who created the PR and return a task to the creator if the same user is set as a Reviewer/Approver, In that task the user has to change the required role if he selected himself. 

 

PetrH

View solution in original post

2 REPLIES 2

Hi @LB_10619520 

First I would advice to study the customization guide

also check a customization catalog directly in the Windchill

CS60345 - Customization Guide of Windchill PLM

https://serverAdress.com/Windchill/app/#ptc1/componentCatalog/componentCatalog

 

You have several options.

1. Implement own custom validator for the promotion request and verify if the logged user is not in the required role. 

The out of the box PromotionParticipantsFormDelegate is supported and can be extended.

wtCustom-action.xml configuration and change the class to own one. 

<action name="workflowParticipantsStep" required="false" preloadWizardPage="false">
<description>Promote wizard promotion objects step</description>
<command class="com.ptc.windchill.enterprise.maturity.forms.delegates.PromotionParticipantsFormDelegate" windowType="wizard_step"/>
</action>

in the preprocess(NmCommandBean nmCommandBean, List<ObjectBean> objectBeans) get the selected roles and users and check if the role contains the same user. 

here is an example how to set the confirmation message

CS151142 - How to display a confirmation popup at the end of a customized wizard

 

2. You can add a control mechanism in the workflow robot pf the promotion request. in the WF check the participant with user who created the PR and return a task to the creator if the same user is set as a Reviewer/Approver, In that task the user has to change the required role if he selected himself. 

 

PetrH

Thank you @HelesicPetr  ,

 

I could restrict user if him self as "Approver" or "Reviewer".

Step 1 :

<objecttype name="promotionRequest" class="wt.maturity.PromotionNotice" resourceBundle="com.ptc.windchill.enterprise.maturity.promotionRequestActionsRB">
<action name="workflowParticipantsStep" required="false" preloadWizardPage="false">
<description>Promote wizard promotion objects step</description>
<command class="ext.custom.validator.ValidatePromotionParticipants" windowType="wizard_step"/>
</action>
</objecttype>

 

Step 2: By extending PromotionParticipantsFormDelegate  and overriding preProcess to implement the logic.

 

My next target is to implement PROMT_FOR_CONFIRMATION for requirement (to achieve OK & CANCEL buttons)  

Announcements

Top Tags