×

Please give details of the problem

Docs

Find

    Developer Guide

    1. Composite API Example
      1. Scripted Lanes
      2. Compound Organization Hierarchy
      3. Dynamic Lanes
      4. Delegation
      5. Access Rights
      6. Runtime Lanes
        1. Todo Validation
      1. Release Your User Login
      1. Collections To Array
      2. Collections To List
      3. Collections BackOffice
      4. Collection JS Freemarker
          1. Composite API Design Tab
          2. Composite API Configuration Tab
          1. Providers
          2. Connectors
          3. Processes
          1. Roles entities
          2. Organization
        1. Collections
          1. Project Files Tab
          2. Project Definition Tab
          3. Project Versioned Files Tab
          4. Project Version Tab
          5. Project Description Tab
          6. Version
          7. Project Rights Tab
          8. Project Collection Tab
          1. Web Interface JS Tab
          2. Web Interface Design Tab
            1. Image Widget
            2. FileUpload Widget
            3. StaticText Widget
            4. ProgressBar Widget
            5. TextInput Widget
            6. JavaScript Widget
            7. Section Widget
            8. Geolocation Widget
            9. Checkbox Widget
            10. RadioButton Widget
            11. Tree Widget
            12. Spinner Widget
            13. History Widget
            14. URLInput Widget
            15. Tab Widget
            16. List Widget
            17. Array Widget
            18. HTML Editor Widget
            19. Report Widget
            20. Button Widget
            21. Custom Widget
            22. Captcha Widget
            23. HTML Widget
            24. Multi Checkbox Widget
          3. Web Interface Analytics Tab
          4. Web Interface Collection Tab
          5. Web Interface Implementation Tab
          6. Web Interface API Tab
          7. Web Interface Stylesheet Tab
        2. Revision
        3. Custom Lists
          1. Process Variables Tab
          2. Process Measures Tab
              1. Process Timer Event
              2. Process Start Event
              3. Process Intermediary Event
            1. Gate
              1. Process Task Loop Tab
              2. Process Task Manual Tab
              3. Process Task Email Tab
              4. Process Task Connector Tab
              5. Process Task SubProcess Tab
              6. Process Task Functional Tab
              7. Process Task Script Tab
            2. Process Step Output Variables
            3. Process Step Testing Variables
            4. Process Step Input Variables
          3. Process General Tab
          4. Process Design
          5. Process Input Tab
        1. Home
        2. My Applications
        3. Files
      1. Customer Management
        1. Messages
        2. Scheduled Process
        1. Process Examples
        2. Connectors
        1. Users
        2. Configuration
        3. Usage
        1. Web Interface Reports
          1. Measuring
          2. Runtime Users
          3. Execution Path
          4. Parameters
        1. CSS Examples
        2. CSS Personalization
      1. Performance
        1. Logout
        2. Redirection ExecutionMode
        3. Information Tags
        4. Basket
        5. Menu Bar
        6. Header
        7. Custom Login Page
        8. Mobile Devices
          1. homepage.css
          2. homepage.js
        1. Inject JSONObject
        2. Google Tables
        3. ArrayJSON to JSONArray
        4. Label Modification
        5. Number Currency Format
        6. Launch Process JQuery
        7. Date
        8. JQuery
        9. Round
        10. Holidays
        11. Array From WS
        12. Column Inactivation
        13. Print JSONObject
        14. Initialization Widget Date
        15. Invalid Fields
        16. List Reinitialization
        1. Tags
        2. Dialog Window
        3. Dynamic List
        4. User Lane Picker
          1. Report Chart
          2. Google Visualization
          3. Chart Dashboard
          4. Chart Dashboard Collection
        5. API Listener
        6. JavaScript Report
        7. Retrieving Variables Values
        8. Collection
        9. File Preview
        10. Autocomplete Widget
        11. Summing Array
      1. Trigger
      2. Markdown Template
        1. Task Reminder Email
        2. JavaScript Inclusion
        3. PDF
        4. SubProcess
        5. Backloop
        6. Variable Mapping
        1. Salesforce Computation
        2. Number Currency Format
        3. List Hash Sequence
        4. JSONObject Creation
        5. Freemarker Container Test
        6. JSONObject Concatenation
        7. Metadata
        8. Special Freemarker Characters
        9. List 1000+ Objects
        10. Dynamic Variable
        11. File Visibility
        12. Number Test
        13. JSONObject Keys Values
        14. Lock
        15. JSONArray Conversion
        16. Error Handling
        17. Loop
        18. Array To List
      1. Process Reporting API
      1. Offline
      2. Mobile

    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 :

    1
    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

    1
    2
    3
    4
    5
    6
    7
    8
    /* 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 =

    1
    2
    3
    4
    5
    6
    <#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:

    1
    2
    3
    4
    5
    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:

    1
    2
    3
    4
    5
    6
    7
    8
    <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:

    1
    2
    3
    4
    5
    6
    7
    <@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 :

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    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 :

    1
    2
    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 :

    1
    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 =

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    <#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

    1
    2
    3
    4
    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:

    1
    2
    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