on 04-20-2011 6:03 AM
Hello Experts,
My objective is to validate some field when the Rfx moves to "Closed for Response" stage. If the field is null then system should throw an error while trying to move the Rfx to this phase .
I tried to do with the Document Lifecycle event option and target-> POST PHASE. But not able to retrieve the next phase name while doing the phase transition.
For Example- I am moving the Rfx from "Open for Response" to "Closed for Response" phase. then my objective is -
if current phase is "Open for Response" and next phase is "Closed for Response" and the field value is null , system should throw an error.
Can anyone help me with code ?
Regards
Sudipta
Sudipta,
You are almost there.
As per you requirement
If the field is null then system should throw an error while trying to move the Rfx to this phase
.
This means the script should be written as Pre-Phase and not Post Phase.
Post phase scripts execute when you have already made the tranistion to a particular phase. In this case there will only be a valid "previousPhase" and the value for "nextPhase" will be null. This is the reason you are not able to retrieve the next phase name.
Just copy the same script definition to Pre-Phase target and things should work fine.
Do let us know how it goes.
Thanks
Devesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Devesh for reply
As understood by you , my requirement is a bit different .
My requiement is->
System should throw an error while trying to move from "Open for Response" to "Closed for Response phase and the field is null.
I have other phases also. Now as told by you , if I put my script in PRE_PHASE , the system will also throw error at the time of transition to other phases also. But I need for the transition between this two phases only. So for this I need to retrieve the current and next phase .
Am I right ?
Regards
Sudipta
Hi Sudipta,
You have to write your script in PRE_PHASE only.
You need to check what is the phase the document is advancing to
there is a std varaible for that OTHER_PHASE.
so you need to put a check like
IF other_phase = ""Closed for Response" (technical name/internal id of the phase)
{
put your validation code here
}
Hope this will help to sort your query.
Regards,
Vaibhav
Sudipta,
Apart from what Vaibhav correctly told, the current phase can be accessed using the system set variable current_phase.
So your logic should be something like
if (("Open for Response").equals(current_phase) @and ("Closed for Response").equals(other_phase))
{
//put your null checks here and throw the required error
}
Hope this helps!!
Thanks
Devesh
Hi Experts,
I'm actually on wave 7 on Demand and when I'm changing RFX phase my script is not triggered.
here are the details:
Class:RFx(900)
Instance Type:Any
Document Type:Any
Target:Pre Phase Change
Script:
log = Logger.createLogMessage(session);
log.setLogMessage("START PRE PHASE SCRIPT");
Logger.info(log);
but when I'm changing a phase and the checking the log, there is nothing in the log...
Can someone help me?
Hi Sudipta,
I have facing same issue. Did you find any solution for that?
In my case I have to stop the user from moving RFx to Award phase.
Thanks
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.