well, I'd first try to see what field violates the constraint. is P on a primary key or something? Then see what value is inserted and trace back to where that field is filled.
yes P stands for primary key. The value for this key should be generated by the sequence. Is there a way to log, what parameters are bound in the sql-query?
yes, jbpm uses hibernate, so look there for the debug options