« Return to the blog entry
What I have done in the past is break the task up into manageable chunks - means more code but better user experience.
1) Run agent to return the number of documents to process
2) Use the return to calculate number of docs in 10%.
3) Call the process agent and pass the number docs to process (10%) as a parameter.
4) Upon completion of the 10% update the visual indicator for the user that 10% is complete and trigger the process agent again with 10% to process.
5) repeat 9 more times
This provides feedback to the user and also cuts down the run-time for each individual agent.
I have to say though Tim's method sounds way cooler!
What I have done in the past is break the task up into manageable chunks - means more code but better user experience.
1) Run agent to return the number of documents to process
2) Use the return to calculate number of docs in 10%.
3) Call the process agent and pass the number docs to process (10%) as a parameter.
4) Upon completion of the 10% update the visual indicator for the user that 10% is complete and trigger the process agent again with 10% to process.
5) repeat 9 more times
This provides feedback to the user and also cuts down the run-time for each individual agent.
I have to say though Tim's method sounds way cooler!