IT Process Automation

 View Only
  • 1.  checkCalendarDate function

    Posted Jul 28, 2019 06:42 PM
    Edited by Lindsay Estabrooks Jul 29, 2019 08:31 AM
    I am getting an error when using this function in an operator. Variables being used are defined in the process dataset:

    checkDate (Date)
    bWorkDay (Boolean)
    workCalendar (String) path to a calendar object
    holidayCalendar (String) path to a calendar object

    Here is the code snippet and error shown:

      Process.checkDate = now();
      while (!bWorkDay) {
    	Process.checkDate = adjustDate(checkDate, 1, "d");
    	Process.bWorkDay = checkCalendarDate(checkDate, workCalendar, holidayCalendar, 0, 0, 0);
    	if (!bWorkDay) {
    	  delayHours += 24;
    	}
      }
    
     -- Can't find method com.optinuity.c2o.bean.C2OLibrary.checkCalDate(java.util.Date,string,string,number,number,number). (c2ojslib.js#1)

    PAM version is 4.3.03

    ------------------------------
    Lindsay Estabrooks
    Principal Consultant
    IT-EDU Consultants
    ------------------------------


  • 2.  RE: checkCalendarDate function

    Posted Aug 01, 2019 10:11 PM

    I have figured out why the function was returning an error. I looked again at the documentation (https://docops.ca.com/ca-process-automation/04-3-04/en/reference/operators-reference/system-functions/checkcalendardate-function) and found a discrepancy. The doc says that the openDays parameter of the function should be an integer value. The example given shows a Boolean value (false). Once I changed the openDays parameter from 0 to false then the function worked.



    ------------------------------
    Lindsay Estabrooks
    Principal Consultant
    IT-EDU Consultants
    ------------------------------