How to retrieve details of Composite API instance

155 views
Skip to first unread message

oliver.p...@est.fujitsu.com

unread,
Oct 21, 2013, 6:48:53 AM10/21/13
to suppor...@runmyprocess.com
Hi,
there is a connector for retrieving detailed process information
on all initial, computed and global parameters of a process instance:

Connector „RunMyProcess – Secured Connection / Get details of a process instance“


Is there something similar for Composite API available?
If not, how can I retrieve this information from a Composite API instance?

Sabine El Rassy

unread,
Oct 21, 2013, 1:18:00 PM10/21/13
to RunMyProcess Support Forum
Hello Oliver,

The variables of a composite API are not persistent. So the information is not logged. Nevertheless you can force to log certain variables. In order to do that, you can either stock your variables into a collection or you can use a freemarker function named P_log within your composite API.
For example, in the output of your composite API, you can add the following code:
<#assign all_variables>
{"key1":"value1","key2":"value2"}
</#assign>
${P_log(all_variables)}

Then, you can create a connector with the following parameters:
connector url: logs/log/${customer}/?P_nb=${P_nb}&P_first=${P_first}&P_level=FINEST&P_processId=795788

This will return a json like follow:

{
"links" : {
"self" : "logs/log/6210449386/?P_nb=100&P_first=0&log_level=FINEST"
},
"log" : [{
"message" : "{"key1":"value1","key2":"value2"}",
"customerId" : 6210449386,
"requestId" : "6d7996c0-3a70-11e3-b4b4-1231380c7265",
"processId" : 795788,
"projectId" : 514462,
"log_level" : "FINEST",
"date" : 1382374031486,
"mode" : "TEST"
}
],
}


P_log = FINEST means that your Composite API was executed successfully.
In order to get the process_id you go to your composite API and click over the rss icon, and get the id show in the url.

Hope this helps you achieve what you need to do.
If you need more clarification please do not hesitate to contact us back.

Best regards,

Sabine EL RASSY

PreSales Consultant
     
Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.

Reply all
Reply to author
Forward
0 new messages