Aggregate does not find record, but when adding test value it does find record

Hi,

I have the following problem. Part of an automatic activity in a BPT process I query an entity on its primary ID using an aggregate. When I debug this the result is an empty list record not found.

When I then open the aggregate and provide the save id as test value it does show the data.

I do not understand this behaviour, does anybody have an explanation for this behaviour?

Regards,

Daniel

Is your query using session variables? Or your tables Tenant-dependent?

Remember BPT is assynchronous and it is not aware of Session variable or Tenant identifier.

Hi Daniël Kuhlmann,

I agree with Joao melo, It might be a tenant-dependant issue. You might not be getting Data because at the time the application runs it is pointing to a particular tenant which doesn't have data for sam entity in your case.You can cross check the same by configuring the tenant in service-studio & testing the Aggregate.

Anyways I too face the same issue today where I was using the User Entity & while I was testing the filter from Aggregate Wizard it was returning me records, but when I was using the same with the application it was returning 0 records for same Input.

Then I used  UserMT entity which allows us to use tenant-Id across usage & filter.

I would recommend you to check by using tenant-Identifier with your aggregate, you can do it by :

1- Double Click on Entity under Data Section

2- Goto Advanced

3- check the "Show Tenant Identifier"


Note: By checking the "Show Tenant Identifier" you lose the automatic parts of the Outsystems that insert that value on create and filter on aggregates.

Hope it helps,

Assif