OUTPUT VARIABLE

172 views
Skip to first unread message

con...@ecotronicbr.com

unread,
Oct 9, 2014, 6:45:11 PM10/9/14
to suppor...@runmyprocess.com
Hello,

I'm trying to insert a script on my output variable. When I only put the output variable with the value ${P_result} that's all right, but if I inser the code, give the error: Error executing macro: get_array
required parameter: my_father is not spe... (7 characters left)

the code:


<#function get_array my_father my_son>
<#if my_father?is_hash>
<#if my_father[my_son]?exists>
<#if my_father[my_son]?is_sequence>
<#assign my_array = my_father[my_son]>
<#else>
<#assign my_array = [my_father[my_son]?eval]>
</#if>
<#else>
<#assign my_array = []>
</#if>
<#else>
<#assign my_array = []>
</#if>
<#return my_array>
</#function>

<#assign entries = get_array(P_result.feed,"entry")>
<#assign gera_result = []>
<#list entries as x>
<#assign gera_result = gera_result + [{"Nome Fantasia":x.NomeFantasia,"ID":x.id,"CNPJ/CPF":x.CNPJ_CPF,"IE":x.IE,"Razão Social":x.RazaoSocial,"Logradouro":x.Logradouro,"Nº":x.LogradouroNumero,"Cidade":x.Cidade,"Bairro":x.Bairro,"CEP":x.CEP,"Telefone":x.Telefone,"Celular":x.Celular}]>
</#list>
${gera_result}


Can you help me?

Best regards

Shobhit Tripathi

unread,
Oct 12, 2014, 8:11:24 AM10/12/14
to suppor...@runmyprocess.com
Hi,

Could you please give us some more information.So that we can give you the specific solution. 
Their might be some reasons:

1. It looks like that "my_father" variable is not coming (proper format) in the executed parameter. Could you please check this. To do so use only ${P_result} in the output variable of your process and then check the  computed parameter result.

2. Have you used any connector?
    If this is the scenario then please check the "Result format", "Accept media type" and "Content type" fields, might be this will be mismatch as per your code's requirement.

Please let me know will it works for you. Feel free to ask.

Thanks & Regards,
Shobhit
Fujitsu- RunMyProcess


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" 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 http://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/490bfca8-50a1-4eda-8f72-16314be62d5c%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.



--
Thanks & Regards,
Shobhit
Fujitsu- RunMyProcess
Reply all
Reply to author
Forward
0 new messages