Tag Archives: curam

CĂșram Enterprise Framework

Recursive SQL for tree like structures

The `WITH` clause in SQL assuming it is supported by your database allows the database to perform lookups against hierarchical structure using what is known as a Common Table Expression (CTE). A common use case for this would be the `LOCATION` table in Curam where you’d want to determine if a given location is inside another location or to provide a list of locations that are underneath a higher level location.
Continue reading Recursive SQL for tree like structures

Temporal Evidence Primer

This is a short primer on Curam Temporal Evidence Framework. First off, here are the flags that it is used incorrectly:

  • Treating it like version control.
  • Running business validations on save
  • Start dates/end dates as part of your evidence
  • Assuming that the active data is since the beginning of case holds true since the beginning of the case.
  • Manipulation of evidence descriptors
  • A single evidence record has bazillions of fields.
  • Text/comment fields in the evidence.

Continue reading Temporal Evidence Primer

Arbitrary SQL during unit tests

When writing unit tests using Curam, it could be useful to inject some SQL to perform read and writes to the database, especially since the unit test would roll back database changes after the test. The actual JDBC `java.sql.Connection` connection object used during the test, can be retrieved using `curam.util.transaction.TransactionInfo` `.getInfo().getInfoConnection()` and operations against the database during the transaction can be performed on it.
Continue reading Arbitrary SQL during unit tests