I want to set time for the
Time of Day
in schedule reporting task to 10.30.But we can set only hours in the pega UI.
can anyone help me with setting time with minutes.
Thanks.
Not out of the box. You would need to change a property named pyMinimumDateTimeForProcessing
, and that can be done using a Data Transform (or an Activity). Here's an excellent summary how scheduled reports work: https://myknowpega.com/2019/12/12/schedule-reports-pega/. You can see where aforementioned property resides at the following heading:
- Pega creates a new queue instance for the agent
pyScheduleTaskInfo
is the Flow Action
which is called on schedule report. Which is not a Final
rule. That means you can modify this flow action.
If you look into 16th step of post processing Activity pzPostProcess
(a 'Final' activity), you will find below lines.
int hour = myStepPage.getInteger(".pyTimeOfDay");
int minute= myStepPage.getInteger(".pyMinuteOfHour");
int second = myStepPage.getInteger(".pySecondOfMinute");
But, in the flow action section
pyTaskScheduling
, only pyTimeofDay
is used. This is not a final
section. Hence, you can save as it your ruleset.
pyMinuteOfHour
and pySecondOfMinute
are not used in the section. And these properties are no longer present in class Embed-ScheduledTask-Scheduling
which is the primary class for section pyTaskScheduling
. Hence you can not use these properties in section pyTaskScheduling
.
You need to first save as section pyTaskScheduling
(with same name and same class) in your ruleset.
Then add new properties just after hour
dropdown to select minutes and seconds.
Save as activity pzPostProcess
in your ruleset with other name and same class(since its final rule, name should be different) and modify below two lines of Java step 16.
int minute= myStepPage.getInteger(".pyMinuteOfHour"); // instead of pyMinuteofHour, add your property
int second = myStepPage.getInteger(".pySecondOfMinute"); // instead of pySecondOfMinute, add your property
Now save as flowaction pyScheduleTaskInfo
in your ruleset(with same name and same class) and replace the post processing activity with your activity.
I have not tried this solution but you can try it.