Error Using USER TASK - "ADD BUSINESS DAYS" IN POSTGRESS

Hi,

 

I'm calculating the response and resolution date in the case through a business process using the "Add Business Days" user task but is not working, it appears the error:

I think this happen because is not compatible with postgress sql.  Do you know if there is another user task or feature I can use to perform this calculation?

 

This is my process:

 

Thank you,  

 

Claudia.

Like 0

Like

3 comments

If the end result you're after is to add days to a date, you can use a formula such as:

[#Case.TheDateField#].AddDays(3)

Note, the [#Case.TheDateField#] would be the date fields read in the process. the important part is the .AddDays(3) which would add 3 days.

Ryan

Hello,

 

The problem here is that this user task is written for MSSQL, and there is a query that looks like this:

var selectQuery = new Select(_userConnection) .Column("dow", "Code").As("Code") .From("DayOfWeek").As("dow") .InnerJoin("DayInCalendar").As("dic").On("dow", "Id").IsEqual("dic", "DayOfWeekId") .InnerJoin("DayType").As("dt").On("dic", "DayTypeId").IsEqual("dt", "Id") .Where("dt", "IsWeekend").IsEqual(Column.Parameter(1)) .And("dic", "CalendarId").IsEqual(Column.Parameter(calendarId)) as Select;

 

We are interested in this line: .Where("dt", "IsWeekend").IsEqual(Column.Parameter(1))

 

In MSSQL, boolean columns are represented as 0 and 1 (false and true, respectively), whereas in PostgreSQL, they are represented as true and false. To address this issue, there are a few options:

- Avoid using this line of code and find an alternative way to filter the data without relying on the boolean comparison directly.

- Reach out to the addon developer and ask them to make the necessary adjustments to handle the PostgreSQL boolean representation.

- Try searching for a PostgreSQL-specific cast or conversion function that can convert an integer (1 or 0) to a boolean (true or false). 

Ryan Farley,

Thank you, but I need to add only working days.  The user task named  

"Add Business Days" is what I need but the problem is that it only works for MSSQL and not for PostgreSQL. 

 

Claudia.

Show all comments