This error generally appears when:
- An OperationException is thrown inside the procedure
- The exception is caught using a catch block
- Updates are performed inside the catch block using the ProcedureContext
When an exception is thrown during a procedure execution, the procedure is canceled and its execution is stopped, to ensure the transactional aspect of procedures.
It is
not supported to continue using the ProcedureContext in a catch block after an exception has been thrown during the procedure execution.
In general, when exceptions are catched, they should be always raised in the stack:
try{
procedureContext.doCreateOccurrence(valueContextForCreate, myTable);
}
catch (OperationException ex)
{
throw new RuntimeException(ex);
}