I'm doing some tests with the script task. I use to write my scripts directly as the content of a variable in a 'none' type task, but I've read in the doc, that the script task can execute code wich may lasts more time for completing the execution, so I think this behavior can be very useful.
For this reason I've tried to make a script which will process a file with a large number of lines. Each of this lines will contain some data for possible future lanes of RMP (this is only an example), and will return an array of objects with this information.
The data I'm using is the following:
- Input file:
nombreRol_001;rol identificativo para A;96701;ROLE;[{"nombre" : "Javier", "id" : "302802"},{"nombre" : "Javier2", "id" : "624674"}]
nombreRol_002;rol identificativo para B;96701;ROLE;[{"nombre" : "Javier", "id" : "302802"},{"nombre" : "Javier2", "id" : "624674"}]
nombreRol_003;rol identificativo para C;96701;ROLE;[{"nombre" : "Javier", "id" : "302802"},{"nombre" : "Javier2", "id" : "624674"}]
...
and so on, until 3000 lines.
- Content of the .ftl file I've uploaded for using it in my script task:
<#assign panContent = file_content(file[0].id,"none")>
<#assign parray = []>
<#assign listaUsuarios = "">
<#list panContent?split("\r\n") as x>
<#assign elemsLinea = x?split(";")>
<#list elemsLinea[4]?eval as user>
<#assign listaUsuarios = listaUsuarios + "<link rel=\"user\" href=\"config/" + P_customer + "/user/" + user.id + "\" title=\"" + user.nombre + "\" />" >
</#list>
<#assign obj = {"lane_name" : elemsLinea[0], "lane_description" : elemsLinea[1], "id_pool" : elemsLinea[2], "type" : elemsLinea[3], "user_list" : listaUsuarios}>
<#assign parray = parray + [obj] />
</#list>
${parray}
Well, at this point, my problem is:
How can I take the result of the execution of this script (that is, the value of ${parray})?
I've tried adding an output variable in the script task with the value ${P_result}, but though the process is completed correctly, at the end of the execution the variable appears empty in the computed parameters of the report of my process.
How can I take the result?
Thanks in advance and kindly regards
--
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+unsubscribe@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/CA%2B3gzEhzMi6st8MqFq9S9cVYEEh-B0%3DRfoM-VcibehA9NiORvQ%40mail.gmail.com.
Yes please we are waiting forward to know how did you solve you issue.
kindly Regards Javier
--
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+unsubscribe@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/29b6b6a4-86e5-4e16-bbb8-17a17309811b%40runmyprocess.com.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/CA%2BDBeVK2NGnC5xkqOQbDcZPpKWhzcu4WhoiQDHLJtMbkU%3D7O%2Bw%40mail.gmail.com.