Not getting data from live collection

355 views
Skip to first unread message

javiermm...@gmail.com

unread,
Oct 7, 2015, 3:17:59 AM10/7/15
to Fujitsu RunMyProcess Developer Community
Hi,

I'm using some collections in my process, and I having a weird issue. Let me explain:

I have three records in a collection in test mode, and I try to load one of them at the begining of my process. For this purposse I have an activity with thath code:

<#if tipoincidencia?has_content>
<#assign my_pattern_inc>
{"codigo":"${tipoincidencia}"}
</#assign>
<#else>
<#assign my_pattern_inc>
{"codigo":"${contenido_mail.tipo}"}
</#assign>
</#if>
<#assign tmp_inc = load_object( my_pattern_inc, "categoria_incidencias")>
${inject_objects(tmp_inc)}


Well, If I test the code in the code window of my activity it works (I guess, this is loading the object from the TEST collection, right?), and for this reason I jumped to live mode.
Making this change the collection haven't the same data so, I add the data manually (very carefully) thus it was only 3 records.
Well, with the same code, and the same data the object i get is {}, what is totally imposible.
I should mention too, that I'm using almost the same code (changing some variables) in order to load another object from another collection (a user, in theis case), and it's working fine on test and live mode.This is the code:

<#if numpoliza?has_content>
<#assign my_pattern>
{"poliza":"${numpoliza}"}
</#assign>
<#else>
<#assign my_pattern>
{"poliza":"${contenido_mail.poliza}"}
</#assign>
</#if>
<#assign tmp = load_object( my_pattern, "usuarios")>
${inject_objects(tmp)}


What am I doing wrong?
I have report widgets for showing the info and I don't see any difference.
I attach some images.

Please, I would need some help.
Thanks in advance and regards.

P.S: I'm launching the process by mail, like the images show.

Computed parameters with the empty variable.png
initial parameters.png
Process design.png
testing and working the loading.png
Collection info.png

Pankaj Kumar

unread,
Oct 9, 2015, 4:50:24 AM10/9/15
to Fujitsu RunMyProcess Developer Community
Hi,

One possibility may be the pattern you are applying on the collection to get the filtered result is giving the empty set, you can define the variable "my_pattern" outside the definition of if block and reset the value in if/else block and use this value in input/output tab of process variable. this way you can check what value is coming in "my_pattern" variable.

You can also create a CAPI with the freemarker script and log the variable "my_pattern'.

refernece link:-

Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support


--
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 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/b46363ea-411f-4b77-8419-ce2c43d25489%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

J.M.

unread,
Oct 13, 2015, 4:47:25 AM10/13/15
to Fujitsu RunMyProcess Developer Community
Hi Pankaj,

I've solved it. The error was my variable 'codigo' isn't a string so removing the "" in the value of that field, the result is correct.
Changing
{"codigo":"${tipoincidencia}"}
to
{"codigo":${tipoincidencia}}

Thank you and regards.
Reply all
Reply to author
Forward
0 new messages