Hello Dan,

This is my first email after using the Isis for more than a year. I've been
working with David Tildesley and we both loved the framework. Thank you for
the great work!!!

David has urged me to drop you an email to discuss an "issue" we found
yesterday, which may relate to the audit function :0)

*This is what we did:*

1. Start a new transaction in Isis (not from the UI, but in a batch job).

2. Create a new Employment (entity)
-- e.g. employments.newEmployment(...)

3. Create a new PositionAssignment (entity) with the Employment created
in step 2.
-- e.g. positionAssignments.newPositionAssignment(employment, ...)

4. Assign the PositionAssignment to Employment as currentPositionAssignment
-- e.g. employment.setCurrentPositionAssignment(positionAssignment))

5. End the transaction.

6. Expecting having an audit entry created in database for the position
assignment change in employment.

**Note: The Employment holds a reference to a PositionAssignment and the
PositionAssignment also holds a reference to the Employment.

*End Result:*

All entities including their relationships had been persisted correctly.
However, the auditing for employment position assignment change, was not
always triggered and persisted.

I've done a few tests around this. What I've noticed is that if I run this
task in (Eclipse) debug mode, and add a break-point in
IsisTransaction.enlistUpdating method, the audit entry can be saved without
any problem. However, if running this without any pause, there is no
guarantee the audit entry will be logged.

Not sure what actually caused this. Wonder if you guys have encountered
this before. Can you please advise?

Many thanks in advance.

Best Regards,


Michael

Reply via email to