Possible way to customize the Activity that runs behind the validate rule .
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 .
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 .
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.
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 .
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 aDate= tools.getActiveValue();
String str_date = aDate.substring(0,8);
java.util.Date date ;
java.text.DateFormat formatter = new java.text.SimpleDateFormat("yyyyMMdd");
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?