×

Please give details of the problem

Skip to content

FAQ

Which variables are passed to the process

Q: When you submit a web interface, what variables are passed from the webinterface to the process?

A: Every variable defined in the RunMyProcess Javascript (RMP JS) context:

  • Every variable associated to a widget
  • Every time you write RMPApplication.set("my_var",my_value), my_var will be part of the RMP JS context

Q: When you open a manual task, what variables are passed from the process to the web interface?

A: Every variable associated to widgets available in the manual task screen

NB: Html & static text widgets don't have variables

NB2: We recommend that you don't fill a variable name for js widgets. that should ONLY be used to compute formulas, not to store result.

How to set a list of users

Configure a list > type : 'users'. Don't choose any entity or role.
Add an identifier to the list : id_list_users

The script to set the list of users from an entity or role is :

id_list_users.loadList("config/your_customer_id/user/filter=LANE&operator=EE&value=id_of_the_entity_or_role");

How to capture a closed event in your browser

You can use this jQuery plugin in your webinterface.

How to create a list of filters for a report widget

1) Create a new “web interface report”, select your project and select the wanted “web interface”. Then add the columns that contain your measures and save the report.

2) Create a new “web interface”, add a “report” widget and link it to the “web interface report” you’ve just created. In the properties of the widget, uncheck the option
“activate filters” and enter an text in the field “identifier”, for instance “id_report”.

3) Create a “Custom list”. The labels of your list must match the different values your measure can take.

4) Add the list to the “web interface” you have created. Enter a variable in the field “Label value variable”. In my example, the variable name is “status_label”.

5) Add a hidden “Calculated field” widget to the web interface. The “calculated field” must listen to the label variable of the list, “status_label” in my example.

6) In the script of your “Calculated field” add the following script. Only the texts in blue have to be modified.

Code

/* TO MODIFY */
var measure_name="status";  /* name of our measure */
var list_label="[[status_filter_label]]"; /* name of the variable associated with the filters list label*/
var id_my_report="id_report"; /* name of the report widget identifier. WARNING: the name of this variable must be different from its value*/

/* DO NOT MODIFY */
var my_script=id_my_report+'.clearMeasureFilter(measure_name);if (list_label!="undefined") {var mon_filtre=list_label.replace(" ","$_$");'+id_my_report+'.addMeasureFilter(measure_name,RMP_FilterOperator.EQUAL,mon_filtre);}'+id_my_report+'.refresh();';
eval(my_script);

7) Save your “web interface” and open it in test to try it.

How to differentiate Test and Live execution mode

ex: You've made a process that will update a Google Spreadsheet at the end.

You want a specific spreadsheet to be updated when you trigger your process in TEST mode, and another one when triggered in LIVE mode.

When you're asked to pass the spreadsheet_id to use the connector 'update a spreadsheet', write this:

spreadsheet_id =

<#if P_mode = "TEST">  
<#assign spreadsheet_id = "id spreadsheet to be updated in TEST mode">    
<#else>  
<#assign spreadsheet_id = "id spreadsheet to be updated in LIVE mode">  
</#if>  
${spreadsheet\_id }

=> be careful with worksheet ids : they also change from a spreadsheet to another

How to send pretty emails

Default sent email when you generate a manual task has no formatting:

2012-12-31_173051

html code by default:

Hello<br>  
A task has been assigned to you.<br>  
Please click <a href="${P_task_url}">here</a> to access to the  
validation form.<br>  
Best regards.

Best practice is to add nice formatting + include RunMyProcess variables. Ex:

2012-12-31_173307

Associated html code:

<span style='font-size:8.5pt;font-family:Verdana,sans-serif'>Hello,  
Please review and approve <a href="${P_task_url}">this RFP</a> (<strong>${amount?number?string("0.00")} ${currency_id}</strong>)  
Best regards,</span>  
<span style='font-size:8.5pt;font-family:Verdana,sans-serif;color:#006233'>  
<strong>RFP support team</strong>  
</span>  
<span style='font-size:6.5pt;font-family:Verdana,sans-serif;color:#006233'>  
<i>Automatically generated email</i></span>

Note:
When you enter html code in email content configuration in the process, < br > are automatically interpreted and visually replaced by carriage return character. It's like a WYSIWYG but only for carriage return.

How to create a JSONObject in a JavaScript script

Create a json in a process using JS:

<@script env="javascript">
var j_address = {};
j_address.street = my_street;
j_address.city = my_city;
j_address.country = my_country;
setVariable("j_address",j_address);
</@script>

Note: my_street, my_city, my_country have to be set as input variable of the activity.

How to populate an Array with cells from a Spreadsheet

he idea is to easily fill in an Array widget by copying and pasting cells from a Spreadsheet.

The only constraint is that the number of columns you will be copying has to be known in advance as we cannot dynamically extend the number of columns of an array widget.

