IBM Support

Incorrect duration format in the Business Calendar for WebSphere Process Server (WPS) causes errors in Human Task escalation

Troubleshooting


Problem

The human task duration property on an escalation must be formatted correctly. An incorrect format causes a generic java.lang.StringIndexOutOfBoundsException exception because the UserCalendar lookup cannot parse the date value.

Symptom

If you have created a Business Calendar, you see the following entries in the systemout.log file during human tasks:

CNTR0020E: EJB threw an unexpected (non-declared) exception during      
invocation of method "validate" on bean                                  
"BeanId(BusinessCalendar#BusinessCalendarEJB.jar#BusinessCalendar,      
null)". Exception data: java.lang.StringIndexOutOfBoundsException at      
java.lang.String.charAt(String.java:415) at                              
com.ibm.wbiserver.calendar.entities.Duration.parseDate(Duration.java:71)
at com.ibm.wbiserver.calendar.entities.Duration.<init>(Duration.java:44)
at                                                                      
com.ibm.wbiserver.calendar.computing.BizCalendarCalculator.applyDelta(Bi
zCalendarCalculator.java:46)
.
.
.                                                  
----------------------------------------------------------              

CNTR0020E: EJB threw an unexpected (non-declared) exception during      
invocation of method "createScheduledItem" on bean                      
"BeanId(TaskContainer_widNode_server1#taskejb.jar#TaskServiceManagerBean
, null)". Exception data: com.ibm.task.core.SchedulerError: CWTKE0001E:
An error occurred when setting up the                                  
scheduler.com.ibm.websphere.scheduler.UserCalendarInvalid: SCHD0013E:  
The following error occurred while accessing the UserCalendar with JNDI
Name com/ibm/wbiserver/calendar/BusinessCalendarHome and specifier      
<customer specific> : SCHD0139E:  Unable to invoke the UserCalendar EJB:

Cause

The duration format that is used by Business Calendar is a subset of the XML schema
xs:duration data type. The format that is accepted by Business Calendar is PnDTnHnMnS, where:

- P is the start of the duration
- nD is the number of days
- T is the start of a time section
- nH is the number of hours
- nM is the number of minutes
- nS is the number of seconds

The P character is always required. Days, hours, minutes, and seconds are optional, but at least one of them must be specified for a valid duration.

Days, hours, minutes, and seconds, if they are specified, must occur in the proper order. If one or more hours, minutes, or seconds is specified, the T character must occur before it.

Resolving The Problem

Specify the duration value using the correct format:

  • Examples of valid duration values:
    P1DT1H1M1S
    P1D
    PT1H
    PT1M
    PT1S
    P1DT1S
    P1DT1H1S
  • Examples of incorrect duration values:
    -P1D
    1Y1M1D
    PT1H1M1.1S

To specify 2 minutes, use the format PT2M.

[{"Product":{"code":"SSQH9M","label":"WebSphere Process Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Human Task Manager","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"}],"Version":"7.0.0.5;7.0.0.4;7.0.0.3;7.0.0.2;7.0.0.1;7.0;6.1.2.2;6.1.2.1;6.1.2;6.1.0.3;6.1.0.2;6.1.0.1;6.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

WPS

Document Information

Modified date:
15 June 2018

UID

swg21376144