BPM, Workflow, and Case

BPM, Workflow, and Case

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

 View Only
  • 1.  Calling Client Side Human Service from Heritage Human Service or vice versa

    Posted Wed June 21, 2023 04:53 AM

    Hi all,

    There is a requirement to call Client Side Human Service from Heritage Human Service or vice versa. Your help/inputs are highly appreciated.

    Consider this scenario, you have an existing page which is built in Heritage Human service and on a button click another page will open and that page is built in Client Side Human Service. How we can achieve that including passing data (complex bo data) to and fro ?

    BAW versions: 19.x and 22.x.

    Regards,

    Deb



    ------------------------------
    Debabrata Singh
    ------------------------------


  • 2.  RE: Calling Client Side Human Service from Heritage Human Service or vice versa

    Posted Wed June 21, 2023 06:53 AM

    Hi Debabrata,

    You can use window.open() to launch the CSHS with a URL, like - 

    https://<HOST>:<PORT>/teamworks/executecf?processApp=<PA_ACRONYM>&serviceName=<SERVICE_NAME>&branchID=<TRACK_ID>&tw.local.name=ABC&tw.local.value=XYZ

    Here we are passing two variables to the CSHS as input, "name" and "value" are the input variables decaled in the CSHS. Both are of String type.

    Ideally, you should not pass any sensitive data via URL, instead, you can pass an identifier to the CSHS and retrieve the business data from a database/some SOR system. 

    If you are not passing any sensitive data and you need to send a complex object, remember you cannot pass a complex object directly via URL.

    You can follow below steps to achieve this - 

    1. Create an input variable "data" of String type.
    2. Before calling window.open(), forst convert the complex object to JSON string (using JSON.stringify()), then convert that JSON string to base64 (using btoa()).
    3. Send the base64 encoded data to the CSHS via URL, like tw.local.data=<BASE64_ENCODED_STRING>
    4. In the CSHS, before reaching to the Coach, in a script, decode the base64 (using atob()) string as JSON, then parse the JSON string(using JSON.parse()) to the same type of complex object.  tw.local.<YOUR_COMPLEX_VARIABLE>= JSON.parse(atob(tw.local.data));

    Hope this helps.



    ------------------------------
    Atanu Roy
    Solution Architect
    Salient Process
    ------------------------------



  • 3.  RE: Calling Client Side Human Service from Heritage Human Service or vice versa

    Posted Wed June 21, 2023 07:39 AM

    Hi Atanu,

    Would it work in work flow server environment? There will be no Branches/Tracks in WFS.



    ------------------------------
    Harish Puli
    ------------------------------



  • 4.  RE: Calling Client Side Human Service from Heritage Human Service or vice versa

    Posted Wed June 21, 2023 07:51 AM

    Hi Harish,

    Branch Id is associated with every snapshot, even in workflow servers. You can deploy snapshots from different branches in workflow server. 

    However, there are different ways of invoking it, either you can call it by using process app acronym, service name and snapshot acronym, or by using service id, snapshot id and branch id. In both cases, if snapshot id is provided, branch id will be ignored.

    Hope this helps.



    ------------------------------
    Atanu Roy
    Solution Architect
    Salient Process
    ------------------------------



  • 5.  RE: Calling Client Side Human Service from Heritage Human Service or vice versa

    Posted Wed June 21, 2023 08:48 AM

    Thank you Atanu!.



    ------------------------------
    Harish Puli
    ------------------------------



  • 6.  RE: Calling Client Side Human Service from Heritage Human Service or vice versa

    Posted Wed June 28, 2023 06:52 AM

    Its working. Thanks Atanu for the detailed explanation. Much appreciated!!!

    One concern is there about data security as the data will be passed with the URL as a parameter.



    ------------------------------
    Debabrata Singh
    ------------------------------



  • 7.  RE: Calling Client Side Human Service from Heritage Human Service or vice versa

    Posted Wed June 28, 2023 09:59 AM

    Hi Debabrata,

    Yes, as I mentioned in my previous reply - Ideally, you should not pass any sensitive data via URL, instead, you can pass an identifier to the CSHS and retrieve the business data from a database/some SOR system.



    ------------------------------
    Atanu Roy
    Solution Architect
    Salient Process
    ------------------------------