done event - WeOnlyDo Discussion board

done event (wodFtpDLX / wodFtpDLX.NET)

by scot e styer, Monday, June 23, 2014, 19:59 (2038 days ago)

I'm trying to send a files to an ftp site
once the file is there
I want to update the transactions, in that file... to a "sent" status.
and, then... print a report, based upon what was sent.

now... I'm having to try and do this, in a Done Event.
I need this to work in order... instead of all at once.

I know the done event will fire, when it finishes putting a file to the ftp
site.. or, when the connection is established
Is there anything else, that may cause the done event to fire?

I'm trying to create some kind of order, in the operation
by having a variable, in the event... that increments with each step
I know this is probably a odd way of doing this... but, I couldn't think of
anything else
sometimes... it's hitting the report, before it seems to have updated the records
any ideas?

something like this

if p_state = 1 then
p_state = 5

if p_state = 5
update the records to sent
retrieve and print report
p_state = 7
end if

if p_state = 7
p_state = 9

done event

by wodSupport, Tuesday, June 24, 2014, 10:08 (2038 days ago) @ scot e styer


it's hard to say what is the problem without trying. I assume you're using Blocking = False. If so

if p_state = 1 then
p_state = 5

then this code would execute p_state = 5 too soon, you should rather set p_state inside Done event.

Also, note that MakeDir, DeleteFile etc.. also trigger Done event. Not sure if you're using them or not.