Package com.yworkflow.common.clock
Interface WorkflowClock
public interface WorkflowClock
Provides time-related functionality for the yWorkflow engine. WorkflowClock allows for
customizable time handling, which is particularly useful for testing scenarios where you need to
control time progression or for applications that need to work with specific time zones or clock
sources.
The default implementation uses the system clock, but custom implementations can be provided to support different time sources, time zones, or testing scenarios where time needs to be controlled or mocked.
WorkflowClock is used throughout the workflow engine for timestamp generation, scheduling, and time-based operations. It can be configured when building the workflow engine to ensure consistent time handling across all operations.
- Since:
- 1.0
-
Method Summary
-
Method Details
-
now
Returns the current instant according to this clock. The default implementation returns the current system time.- Returns:
- the current instant
-