Time after time (broke timers don't work)

Time after time (broke timers don't work)

I was going to start this post with comparisons on versions of "time after time" - by Cyndi Lauper. Her original was great.

I know Pink has done a version.?

I think my favorite is Matchbox 20.

Then I realized that maybe not everyone has even heard of Cyndi Lauper.

And that song that I was going to reference was written in 1984. So before some of my readers were born.? So they might not have the same attachment and affection for the song as I do.

So may not work as a great intro to IIB timer nodes.

It might be more appropriately titled - "Broke timers don't work".

So not a node that teams always use, but it does come up from time to time.


They are, as the name would suggest, generally triggering asynchronous processes (usually) outside the flow that is being developed.

Which makes them challenging to test and develop test cases for. specially if the flow triggers an event "10 minutes from now". That would be challenging to write a integration test for.

To make sure that teams are making use of the nodes in a logical way, and to help with the testing challenge, we added some new rules to support them.


So an example of this would be the process when someone opens a new back account.

In our "open back account" flow, we have a "TimeoutControl" that is triggered to notify the marketing department to send out a mug, using an event (unique identifier) of "SendMug".

Our "send a mug" flow, which is triggered by the "SendMug" event (unique identifier), then starts and sends out a mug to our new customer.

For this to work, both flows need to communicate using the "SendMug" unique identifier.

The two nodes we are looking at is the "TimeoutNotification" node, which is what process should run when the event is triggered.

To help make sure this works as expected, for the "TimeoutNotification" node we added this rule:

R465 - TimoutNotification node Unique Identifier never defined in TimeoutControl (WMB)

So this indicates that we when scanned through the source code, we couldn't find anything that will trigger this node. So the logic or process that you want this node to execute will never run.

The other node that is required is the "TimeoutControl" node. This is the process that generates the event to run the login defined above.

For this, we have a new rule?

R466 - TimoutControl node Unique Identifier not used by TimoutNotification (WMB)

So this indicates that the event that we are going to generate does not trigger any process.


The final rule that we added is:

R467 - Multiple TimeoutNotifications for the same Identifier (WMB)

This one may be a little less obvious.

If we have a timer event generated and we want to things to happen, we can have two notifications ?

It might be a little confusing but no harm right ?

It would be confusing to have processing events split across flows. But it would also not work as expected.

The main reason for this is that the timeout node events are based on the use of an internal queue - "SYSTEM.BROKER.TIMEOUT.QUEUE".?When an event is generated, this queue would only have a single event on it, so once consumed, the second notification?would not be triggered.

So the logic of having two TimeoutNotifications is broken.


I hope that you enjoyed this post and maybe even reminisced a bit.


More information on our products and on pricing can be found on our website:

https://bettercodingtools.com


You can also reach me via email at:

[email protected]


Or contact me via the contact page on our website:

www.bettercodingtools.com/contact


Regards

Richard


Sanjay Nagchowdhury

Development Team Lead IBM App Connect Enterprise at IBM Hursley Laboratories

1 年

Check out the new Scheduler node that we have added in ACE 12.0.9 https://youtu.be/mDZt0t9Noyg

要查看或添加评论,请登录

Richard Huegill的更多文章

  • Opaque parsing and performance

    Opaque parsing and performance

    A while back I was asked what our tooling could do to help improve performance for ACE/IIB code. Whether that means…

    4 条评论
  • Embedding DrawIO IIB/WMB/ACE flow diagrams in Confluence

    Embedding DrawIO IIB/WMB/ACE flow diagrams in Confluence

    Happy New Year My last demonstration was all the way back in time, 2024, almost 3 months and 4 hangovers ago. Or 3…

  • Apologies for the broken webinar

    Apologies for the broken webinar

    So last week we attempted to do a webinar on creating Confluence pages to summarize WMB/IIB/ACE code. Unfortunately…

  • Something I don't know too much about

    Something I don't know too much about

    It's ACE and Java classLoader's (but I'm sure friends will be able to point out many others). Actually this is only…

  • Confluence page generation for IIB/WMB/ACE applications

    Confluence page generation for IIB/WMB/ACE applications

    The larger an organization becomes, the more challenging that it is for an organization to manage is combined knowledge…

    2 条评论
  • WMB / IIB / ACE GitLab pages (with sound this time)

    WMB / IIB / ACE GitLab pages (with sound this time)

    The recent version 17 release of GitLab has added GitLab pages. Last week we did a live demo on using GitLab Pages to…

    2 条评论
  • GitLab Pages and IIB

    GitLab Pages and IIB

    The recent version 17 release of GitLab has added some enhancements and fixed some issues. On the of the newer features…

  • SonarQube 10.6 released

    SonarQube 10.6 released

    SonarSource recently a new version of their Sonarqube platform - SonarQube 10.6 For us, we have to update some of build…

  • Squid's (not the game)

    Squid's (not the game)

    When I develop code, I have never gotten it write first time. This is compounded when you work integration tooling.

  • Information radiators for IIB/ACE/WMB projects managed in GitLab

    Information radiators for IIB/ACE/WMB projects managed in GitLab

    Some of the functionality that we have in our plugin is more the "art" side of software engineering then the hard…

社区洞察