<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Where did ClockUtil go in 5.15.1? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/where-did-clockutil-go-in-5-15-1/m-p/149154#M104163</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We were using ClockUtil.getCurrentTime() to get the current time from the Activiti process engines. This seemed like a good idea at the time, in case any unit tests set a new current time on the engine. I have changed my code to use new Date() instead, so it's not a showstopper, but clearly there is a gap. Does anyone have any ideas on the new way to do this, or is it functionality that has been deliberately removed? (It would have been nice to have something called out in the release notes).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nick.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Apr 2014 16:51:15 GMT</pubDate>
    <dc:creator>njames</dc:creator>
    <dc:date>2014-04-09T16:51:15Z</dc:date>
    <item>
      <title>Where did ClockUtil go in 5.15.1?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/where-did-clockutil-go-in-5-15-1/m-p/149154#M104163</link>
      <description>Hi,We were using ClockUtil.getCurrentTime() to get the current time from the Activiti process engines. This seemed like a good idea at the time, in case any unit tests set a new current time on the engine. I have changed my code to use new Date() instead, so it's not a showstopper, but clearly there</description>
      <pubDate>Wed, 09 Apr 2014 16:51:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/where-did-clockutil-go-in-5-15-1/m-p/149154#M104163</guid>
      <dc:creator>njames</dc:creator>
      <dc:date>2014-04-09T16:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Where did ClockUtil go in 5.15.1?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/where-did-clockutil-go-in-5-15-1/m-p/149155#M104164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Nick,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ClockUtil&amp;nbsp; was replaced by Clock and ClockReader interfaces. Their implementation is DefaultClockImpl. You can get/set clock for process engine with org.activiti.engine.ProcessEngineConfiguration#getClock (setClock) methods.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 06:18:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/where-did-clockutil-go-in-5-15-1/m-p/149155#M104164</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2014-04-10T06:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Where did ClockUtil go in 5.15.1?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/where-did-clockutil-go-in-5-15-1/m-p/149156#M104165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Martin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the info. Does the following look right to you?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Autowired&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private transient ProcessEngine processEngine;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public Date getCurrentDate() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; final ProcessEngineConfigurationImpl processEngineConfiguration = ((ProcessEngineImpl) processEngine).getProcessEngineConfiguration();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return processEngineConfiguration.getClock().getCurrentTime();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a better alternative than the cast to ProcessEngineImpl?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nick.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 21:44:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/where-did-clockutil-go-in-5-15-1/m-p/149156#M104165</guid>
      <dc:creator>njames</dc:creator>
      <dc:date>2014-04-10T21:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Where did ClockUtil go in 5.15.1?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/where-did-clockutil-go-in-5-15-1/m-p/149157#M104166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Nick,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;May be you can autowire ProcessEngineImpl.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ProcessEngineConfiguration should be enough.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2014 05:55:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/where-did-clockutil-go-in-5-15-1/m-p/149157#M104166</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2014-04-11T05:55:04Z</dc:date>
    </item>
  </channel>
</rss>

