Can't load user metadata

278 views
Skip to first unread message

yves.d...@gmail.com

unread,
Dec 14, 2015, 6:36:09 AM12/14/15
to Fujitsu RunMyProcess Developer Community
Hello,

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

Pankaj Kumar

unread,
Dec 14, 2015, 11:27:25 PM12/14/15
to Fujitsu RunMyProcess Developer Community
Hi,

You are getting the error as the script execution time have exceeded the maximum time limit.

Please show how you are populating the "metadata_array", as you are updating all the values of the array object in user meta data while replacing the earlier values of the user meta data.

If you are changing some of the property of the user meta data than please use "P_change_metadata" method as its execution time will be faster than save_user_metadata as its changing one property of the metadata rather than whole object. Also it this not work for you than please break your array in two or more small part and loop in different script activity based on split index so that script execution time will be small for each .


Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support

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.

yves.d...@gmail.com

unread,
Dec 15, 2015, 11:52:50 AM12/15/15
to Fujitsu RunMyProcess Developer Community, yves.d...@gmail.com
Thanks Pankaj

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

Reply all
Reply to author
Forward
0 new messages