For some reason my replies don't post...
Here is my reply again:
Hello again,
I'm a bit confused - it doesn't take a lot. When you executed the query above the ID inserted was 5163004, but in the error it says the ID is 5175001:
<column name="ID">5175001</column>
<column name="name">Demanda Teste HMG7</column>
<column name="UNIQUE_NAME">GAPRE001285</column>
Which suggests the query as executed in the script hasn't returned the data that you see when you executed it manually.
In the log file I see this as the error:
Begin Error Information:
Step Action Id: 5048674
Process Instance Id: 6585353
Step Instance Id: 7642951
Error Code: bpm.raw.message
Exception Trace: <?xml version="1.0" encoding="UTF-8"?>
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_idea.xsd">
<Header action="write" externalSource="NIKU" objectType="idea" version="13.2.0.472"/>
<Ideas>
<Idea name="Demanda Teste HMG7" objectID="GAPRE001285">
<CustomInformation>
<ColumnValue name="partition_code">bnb_gapre</ColumnValue>
<ColumnValue name="bnb_notificados_dir">
<Value>1</Value>
<Value>5008001</Value>
<Value>5063832</Value>
<Value>5064892</Value>
<Value>5112006</Value>
<Value>5127001</Value>
</ColumnValue>
<ColumnValue name="bnb_respon_encontrad">true</ColumnValue>
</CustomInformation>
</Idea>
</Ideas>
</NikuDataBus>
End Error Information
Where, as you can see, the values that have come back are not the same as the ones in your manually executed query, and they do indeed contain the value 1 (the admin user).
I'm guessing this is the problem and 1 is not a valid value for the lookup that controls the attribute.
Original Message:
Sent: May 24, 2022 12:15 PM
From: Christiane Aguiar
Subject: Custom script error
Hi Paul,
When I ran the query I got the following return.
We have board groups (with resources) where each investment belongs to one of these groups.
The custom field created is Data Type Multi Valued Lookup - Number linked to the Lookup Resource browse. And it is in this custom field that we try to save the result of that query, but the error I reported earlier occurs.
Do you know how to solve this?
Thanks,
Chris
Original Message:
Sent: May 21, 2022 05:03 AM
From: Paul Schofield
Subject: Custom script error
It looks like the attribute has its values controlled by a lookup. What are the valid values in it?
Also if you execute this query
select res.id id_recurso from INV_INVESTMENTS inv inner join prj_obs_associations assoc1 on assoc1.record_id = inv.id and assoc1.table_name = 'INV_IDEA' inner join prj_obs_units units1 on units1.id = assoc1.unit_id inner join nbi_dim_obs obs1 on units1.id = obs1.obs_unit_id inner join DEPARTMENTS dep on units1.ID = dep.obs_unit_id inner join odf_multi_valued_lookups mvl on mvl.pk_id = dep.id and mvl.attribute = 'bnb_grupos_acesso' and mvl.object = 'department' inner join cmn_sec_groups gp on mvl.value = gp.id inner join cmn_sec_user_groups csug on gp.id = csug.group_id inner join cmn_sec_users csu on csug.user_id = csu.id inner join srm_resources res on csu.id = res.user_id WHERE inv.id = ?
for the investment what comes back for id_recurso? It looks like it's returning 1 (the Clarity admin user) and perhaps that's not a valid value for the lookup.
Original Message:
Sent: May 19, 2022 12:13 PM
From: Christiane Aguiar
Subject: Custom script error
Hi all,
Custom script is new to me, so I don't have much experience with it.
There is a process that has a custom script in one of the steps. In this script we have a SELECT that returns the users belonging to the group selected during the registration of the idea. And then I need the script to save this data in a custom field (bnb_notificados_dir). However, we identified that this field is not being filled anymore and we could not identify the reason why this is happening.
What could be happening? It used to work and now it doesn't anymore. I attached the bg-ca.log file and the script.
Thanks a lot,
Chris
Here is a part of the error below.
ERROR 2022-05-18 19:52:46,940 [Custom script execution pool-8-thread-4] utilities.BpmErrors (clarity:admin:51131340__D43D4ADF-2A96-4538-9486-56921FDB0887:none)
Begin Error Information:
Step Action Id: 5048674
Process Instance Id: 6585353
Step Instance Id: 7642951
Error Code: bpm.raw.message
Exception Trace: <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<XOGOutput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/status.xsd">
<Object type="idea"/>
<Status elapsedTime="1.032 seconds" state="FAILURE"/>
<Statistics failureRecords="1" insertedRecords="0" totalNumberOfRecords="1" updatedRecords="0"/>
<Records>
<Record>
<KeyInformation>
<column name="ID">5175001</column>
<column name="name">Demanda Teste HMG7</column>
<column name="UNIQUE_NAME">GAPRE001285</column>
</KeyInformation>
<ErrorInformation>
<Severity>ERROR</Severity>
<Description>XOG-3656: Investment Object operation failed: update</Description>
<Exception><![CDATA[CMN-0009: Attribute 'Notificados das diretorias responsáveis' has invalid Lookup Value '1']]></Exception>
</ErrorInformation>
</Record>
</Records>
</XOGOutput>
</soapenv:Body>
</soapenv:Envelope>
End Error Information