Hi I have written this logic on execute script picker at the end of the process so the the updated map will be given to from.
import java.util.map;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
Map<String > reportedmap =patExecContext.getProcessDataMapValue(" /process_data/outTitleSearchInfo ") ;
- System.out.println("reportingMap : " + reportedmap);
if( ! reportingmap.isEmpty()) {
do {
String catalog = (String) reportingmap.get(3);
String streetDate = (String) reportingmap.get(7); // where the street value is store in the entry of map
System.out.println(streetDate);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date date = new Date();
Date date1 = sdf.parse(steetDate);
Date date2 = sdf.parse(date);
System.out.println(sdf.format(date1));
System.out.println(sdf.format(date2));
if(date1.after(date2))
{
reportmap.remove(catalog);
}
}while(reportedmap.hasNext());
}
patExecContext.setProcessDataMapValue(" /process_data/outTitleSearchInfo ", reportmap);
But this is not executing .Let me know where i am going wrong.
Thanks ,
Bharathi.