How to get Start Time of a process and End tome of a process and pass it into library.
Do we need to create a variable in the Reframework or do we can do That via library?
How to get Start Time of a process and End tome of a process and pass it into library.
Do we need to create a variable in the Reframework or do we can do That via library?
Hey,
I think that you need two variable:
to both you need to assign DateTime.Now.ToString()
You can take assign activity at start of the process
startTime= DateTime.Now
Take another assign acitivity at end of the process
endTime= DateTime.Now
Regards,
Can’t we just pass it in library?
=> Define Arguments in the Library Workflow: In the library workflow, define two In
arguments to receive the start and end times.
Argument Name: in_StartTime
Direction: In
Type: DateTime
Argument Name: in_EndTime
Direction: In
Type: DateTime
=> Invoke Library Workflow in Main Process: In your main process, use the Invoke Workflow
activity to call the library workflow. Pass the start and end times as arguments.
WorkflowFileName: "Path\To\Your\LibraryWorkflow.xaml"
Arguments:
in_StartTime: dt_StartTime
in_EndTime: dt_EndTime
=> Receive and Use Arguments in Library Workflow: In your library workflow, you can now use the in_StartTime
and in_EndTime
arguments to perform any necessary operations.
Log Message: "Start Time in Library: " + in_StartTime.ToString("yyyy-MM-dd HH:mm:ss")
Log Message: "End Time in Library: " + in_EndTime.ToString("yyyy-MM-dd HH:mm:ss")
Regards,
Do you mean creating the library to retrieve datetime?
Can you explain what you mean?
For what you need these details?
ideally you need to pass because the activity will complete after the step and will not retain the values
cheers
So I need the to know the run time of RE process. The way we get in an Output panel and save it on excel
Hi @pikorpa I want to get runtime of RE Process in Library. I know we can pass the variable is there any alternative way we can do it?
then use datetime.Now at the start and end of process and save it to variables…and use them
cheers
If I need to get the execution Time between both what should we do? Can you share variable type also?
Variable type would be datetime
you can get the difference between both the variables
(EndTime-StartTime).TotalMinutes
till give the elapse time in minutes in double format
cheers
From your description is not clear if:
you can check if calling ORC Rest Api can serve your use case
StartTime - TimeSpan type variable
Get start time while starting the workflow System.DateTime.Now.TimeOfDay into the StartTime variable.
On the end of the workflow you can get how long the process took (in seconds, minutes etc.):
System.DateTime.Now.TimeOfDay.Subtract(StartTime).TotalSeconds
It’s give you actual time it is executed.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.