The [error] variable does not persist in an [onAfter] script in a transform map.
Steps to Reproduce
1) create a data source into [sys_user] table with the following sample csv file as attachment:
email,first name,last name,user_name
Note that the second user has the first user's user_name and this will cause a duplicated key error when inserting.
2) Create a new transform map:
a) coalesce on [email] so they are treated as two different records, map the [user_name] to [sys_user].[user_name]
b) create an new [onAfter] script with the following script:
log.info('# log.info - OnAfter: Email: '+ source.u_email + ', error: ' + error)
3) Run the import and transform.
4) Expect a duplicated key error.
Expected Results: error variable is printed as [true]
Actual Results: error variable is printed as [false], the [error] value does not persist.
Related Problem: PRB633362