Here's the setup:
I have a message that comes into a workflow, correlated based on time. All messages in a certain timeframe are correlated. While processing a message, I will never know if it is the last one for that particular correlation set. The indicator of the completion of particular correlation set is receiving a message in the next correlation set. Because it is time based, there will never be more than a single active correlation set.
Is there a best practice for house cleaning the old correlation instances? Should I even care? Does Neuron have some housecleaning functionality I could use to retire dormant instances after X days?
The best I've come up with so far is to add a branch inside the loop that receives messages looking for a special property that will terminate the loop, and therefore should terminate that instance because the loop is the entire flow. When the workflow detects it is the first run for a new correlation, it will then publish a message to itself with the previous correlation id and the special property to shut it down.
Tags: correlated, correlation, correlationset, workflow
hi,
if you have a loop with a correlated receive inside of it, you need to have some logic within the loop that determines when to exit the loop so that you don't have a zombie workflow laying around. for instance, you could have a timeout activity....if no other like message is received within a period of time it exits.
I have added a Timeout from the Control Flow section of the toolbox, however I don't seem to be able to correctly specify a timeout parameter.
I'm assuming the requested input is HH:MM:SS, ie: 04:00:00 is a timeout value of 4 hours. Using this value appears to work (in the Explorer) without issue. However, when I adjust the parameter to a value more correct for our process (240 hours) something replaces 240:00:00 with 240.00:00:00, and the timeout then creates an exception attempting to parse the value. Is there a known way I can set the value of the timeout to be multiple days long?
Neuron ESB Product Support Forums and Communities
© 2024 Created by Neuron Admin. Powered by