Post Publish Actions with Resolvable Variables Pulled from Seedlists Cause Datamaker to Crash

Document ID : KB000101475
Last Modified Date : 14/06/2018
Show Technical Document Details
Issue:
In Datamaker, formulas are used to resolve the values that are going to be used in post action activities within the data pool.

When executing such process it returns the error:
Array boundary exceeded at line 60 in function uf_seedval of object u_meta_functions.

After clicking OK on the error, Datamaker crashes.

The Datamaker log shows:
22-05-2018 12:15:53 - SQLLOG - Repository: SELECT rd_ref_value_1, rd_ref_name_1 FROM gtrep_reference_data WHERE rd_ref_id = 'LastName' AND rd_proj_id = 0
22-05-2018 12:15:54 - RUNTIMEERROR: CA Test Data Manager - Datamaker FATAL error: 4.4.0.23 (12/08/2017 14:32:00) - Array boundary exceeded at line 60 in function uf_seedval of object u_meta_functions.
Resolution:
The *LOV functions (RANDLOV, HASHLOV, etc) return lists of values so that they can be quickly/actively used during the publish process.

Since this is a post-publish action, the variable is only expecting a single string, not a list (or array) of strings.

TDM does not have any function to just get the first/single value from the returned list during the post publish, so the data will need to be generated manually.

This can be achieved  via execsql:

For an Oracle repo:
@execsql(R,SELECT * from (SELECT RD_REF_VALUE_1 FROM GTREP_REFERENCE_DATA WHERE RD_REF_ID = 'LastName' AND RD_PROJ_ID = 0 order by DBMS_RANDOM.VALUE) WHERE ROWNUM = 1)@

For a MS SQL repo:
@execsql(R,SELECT top 1 rd_ref_value_1 FROM gtrep_reference_data WHERE rd_ref_id = 'LastName' AND rd_proj_id = 0 order by newid())@


This will return one random value from the seedlist that is defined within the repo as noted by "rd_ref_id". In this example "LastName". Different seedlists may use different rd_ref_value_* columns and possibly more than one rd_ref_value_* column. View the data to choose the correct values and modify the SQL accordingly to meet the needs.