Support Article
Need to extract all WOs updated yesterday
SA-21528
Summary
BIX extracts are scheduled to run via agents calling the pxExtractDataWithArgs activity and are expected to provide the extract data only for work objects updated during the previous day. Moreover, BIX Agents are not started exactly at 12am.
Error Messages
Not Applicable
Steps to Reproduce
Not applicable
Root Cause
Not applicable
Resolution
This cannot be done out of the box, but a wrapper activity can be created which modifies and passes the parameter values for pxExtractDataWithArgs. This activity will call pxExtractDataWithArgs and use –u and –U parameters to specify the timeframe to pull extract data from. Before that, it will build the date values for the parameters dynamically and calculate the appropriate date values based on the current date. This can be done using the out of the box Pega DateTime utility functions and property-set, like @addToDate() with negative day values.
To account for Daylight Savings Time (DST), the following change can be made:
- Create a local variable (such as "Flag") for the activity that is of type Boolean and start the activity with a java step that performs the following:
Flag = java.util.TimeZone.getDefault().inDaylightTime(new Date());
This should return true if it is currently DST on the system hosting the JVM and false if not. - Configure the Jump condition for the above java step so that if the Boolean is true, it jumps to one specific step (step 2), and if false, a different step (step 3).
- Each of these steps will calculate the appropriate time for the –u parameters, depending on if it is DST or not.
- Configure the jump for the first of these steps (step 2) so it doesn't also perform the calculation for step 3.
Published April 1, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.