BPM, Workflow, and Case

 View Only
Expand all | Collapse all

Using jsPDF inside Process Designer

  • 1.  Using jsPDF inside Process Designer

    Posted Wed April 03, 2024 07:43 AM

    Hello,

    I'm currently working on a process in BAW, and I'm looking to generate a PDF document from the process variables.

    My plan is to utilize the jsPDF library for this task. However, I'm struggling to find a method to import an external JavaScript library within the process designer, whether through a script task or any other means.

    Any insights or guidance on how to integrate external libraries like jsPDF into the process designer would be greatly appreciated.

    Thanks in advance!



    ------------------------------
    Amina SAHLAOUI
    ------------------------------


  • 2.  RE: Using jsPDF inside Process Designer

    IBM Champion
    Posted Wed April 03, 2024 11:55 AM

    Hi Amina,

    Here the steps usually followed to use any external JS library - 

    1. Import the JS library as a WEB file in the process app/toolkit
    2. In a View, add the reference under "Included Scripts" (there are other ways of doing it, but this would be good to start with)
    3. The library functions would be available to use within the View.

    You can download the TWX and import in your Workflow Center from here - Charting Toolkit for IBM BAW

    I have created a similar implementation to export to PDF using jsPDF library.

    Thanks!



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