CALL Postgres PROCEDURE from business process

Hi community,

is it possible to call a procedure inside a script block in a business process ?

A postgres function can't contains commit statements.
A postgres procedure can contains commit statements.

I need to call a postgres procedure.

Like 0



Hi Stefano,

This is how we call postgres function with parameter from process script:

Guid usrRecordId = Get<Guid>("UsrRecordId");
StoredProcedure storedProcedure = new StoredProcedure(UserConnection, "UsrSetOpportunityRights")
    .WithParameter("RecordId", usrRecordId)  as StoredProcedure;

Vladimir Sokolov,

Hi Vladimir,

I know this way, but it doesn't work with procedure.

Stefano Bassoli,




The problem here is that the StoredProcedure class calls not stored procedures, but functions and it's so because of the fact that PostgreSQL supports stored procedures starting from 11 version. Currently there is no way to call a PostgreSQL procedure from a business process.


Best regards,

As I understand, function is performed as one transaction. And if error appears, rollback will cancel all actions.

Show all comments