Skip to main content
1-Visitor
August 9, 2013
Question

To check whether there are approvers & reviewers selected befor a promotion is created

  • August 9, 2013
  • 5 replies
  • 2095 views

Hi,


I need to check whether the APPROVERS & REVIEWRS are selected before a promotion request is created. I am trying to write an event listener for this. I tried the PRE_STORE, POST_STORE, INSERT, PRE_INSERT events on promotionNotice object. But however, I am not able to get the members selected in the listener code. It is always retuning empty lists. Is there any other specific events on Promotion objects to listen to ?

5 replies

1-Visitor
August 9, 2013

Instead of event listener, have you thought about adding conditional robot (in promotion workflow) that checks for selected participant(s) for APPROVERS & REVIEWRS roles? Following post would help.


http://portal.ptcuser.org/p/fo/st/post=119216&anc=p119216#p119216

1-Visitor
August 10, 2013
Hi Yogesh,
Having the check in conditional robot would mean that the workflow is
triggered. What I want to achieve is that till approvers, reviewers are
selected, it should not allow to create a promotion request. That is why I
went for listener.

Praseeth M
1-Visitor
August 13, 2013

Hi,


You can try with validators.


Use beforeVK call @create promotion action.xml


MKR

1-Visitor
August 13, 2013
Thanks guys for the answers...I achieved this using a delegate class for
the wizard step. Turned out to be pretty easy.

Praseeth M
1-Visitor
August 15, 2015

Hello Praseeth,

we have simillar requirement, can you please provide info how did you achieve this,  is it the code goes in postprocess delagte class.

any input is highly appreciated.

Thanks

Sughosh