-2

I have an issue with the Data set - Execution server. I am using PostgreSQL as DB. I want to calculate the difference between the two dates column for my report. The query I have used in DB is:

Query 1:

SELECT end_date as end,
               start_date as start,
               processid as pidd,
              AGE(end_date, start_date) as duration
  from processinstancelog

Query 2:

select end_date,start_date,processid, end_date - start_date as
duration from processinstancelog

Both queries reflecting the correct expected result in Postgres DB. But when I am using the same queries in the Data set>Execution server it's not showing the "duration" column.

Question

Can anyone please advise what is issue why the data set is not showing the duration column?

Many Thanks

Akzy
  • 1,817
  • 1
  • 7
  • 19

2 Answers2

0

Both queries reflecting the correct expected result in Postgres DB. But when I am using the same queries in the Data set>Execution server it's not showing the "duration" column.

How do you use in the query in the execution server? Are you implementing advance query functionality? If yes can you please share the exact steps you are following and your advance query definition to review.

Akzy
  • 1,817
  • 1
  • 7
  • 19
  • No, I am not using the advance query functionality?- I am using a query in the execution server to create new Data set. **Business central Setting > data set > New data set> Execution server (here i am using query to create data set)** – Akzy Apr 14 '21 at 08:28
  • Hi @ChavanAbhijeet - Can you please have a look on it, i will be very grateful to you for this. – Akzy Apr 18 '21 at 07:56
  • Hi @ChavanAbhijeet or anyone can please have a look at it, I will be very thankful – Akzy Apr 21 '21 at 12:35
  • 1
    Hi, you are implementing advance query only. Can yo try below SQL and share your result with us : SELECT end_date as end, start_date as start, processId as pidd, AGE(end_date, start_date) as duration from ProcessInstanceLog. You were using incorrect coulmn and table name. Names are case sensetive. – Chavan Abhijeet Apr 21 '21 at 16:42
  • Hi this query is working in DB but not in business center advance query tool,getting error java.lang.RuntimeException:org.kie.server.api.exception.KieServicesHttpException:Unexpected HTTP response code when requesting URI 'http://localhost:8080/kie-server/services/rest/server/queries/definitions/cab8c9d9-5ae7-4794-9b3f-604392352e2b/filtered-data?mapper=RawList&page=0&pageSize=10'! Error code: 400, message: "The request could not be understood by the server due to malformed syntax – Akzy Apr 25 '21 at 07:31
  • Also when I am changing the query like 'SELECT end_date as endT, start_date as startT, processId as pidd, AGE(end_date, start_date) as duration' from ProcessInstanceLog it’s working in business center but not getting the duration column there. – Akzy Apr 25 '21 at 07:31
0

Answer, I deleted the old setup and installed the new setup for JBPM and data set start appearing

Akzy
  • 1,817
  • 1
  • 7
  • 19