How to get Bot start time within a workflow


#1

I have a custom activity and added to my workflow. While executing, the bot must write the start time of the workflow to a text file. How can i get the start time within my custom activity and write to output.


#2

DateTime.Now.ToString() gets you the current time and date


#3

I need the start time of the workflow instead of the current time. How can i get when the workflow execution started?


#4

@dineshary I’m not sure that’s a necessary add-on to your custom activity. You can just use an Assign activity at the beginning of your workflow to mark Now.ToString.


#5

assign it in the starting of the workflow as @pathLessTaken said above


#6

I am building a custom activity which can be used by anyone in their workflow. Cant force to add an assign activity to the users.

So i am searching for a way to get the properties of a particular execution


#7

@dineshary

If I understood correctly, you are building a custom activity and need to have property to capture the Start execution time of your activity?
Where does your custom activity derive from? CodeActivity or NativeActivty or AsyncCodeActivty


#8

Yes… right

I am using native activity