Freemarker function get_project_metadata doesn't work

143 views
Skip to first unread message

yves.d...@gmail.com

unread,
Mar 17, 2015, 1:36:29 PM3/17/15
to suppor...@runmyprocess.com
Hello,

I tried to use in a process variable the function ${get_project_metadata("103656")} and also ${get_project_metadata(103656)} without the double quote but I got the same error in both cases 'Unable to retrieve metadata for project 103656'.

Why ?

regards
Yves
get_project_metadata NOK.jpg

yves.d...@gmail.com

unread,
Mar 23, 2015, 12:17:21 PM3/23/15
to suppor...@runmyprocess.com, yves.d...@gmail.com
Hello,

Any feedback ?

regards
Yves

Pray Desai

unread,
Mar 23, 2015, 2:04:44 PM3/23/15
to suppor...@runmyprocess.com, yves.d...@gmail.com
Hello Yves,

We have reproduced your issue and are following up with our R&D team to find its cause. We will keep you updated.

Regards,
Pray Desai,
Fujitsu RunMyProcess.

yves.d...@gmail.com

unread,
Mar 23, 2015, 3:27:57 PM3/23/15
to suppor...@runmyprocess.com, yves.d...@gmail.com
Noted Pray. Keep me posted please

regards
Yves

Pray Desai

unread,
Mar 26, 2015, 5:33:39 PM3/26/15
to suppor...@runmyprocess.com, Yves de Veyrac
Hi Yves,

The error 'Unable to retrieve metadata for project..' is encountered when there is no metadata set in the project. 

Can you confirm that you didnt have any metadata in the project ?

Also, I would like to know your design, what is your goal in get/set project metadata?

Regards,
Pray Desai,
Fujitsu RunMyProcess.


regards
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 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/12bdb47e-a80c-4a80-ad25-ed801bc10a86%40runmyprocess.com.

yves.d...@gmail.com

unread,
Mar 27, 2015, 2:12:47 PM3/27/15
to suppor...@runmyprocess.com, yves.d...@gmail.com
Hello Pray,

Actually I retrieve the failure log witha CAPI. It provides processId and projectId which are numbers, so not easy to interpretate. I would like to get the project name and process name from projectId and processId and I thought that get_project_metadata was the right function. If not what is the function to be used ?

Regards
Yves

Pray Desai

unread,
Mar 27, 2015, 10:34:21 PM3/27/15
to suppor...@runmyprocess.com, Yves de Veyrac
Hi Yves,

Inorder to get project name from id, you can import this connector from library :

Provider : "RunMyProcess - Secured Connection"
Connector : "Detail of a project (list of share process, users and tasks)"

${P_result.feed.entry.title} will give its title.


Inorder to get process name, you can get list of processes along with their ids by making a custom connector in the same provider "RunMyProcess - Secured Connection" with this connector URL :

config/${P_customer}/process?filter=PROJECT&operator=EE&value=${project_id}

Just loop through result ${P_result.feed.entry} and id, title will have process id and title.


Regarding failure log, you can also make a process report, uncheck "Only for current project", check Aborted, search results, then open feed subscirbe icon, you wil see a URL in browser with XML feed of max 20 results,
you can change it to JSON by adding &media=json
and update max results by updating nb=20 to nb=100 

https://live.runmyprocess.com/live/${P_customer}/request?nb=100&first=0&filter=MODE%20PARENT%20STATUS&column=name%20status%20events%20published%20updated&value=LIVE%20NULL%20301&operator=EE%20IS%20EE&media=json

You can make this as a custom connector in the "RunMyProcess - Secured Connection" provider.

Inorder to show step by step execution path to debug error, you can use connector "Get Details of process instance" in same provider and you need to send process instance id (${P_request}) that you can get from JSON feed of process report.

Regards,
Pray Desai,
Fujitsu RunMyProcess.


Regards
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 http://groups.google.com/a/runmyprocess.com/group/supportforum/.

yves.d...@gmail.com

unread,
Mar 30, 2015, 3:03:51 PM3/30/15
to suppor...@runmyprocess.com, yves.d...@gmail.com
Thanks Pray for your comprehensive answer, I will look at that

Regards
Yves

yves.d...@gmail.com

unread,
Apr 8, 2015, 11:20:57 AM4/8/15
to suppor...@runmyprocess.com, yves.d...@gmail.com
Hello Pray,

I tried out the different connectors that you have listed. Retrieveing the project_id is not straightforward : project_id is only available through 'Get Details of process instance' connector as a substring of one of feed.entry.link[x].@href.

It 'generally' works but sometimes it fails because the P_message containing the error message of the failed process instance contains some forbidden characters. I retrieve this P_message from feed.entry[2].content.P_value.P_message of Get Details of process instance connector.
So it creates a recursive failure.
Example of the end of a message error (P_message Get Details of process instance connector): Token manager error: Invalid freemarker: : Lexical error at line 1, column 5596. Encountered: "\"" (34), after : "\\" .

What is the solution ?

Regards
Yves

Pray Desai

unread,
Apr 9, 2015, 4:27:07 PM4/9/15
to suppor...@runmyprocess.com, Yves de Veyrac
Hi Yves,

You need to go through two connectors in loop to get project id/title. You need to first retreive process config URL from the custom connector to get all red process requests that I suggested earlier :

live/${P_customer}/request?nb=100&first=0&filter=MODE%20PARENT%20STATUS&column=name%20status%20events%20published%20updated&value=LIVE%20NULL%20301&operator=EE%20IS%20EE&media=json

You can make this as a custom connector in the "RunMyProcess - Secured Connection" provider.

Inline image 1


You can then loop through its result :

<#list P_result.feed.entry as x> //your code </#list>

// Your code to retreive the required fields and appending them to an empty array
${x.id} will give process request id
${x.title} will give process request dynamic label title
${x.link[0].href} will give URL of process design containing process design id
${x.link[0].title} will give process design title


Now, if incase you need to get project title, you can use the "Get anything" connector in JSON format as shown below  :

Inline image 2


Here connector URL will be dynamic using the URL of process design retreived in previous connector call  ${x.link[0].href} 

You can then retreive project title from the connector result :

<#list P_result.feed.entry.link as x>
<#if x.rel=="project">
// ${x.title} will give project title
// ${x.type} will give project id
</#if>
</#list>


Regards,
Pray Desai,
Fujitsu RunMyProcess.


Regards
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 http://groups.google.com/a/runmyprocess.com/group/supportforum/.

yves.d...@gmail.com

unread,
Apr 9, 2015, 5:22:12 PM4/9/15
to suppor...@runmyprocess.com, yves.d...@gmail.com
Hello Pray,

I had done the double loop as you had suggested. No problem with that. My issue now is that sometimes the P_message of a previously failed process contains some forbidden characters so that the process built with this double loop fails as well

Regards
Yves

Pray Desai

unread,
Apr 9, 2015, 5:34:16 PM4/9/15
to suppor...@runmyprocess.com, Yves de Veyrac
Try using ?json_string or ?js_string when you retrieve P_message to escape such forbidden characters.


Regards,
Pray Desai,
Fujitsu RunMyProcess.


Regards
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 http://groups.google.com/a/runmyprocess.com/group/supportforum/.
Reply all
Reply to author
Forward
0 new messages