Freemarker Libraries

72 views
Skip to first unread message

J.M.

unread,
Feb 7, 2017, 6:05:43 AM2/7/17
to Fujitsu RunMyProcess Developer Community
Hi,


I know that in RMP I can have a .js file with some functions as a library and attach it to a WI in order to be able to use its functionalities.
But What about Freemarker?

I'm thinking:
I Make my own freemarker library in me text editor implementing all the functions I consider and the I add it to my project, for using it. However, I don't see any place or option to attach a Freemarker library to a project, and be able to use it in all the variables of all the tasks of all my processes I want.

Can I attach a library with the implementation of the function my_pref_function to my project, in order to be able to invoke my_pref_function in a variable of a task?
Is this possible? In affirmative case, How could I get it?


Thanks in advance and regards

Gunjan Rajgure

unread,
Feb 7, 2017, 10:38:13 AM2/7/17
to suppor...@runmyprocess.com
Hello Javier,

Yes, it is possible to add/attach Freemarker file (.ftl format) in project.

Please follow ways to achieve this-

Method-1
1. Upload your .ftl file in file/versioned tab.
2. Select script type as Freemarker in process activity.
3. Choose your uploaded .ftl file.

Method-2
You can also include/call freemarker file by using <#include "file_id/file_name.ftl"> function.
         where- file_id: automatically generated when you upload .ftl file. You can get it from uploaded file property itself.
              file_name: your .ftl uploaded file name.

Please find available Freemarker functions provided in user guide.

Note: Freemarker functionality is available in server side i.e workflow (like- Process etc.)

Kindly let us know if you have any further query.



Thanks & Regards,
Gunjan Rajgure
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+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/7483a140-c93e-43ed-9362-17916db39027%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

J.M.

unread,
Feb 7, 2017, 10:59:51 AM2/7/17
to Fujitsu RunMyProcess Developer Community
Hi Gunjan,


I've tested both methods. The first one is not working, in fact I don't know how should it work, since this method is the method for EXECUTING an script, not for INCLUDING it, right?
Is any additional configuration required?

The second method does not work with only the "file_name", but it works with "file_id" and with "file_id/file_name" (Thanks for this)


Regards.
> To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.

Ankita Shrinath

unread,
Feb 21, 2017, 9:25:40 AM2/21/17
to Fujitsu RunMyProcess Developer Community, javiermm...@gmail.com
Hi Javier,
Good Day.

All our apologizes for the delay in reply.
Please find below answers to your questions:

Method -1 :

Yes, this method is for "EXECUTING" a long running freemarker script.
To which you can pass values in the input tab(values which are coming from the Web Interface or you can directly specify) and it will return the output after executing the script.
Which you can use in the next activity in your process.
No additional configuration is required you have to follow the steps which are given in previous reply.
Please find attached screenshot for more information.


Hope this helps you.Feel free to contact us for any query.

Regards,
Ankita

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/.
Script_Input.PNG
Script_Output.PNG
Script_Result.PNG
Script_Code.PNG

J.M.

unread,
Feb 22, 2017, 2:36:41 AM2/22/17
to Fujitsu RunMyProcess Developer Community, javiermm...@gmail.com
Hi Ankitas,


Thanks for the reply. In fact, I'm having some difficulties too for taking the result of a freemarker script task. I described my problem here:
https://groups.google.com/a/runmyprocess.com/forum/?hl=en&fromgroups=#!topic/supportforum/arvYOFfDImM

In summary, I'm getting P_result as empty, but if I try the same script in the test console of the task, it returns value.


Regards
Reply all
Reply to author
Forward
0 new messages