cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
335
Views
1
Helpful
0
Replies

UCCX 12.5 - trying to check Previous Day on a script XML Document Data

We have one UCCX application in our environment that uses different time of day to forward calls to Dr. on-call cellphones. One of these time periods is 7pm-1am. The problem I am having is at midnight, the remainder of the 7pm-1am time is now being checked against the new day instead of against the previous day's time period, which is a problem because we set the on-call phones to these timeframes and the wrong day is now being checked for this one hour at night.
 
What I am looking for is a Java command to check against PREVIOUS DAY to hit this one hour overlap schedule.  I have tried using various Java solutions found online but none work correctly.  My only other solution is to completely rework our script and add a fourth entry for this one hour period which will require more work from our admin.  The time periods are input into an XML Document and accessed with the Get XML Document Data step.
 
UCCX 12.5.1.11003-511
 
The SET command to determine date: set strNow = { java.text.SimpleDateFormat dateFormatTimeZoneSpecific = new java.text.SimpleDateFormat("yyyy-MM-dd"); dateFormatTimeZoneSpecific.setTimeZone(TimeZone.getTimeZone(TZ)); return dateFormatTimeZoneSpecific.format(new Date()); }
 
Our Get XML Document Data step: "/descendant::organization /child::onCalls /child::onCall[attribute::startDate='"+strNow+"']/@Primary_3"
-----
 
To anyone searching this issue, the solution was this:
 
set strYesterday ={ java.text.SimpleDateFormat dateFormatTimeZoneSpecific = new java.text.SimpleDateFormat("yyyy-MM-dd"); dateFormatTimeZoneSpecific.setTimeZone(TimeZone.getTimeZone(TZ)); return dateFormatTimeZoneSpecific.format(new Date().getTime()-(86400*1000)); }
 
And then adjust the "/descendant::organization /child::onCalls /child::onCall[attribute::startDate='"+strNow+"']/@Primary_3" to show "/descendant::organization /child::onCalls /child::onCall[attribute::startDate='"+strYesterday+"']/@Primary_3"
0 Replies 0