Discussion
HCL Technologies B.V.
NL
Last activity: 24 Jul 2015 9:45 EDT
Possible way to customize the Activity that runs behind the validate rule .
Hi ,
Incase of validate rule execution, an OOTB Activity rule can be observed witihin tracer at run time . Is there any possible way to customize the Activity that runs behind the validate rule ? Please help me out .
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Areteans Technology
IN
Suradipk,
The validate rule iteself is shown in tracer as an activity. The design of validate rule defines what you see in tracer. May be post your requirement, so that we better understand the problem.
Thanks,
Ashok
HCL Technologies B.V.
NL
Hi Ashok ,
Thanks for enlightening the matter . Please find the requirement below :
A date validation (selection of older date (MM-DD-YYYY) is prohibited) has already been applied in a Date Time control within a certain application. Whenever I am going to proceed with the date picker with manual writing of the past date in a very format (YYYY-MM-DD) , after clicking on submit option - the validate rule is not showing the error message on that screen – instead it is showing the following error on the next screen :
** Incorrect Date Format
Completion Due Date:2011-05-06 is not a valid date/time value
Now, while Tracing this issue - this message is being seen in the Property-Set-Message step of the OOTB activity of the validate rule . Also another Java step is failing stating with the same error message of performFlowAction activity within Tracer . This is the exact scenario .
Services Australia
AU
Hi SuradipK
Can you specify the name of the OOTB activity, where this property-set-message is happening, is the OOTB activity final?
Vamshi
Areteans Technology
IN
A date validation (selection of older date (MM-DD-YYYY) is prohibited) has already been applied in a Date Time control within a certain application - Can you explain this ? did you have a edit validate or custom control which does this validation?
As per the error message, I guess the date storage in the property is malfunctioned. When you need to compare dates, please use functions instead of changing the date to string or numbers and then comparing.
Thanks,
Ashok
HCL Technologies B.V.
NL
A validate rule has been used , where "the date-time should be in future " code has been applied . This validate rule is working fine if the user selects an older date from date picker (MM/DD/YYYY format) . But the problem occurs when user is writing the date manually (in YYYY-MM-DD ) instead of selecting it from the date picker .
Areteans Technology
IN
Suradipk, is YYYY-MM-DD format handled in your control to convert into native pega date value in clipboard. Are you using ootb control or custom control ?
Thanks,
Ashok
HCL Technologies B.V.
NL
Hi Ashok ,
I have used the OOTB control here (datetime) . Also tried with a custom control to manage the requirement , where all the date format will be parsed into "MM/DD/YYYY" format . But it has not worked . However I have tried with your suggested approach also - using a function with the below code :
String str_date = aDate.substring(0,8);
java.util.Date date ;
java.text.DateFormat formatter = new java.text.SimpleDateFormat("yyyyMMdd");
try{
date = (Date)formatter.parse(str_date);
String fDate = formatter.format(date);
tools.appendString(fDate.substring(4,6)+"/"+fDate.substring(6,8)+"/"+fDate.substring(0,4));
} catch (java.text.ParseException e){
oLog.error("Exception :"+e);}
TalkTalk Technologies
GB
Dont define tools page in PublicAPI. If you do it that way, compiler tries to find the method getActiveValue() in that interface. This method is present in StreamBuilerToolKit interface extending PublicAPI.
In the above thread do you mean Rule-Obj-Validation rule?