I use an I/O argument to capture the count of files in Process, then send an email with the number of files in the Close State. The activities in Process can sometimes fail and so i added try catch to have go back to the previous state when error occurs.
The problem (I think) is that whenever it goes back to the login state, the counter is reset to 0. So I end up not getting the correct count when I get the email. The default counter in the main is 0, but it shouldn’t matter, should it?
When it errors out, I thought it should still have the count that it has from Process, say counter = 10, so when it goes back to the previous state, it logs in and then go into Process again with the counter = 10 in place and add onto it.