BPM, Workflow, and Case

BPM, Workflow, and Case

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

 View Only
  • 1.  Display custom case details page having client side human service

    Posted Fri February 11, 2022 01:42 PM
    Hi,

    I am trying to get case guid and BPM server name in script adapter so that i can create a url to be set in website widget.  Which API can be used to get bpm server name as well as case guid.

    Thanks,
    Gaurav

    ------------------------------
    Gaurav Arora
    ------------------------------


  • 2.  RE: Display custom case details page having client side human service

    Posted Mon February 14, 2022 12:34 PM
    Hi.

    If you are on a case details page, add a script adapter to the hidden area and wire its incoming event to the page container's send Case Information event.

    In the payload you get, the caseEditable object for the instance you are viewing will have everything you need.

    // debugger;
    var caseID = payload.caseEditable.id;
    var theOS = payload.caseEditable.repository.objectStoreName;
    var url = "/teamworks/executecf?processApp=SYSCT&serviceName=Case%20Details%20Default&branchID=2063.0a4882fa-704b-44c5-a91d-7740143fac46&tw.local.caseId=" + caseID + "&tw.local.tosName=" + theOS;
    alert (url);
    return url;

    ------------------------------
    DAVE PERMAN
    ------------------------------



  • 3.  RE: Display custom case details page having client side human service

    Posted Mon February 14, 2022 12:43 PM
    Also note that in BAW v21.x we do this for you when you choose the option to create your case pages using the new Client-side Human Service option. You design your custom case CSHS page in the case types/views area and choose it in the case types/page layouts section. A default adapter page will be used to host the CSHS in the Case Client UI and will handle passing the required input parameters to the CSHS.

    ------------------------------
    DAVE PERMAN
    ------------------------------



  • 4.  RE: Display custom case details page having client side human service

    Posted Mon February 14, 2022 01:43 PM
    Hi Gaurav,

    Try this Packages.com.lombardisoftware.core.config.TWConfiguration.getInstance().getServer(); 

    var server = Packages.com.lombardisoftware.core.config.TWConfiguration.getInstance().getServer();
    server.getServerHost() - This gives the Host Name of the BPM server.
    server.getServerPort() - This gives the port of the BPM server

    ------------------------------
    Ahmed Ibrahim
    ------------------------------



  • 5.  RE: Display custom case details page having client side human service

    Posted Tue February 15, 2022 01:17 PM
    In a clustered environment or even just one where there's a Web server in front of WAS, I am not sure this approach will give you what you want, especially given the fact that you want to include the link on some other website. I realize using environment variables implies a bit of administrative maintenance - but wouldn't it be better to use that option instead?

    ------------------------------
    Eric Ducos
    ------------------------------