How to add an "Code" activity?

Aug 5, 2009 at 9:26 AM

How to add an "Code" activity?

Coordinator
Aug 5, 2009 at 3:33 PM

Add the Step actitivy first , and then you can add any activity into step activity.

Aug 5, 2009 at 3:43 PM

Thanks, it works fine. Another question, do you have a good way to log the execution time of all workflow steps?

Coordinator
Aug 6, 2009 at 1:34 AM

log the execution time of all workflow steps? you mean that the full execution time the workflow?

you can try the Initialized event and the Completed event .

by add a field to the workflow class , such as BeginTime , and in the Initialized event of the workflow you can set BeginTime=DateTime.Now,

in the Completed event of the workflow you can get the time range:
TimeSpan executionTime = DateTime.Now-BeginTime. 

or if you want to log the execution time of a singe step , you can do it by the same two events of the step(Task,GroupTask or Step).