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?
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).