I'm updating metadata with the following script
<#list metadata_array as x>
<#assign mdt ={}>
<#assign mdt = P_json_accumulate(mdt, 'mdt1',x.mdt1?default(""))>
<#assign mdt = P_json_accumulate(mdt, 'mdt2',x.mdt2?default(""))>
<#assign mdt = P_json_accumulate(mdt, 'mdt3',x.mdt3?default(""))>
<#assign mdt = P_json_accumulate(mdt, 'mdt4',x.mdt4?default(""))>
<#assign mdt = P_json_accumulate(mdt, 'mdt5',x.mdt5?default(false))>
<#assign mdt = P_json_accumulate(mdt, 'mdt6',x.mdt6?default(""))>
<#assign mdt = P_json_accumulate(mdt, 'mdt7',x.mdt7?default(false))>
update= ${save_user_metadata(x.login,mdt)}
</#list>
It works fine for a list of 100 users.
For a list of 150 users and above, I receive the following error
Task "update_metadata" (id: 32[0] - status: COMPLETED): Maximum execution time exceeded (300000 ms)
Why is it so long to load metadata ? What is the solution ?
Additionnaly, when trying to load the following metadata (text format) <#assign mdt = P_json_accumulate(mdt, 'mdt8',x.employee_number?default(""))>
with only numbers, it causes the follwoing error :
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
Using x.employee_number?string?default("") doesn't change anything
What is the solution ?
Regards
Yves
Yves
--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/14fcbf69-837d-4e56-a86a-abe0d490ce4b%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.
User's metadata are loaded from a collection but it's done in a former step : so it does not impact the script execution of the 'save_user_metadata' script.
I will rather try the P_change_metadata method than creating a loop
> Regards
> Yves