Let's see how to achieve this. It's quite simple !

  • First of all, create a text input widget, with associated variable input for example.

  • Then add an Execute Script button below, that you can call "Populate Table".

  • Finally, create your array widget below, with variable name my_array for example, with the number of columns you need (in the following example, we'll use four columns whose variables are named respectively column_A, column_B, column_C and column_D).

  • Last step is to add to the button the script that will perform the automatic filling of the array :

Code :

var toto = RMPApplication.get("input");
var column_A = [];
var column_B = [];
var column_C = [];
var column_D = [];
var lines = toto.split("\n");
for(var i=0;i<lines.length;i++){
    var line = lines[i].split("\t");
    column_A.push(line[0]);
    column_B.push(line[1]);
    column_C.push(line[2]);
    column_D.push(line[3]);
}
var output = {};
output.column_A = column_A;
output.column_B = column_B;
output.column_C = column_C;
output.column_D = column_D;
RMPApplication.set("my_array",output);

How to generate a PDF file

Read this tutorial

How to manage newlines in emails (Lotus Notes Users)

You may have noticed that emails you received from RunMyProcess are not well displayed in Lotus Notes (everything is on the same row).

The reason is : on RunMyProcess, in the email content configuration window, when you type ENTER for a carriage return, it writes <br/> in the background, and Lotus Notes doesn't handle this character.

If you manually type <br> in the content of the email on RunMyProcess, it will automatically be converted to a carriage return and replaced by <br/> in the background.

The only character Lotus Notes handles is <br>

Here's the trick :

If you want to send an email like this :

Hello,  
Regards,

You first have to create an input parameter in the email activity :
html_br = <br>

then, type in the content of your email :

Hello,${html_br}${html_br}Regards,

How to get the parameters from a set of process requests

The target : build an array of json, containing the computed parameters of the process instances in a report

Here's your report:

2012-01-10_154758

Click on the RSS feed icon 2012-01-10_155000

You should get an url like:
https://live.runmyprocess.com/live/621199258/request?nb=20&first=0&value=27893%20TEST%20NULL&filter=PROJECT%20MODE%20PARENT&column=name%20status%20events%20published%20updated&operator=EE%20EE%20IS

As you can see, there is "nb=20&first=0&" as parameter.

Remove it. Here's the new url :
https://live.runmyprocess.com/live/621199258/request?value=27893%20TEST%20NULL&filter=PROJECT%20MODE%20PARENT&column=name%20status%20events%20published%20updated&operator=EE%20EE%20IS

Now : Create this process:

2012-01-10_161556

1 : Starting point Output variables
a_parameters = []

2 : input variables
rmp_url = live/621199258/request?value=27893%20TEST%20NULL&filter=PROJECT%20MODE%20PARENT&column=name%20status%20events%20published%20updated&operator=EE%20EE%20IS

3 : use the connector "RunMyProcess Secured Connection" > "Get anything (xml ouput)" (available on the library)

4 : ouput variables
a_instances = ${P_result.feed.entry}

5 : input variables
rmp_customer_id = ${P_customer}
rmp_request_id = ${a_instances[P_index].id}

6 : use the connector "RunMyProcess Secured Connection" > "Get details of a process instance" (available on the library)
Make a loop Type "multi-instance", array = ${a_instances}

7 : output variables:
a_parameters =

<#assign json_initial = {}>  
<#assign json_computed = {}>  
<#list P_result.feed.entry as x>  
<#if x.title = "Initial parameters">  
<#assign json_initial = x.content.P_value>  
<#elseif x.title = "Computed parameters">  
<#assign json_computed = x.content.P_value>  
</#if>  
</#list>  
<#-- if a variable is in computed, take it. Otherwise check in initial -->  
<#assign new_json = json_computed>  
<#list json_initial?keys as x>  
<#if json_computed[x?string]?exists>  
<#-- nothing -->  
<#else>  
<#-- add it to the list of parameters -->  
<#if (json_initial[x]?is_sequence || json_initial[x]?is_hash)>  
<#assign new_element>  
{"${x}":${json\_initial[x]}}  
</#assign>  
<#else>  
<#-- value is a string -->  
<#assign new_element>  
{"${x}":"${json_initial[x]}"}  
</#assign>  
</#if>  
<#assign new_element = new_element?eval>  
<#assign new_json = (new_json + new_element)?eval>  
</#if>  
</#list>  
<#assign a_parameters = a_parameters + [new_json]>  
${a_parameters}

Trigger your process : you get a_parameters, an array containing the computed parameters of the process instances from your report.

How to configure a filter on the connected user metadata

Ex : you have a measure country = france or italy or germany in your process.

Create a user metadata countries
Put as value france,germany

In the report, add the filter country IN [[user.extended.countries]]
=> if the user opens the report, he'll only see instances with country=france or country=germany

How to format a date in a Google Apps script

function getFullDateFromString(myDateString) {
Logger.log(Utilities.formatDate(new Date(myDateString), SpreadsheetApp.getActiveSpreadsheet().getSpreadsheetTimeZone(), "yyyy-MM-dd'T'HH:mm:ss Z"));
return Utilities.formatDate(new Date(myDateString), SpreadsheetApp.getActiveSpreadsheet().getSpreadsheetTimeZone(), "yyyy-MM-dd'T'HH:mm:ss Z");
}

Example:

var asof = "28/08/2012 17:07:02";
getFullDateFromString(asof);

will return 2014-04-08T17:07:02 +0200

How to release your user login from your trial account

Read this tutorial

For how long do you keep the TEST and ACCEPTANCE data

We are keeping the data for TEST and ACCEPTANCE only for 2 months.

Tricks

See more tricks