Direct link to fix
APAR status
Closed as program error.
Error description
The TWDate.getTime() JavaScript API returns an integer representing time in seconds while the TWDate.setTime(int timeInSeconds) JavaScript API takes in an integer value representing the time in seconds. When you use these APIs together and the date exceeds 2038-01-21, an integer overflow occurs. PRODUCTS AFFECTED IBM Business Automation Workflow
Local fix
User may use the following scripts as a workaround. tw.local.date1 = new TWDate("2099-01-21 00:00:00.00.00"); tw.local.date2 = new TWDate(); log.info("original date1=" + tw.local.date1 + ", date2=" + tw.local.date2); function copyDate(oldDate) { var newDate = new TWDate(); var year = oldDate.getFullYear(); var month = oldDate.getMonth(); var date = oldDate.getDate(); var hours = oldDate.getHours(); var min = oldDate.getMinutes(); var sec = oldDate.getSeconds(); var ms = oldDate.getMilliseconds(); var day = oldDate.getDay(); newDate.setFullYear(year) newDate.setMonth(month); newDate.setDate(date); newDate.setHours(hours); newDate.setMinutes(min); newDate.setSeconds(sec); newDate.setMilliseconds(ms); newDate.setDay(day); return newDate; } tw.local.date2 = copyDate(tw.local.date1); log.info("date1=" + tw.local.date1 + ", date2=" + tw.local.date2);
Problem summary
The Rhino JavaScript runtime engine doesn't support the long data type.
Problem conclusion
A fix is available or will be available that introduces new JavaScript APIs: TWDate.getTimeString() and TWDate.setTimeFromString(String timeString).
Temporary fix
Comments
APAR Information
APAR number
JR62495
Reported component name
BPM
Reported component ID
5737A5700
Reported release
K00
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2020-06-30
Closed date
2020-07-10
Last modified date
2020-07-10
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
BUS AUTO WORKFL
Fixed component ID
5737H4100
Applicable component levels
[{"Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS8JB4","label":"IBM Business Automation Workflow"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"20.0.0.1"}]
Document Information
Modified date:
14 December 2020