Error connector postgres

1
0
-1

I have a text field that I inform a number, this field has a validator that checks if the protocol there . are two forms within an activity . The first form we inform the protocol . The second has a table with a connector database . Within this connector has a variable of type text that keeps the number that was entered in the first form .

My query is : SELECT "adm_pgeatv120002"."assistidos"."nome", "adm_pgeatv120002"."assistidos"."cpf", "adm_portal_digital"."processos"."numero" FROM "adm_pgeatv120002"."assistidos" JOIN "adm_portal_digital"."processos" ON "adm_pgeatv120002"."assistidos"."processo_eid" = "adm_portal_digital"."processos"."id" WHERE "adm_portal_digital"."processos"."numero" = '${protocoloNumero}' AND "adm_pgeatv120002"."assistidos"."ativo_processo" = "true" AND "adm_pgeatv120002"."assistidos"."tipo_assistido" = 'Requerente' ORDER BY "adm_pgeatv120002"."assistidos"."nome", "adm_pgeatv120002"."assistidos"."cpf", "adm_portal_digital"."processos"."numero"

Run to the following error occurs: Error while executing the connector database-postgresql92 version 1.0.0

'${protocoloNumero}' is the name of my variable that stores the number that the user types in the text field.

The connector does not recognize and give the following error: Error while executing the connector database postgresql92-version 1.0.0

When I put a fixed number, it works. Recalling that the connector is created in the widget inside a table.

Please help me...

Bonita BPM 6.2.3 Postgres 9.2

Comments

Submitted by ttoine on Wed, 05/28/2014 - 16:58

hello, could you please edit your question and add information about the version of Bonita BPM, and more ?

Submitted by kekamayara87 on Thu, 05/29/2014 - 14:40

Please help me...

Submitted by aCordier on Thu, 05/29/2014 - 15:29

Notice that ${...} is not required here

Submitted by aCordier on Thu, 05/29/2014 - 15:30

Turned to and anwser

1 answer

1
0
-1

Hello,

One way to solve this issue is to enter groovy editor (switch editor may be required depending on your version), name the script if you're using a v6.*** and then return your request as a string concatenated to your variable.

eg:

def reqBuilder = new StringBuilder()
reqBuilder.append("UPDATE myTable SET myCol = '")
reqBuilder.append(myBonitaVariable)
reqBuilder.append("' WHERE myCol = 'oldValueToUpdate';")
reqBuilder.toString()
Notifications