Cloud Pak for Integration

 View Only
Expand all | Collapse all

Using Timer nodes in ACE in CP4I

  • 1.  Using Timer nodes in ACE in CP4I

    IBM Champion
    Posted Tue April 25, 2023 10:58 PM

    Hi,

    I have a requirement to poll an Oracle database every 5 minutes to fetch data, Is it possible to use TimerNode in ACE deployed in CP4I environment? if it is possible, what will happen when the pod restarts, will it be able to do the trigger automatically or manual intervention is needed?




    ------------------------------
    Thanks,
    Santhosh Ramanathan
    ------------------------------


  • 2.  RE: Using Timer nodes in ACE in CP4I

    Posted Thu April 27, 2023 10:32 AM

    You can use there TimerNode, but it would be 5 minutes from when the flow starts.  So if the Pod restarts, it will be 5 minutes from the restart.  Probably not ideal.  You could use OCP's Cron to kick off a flow for you.  Or you could use a little java program under OpenLiberty to poll on the times you want using the @Service annotation and TimerService.

    Brian



    ------------------------------
    Brian S Paskin
    Sr. Technology Engineer
    IBM Cloud Engineering
    ------------------------------



  • 3.  RE: Using Timer nodes in ACE in CP4I

    IBM Champion
    Posted Fri April 28, 2023 09:47 AM

    Hello
    Will it not trigger immediately on the restart, then trigger again after 5 minutes?

    Kjetil



    ------------------------------
    Kjetil Svihus
    ------------------------------



  • 4.  RE: Using Timer nodes in ACE in CP4I

    Posted Mon May 01, 2023 09:41 AM

    Hi, I guess it depends on how it is setup.  The flow can be setup to try the DB first then wait 5 minutes or vice versa.

     

    Brian

     

     






  • 5.  RE: Using Timer nodes in ACE in CP4I

    Posted Mon May 01, 2023 03:17 PM

    You could use ACE designer with a scheduler and also use Oralace database to do a check. Scheduler could configure whether invoke the flow at first start as shown below:



    ------------------------------
    Gang Wu
    ------------------------------



  • 6.  RE: Using Timer nodes in ACE in CP4I

    Posted Tue May 09, 2023 06:11 AM

    Hi @Gang Wu 

    Is there even a chance to configure the scheduler without using the web based ACE designer but the toolkit instead?
    How to configure such a scheduler in an automated way without using the web based UI?

    Kind regards
    Jan



    ------------------------------
    Jan Frederik Sorge
    ------------------------------



  • 7.  RE: Using Timer nodes in ACE in CP4I

    Posted Tue May 09, 2023 09:15 AM

    There are lots of connectors in the Designer that are not in the Workbench and some in the Workbench that are not in the Designer.  What you can do is create a Java node that gets executed when the Flow starts.  You can then use java.util.Timer  to set a schedule the timer.

    Brian



    ------------------------------
    Brian S Paskin
    Sr. Technology Engineer
    IBM Cloud Engineering
    ------------------------------



  • 8.  RE: Using Timer nodes in ACE in CP4I

    Posted Tue May 09, 2023 09:33 AM
    Edited by Jan Frederik Sorge Tue May 09, 2023 09:45 AM

    Hi @Brian S Paskin 

    Thanks a lot for your very quick reply and suggestion! Those different functionality sounds a bit like a topic for the "IBM App Connect early eXperience program" and I will try to address it there as I would have expected some functionality within both "IDE".
    Where can I find more information as my search for "scheduler" did not bring anything up at IBM App Connect Enterprise 12.0 - IBM Documentation?

    Kind regards
    Jan



    ------------------------------
    Jan Frederik Sorge
    ------------------------------



  • 9.  RE: Using Timer nodes in ACE in CP4I

    IBM Champion
    Posted Tue May 09, 2023 09:24 AM

    How we did it in the toolkit was creating a service that schedule runs. So we have a database with last run, when to run, and which integration to run. Then created some code in the service that checks that database for scheduled runs. The service is triggered by the timer node every minute. Simpler way to do it, is by trigger the integration with the timer node, then use an esql node to check if the current time is when you actually want to trigger it. 

    Regards,
    Kjetil



    ------------------------------
    Kjetil Svihus
    ------------------------------



  • 10.  RE: Using Timer nodes in ACE in CP4I

    Posted Tue May 09, 2023 09:44 AM

    Hi @Kjetil Svihus 

    Thanks a lot for your very quick reply and suggestion! From my work experience I've already build something similar to that already as it has reduced the requirement of the TimeoutNotification node to only one single instance as this single service was able to launch all the other services depending on its internal scheduling table. Anyhow it still has the dependency that even the single TimeoutNotification node relies on MQ (see Configuring timeout flows - IBM Documentation).

    Kind regards
    Jan



    ------------------------------
    Jan Frederik Sorge
    ------------------------------