BPM, Workflow, and Case

 View Only
  • 1.  Calling service flows from onChange Event

    Posted Tue April 16, 2024 01:05 PM

    Hello everyone, I hope you are all doing well.

    Please, I'm looking for help. I want to call a service flow during the onchange event (when the value of a field variable1 changes, I call the service flow (ServiceECM) ) on BAW. Is there a way to do this? If anyone has done it before, can you please share an example with me?

    Thank you.



    ------------------------------
    El Mehdi ES-SAFI
    ------------------------------


  • 2.  RE: Calling service flows from onChange Event

    Posted Wed April 17, 2024 02:41 AM

    Hi El Mehdi,  You can create a listener in view for onchange of variable1  then call the service as explained in https://www.ibm.com/docs/en/bpm/8.5.0?topic=views-calling-ajax-services-from-coach



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



  • 3.  RE: Calling service flows from onChange Event

    Posted Wed April 17, 2024 02:58 AM

    Hi Ahmed ,

    Thank you for taking the time to respond to me. I found a solution that meets my needs: I added a hidden button and added this line of code( ${Button1}.click(); ) to the onchange event of variable1. It's working like magic!



    ------------------------------
    El Mehdi ES-SAFI
    ------------------------------



  • 4.  RE: Calling service flows from onChange Event

    Posted Thu April 18, 2024 09:52 AM
    Edited by DAVE PERMAN Thu April 18, 2024 09:52 AM

    Also check out the Navigation Event UI View which was designed specifically for that purpose.

    Like button UI Views, they also show up when selecting the view that triggers the outbound boundary events from the page.



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



  • 5.  RE: Calling service flows from onChange Event

    Posted Fri April 19, 2024 03:49 AM

    Oh, thank you Dave for your response. Yes, that's exactly it. Instead of using a button and hiding it, I should use the Navigation Event Thank you so much for your help



    ------------------------------
    El Mehdi ES-SAFI
    ------------------------------



  • 6.  RE: Calling service flows from onChange Event

    Posted Fri April 19, 2024 05:02 AM

    You could also use a ServiceCall component, completely avoiding having to navigate in the flow of the diagram. Simply bind a Service Call component to your service, and call it from the change event like:

    {MyServiceCall}.execute(reqObj);
    Simply build your reqObj before, in this case reqObj is a complex object. The only downside with serviceCall is that you only can have one input variable, but you can just create reqObj business objects in your application.

    By "hiding" the service in a ServiceCall instead of NavigationEvent, you avoid your cshs diagrams being cluttered.



    ------------------------------
    Johan Andersson
    Johan.andersson@apendo.se
    ------------------------------