BPM, Workflow, and Case

BPM, Workflow, and Case

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  Accessing elements in a List of strings in coach IBM BAW BPM

    Posted Tue July 23, 2024 09:28 AM

    I have a question about BAW BPM. I have a local variable in my coach that stores a list of strings, and I'm trying to access the first string like this: {{tw.local.List_nombres_servicios_c_error[0]}}, but for some reason, it only prints the first character of the last string (in this case, 'e'). And when I just use {{tw.local.List_nombres_servicios_c_error}} it only prints the last string. What am I doing wrong? I tried to look in the documentation, but I couldn't find any information on this.

    The list I am talking about contains 3 strings: exemplo0, exemplo1, exemplo2



    ------------------------------
    Caio Corsini Filho
    ------------------------------


  • 2.  RE: Accessing elements in a List of strings in coach IBM BAW BPM

    Posted Tue July 23, 2024 10:22 AM

    Hello,

    You are doing it in the correct way. Which version are you using? It works correctly in v21.

    Alternatively, you can create the whole HTML in a Scriptlet and use the pointy hash to populate the values, then render that directly in the Custom HTML block.

    Thanks!



    ------------------------------
    Atanu Roy
    Lead Engineer
    London Stock Exchange Group
    ------------------------------



  • 3.  RE: Accessing elements in a List of strings in coach IBM BAW BPM

    Posted Tue July 23, 2024 10:47 AM

    Interesting. How/where do I make this HTML Scriptlet?



    ------------------------------
    Caio Corsini Filho
    ------------------------------



  • 4.  RE: Accessing elements in a List of strings in coach IBM BAW BPM

    Posted Tue July 23, 2024 10:59 AM

    You can use the Scriptlets in Service Flows. Here is the IBM documentation - https://www.ibm.com/docs/en/baw/23.x?topic=flow-using-scriptlets-in-script-tasks



    ------------------------------
    Atanu Roy
    Lead Engineer
    London Stock Exchange Group
    ------------------------------