use of org.kie.api.time.SessionClock in project drools by kiegroup.
the class GetSessionTimeCommand method execute.
@Override
public Long execute(Context context) {
KieSession ksession = ((RegistryContext) context).lookup(KieSession.class);
SessionClock sessionClock = ksession.<SessionClock>getSessionClock();
long result = sessionClock.getCurrentTime();
ExecutionResultImpl results = ((RegistryContext) context).lookup(ExecutionResultImpl.class);
if (results != null) {
results.getResults().put(this.outIdentifier, result);
}
return result;
}
Aggregations