<?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 Re: Unable to use Date Object in Script Task in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-use-date-object-in-script-task/m-p/116185#M81964</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try fully-qualifying the "new Date()" -&amp;gt; "new java.util.Date()", as "new Date()" is a javascript-type…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Aug 2012 13:21:24 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2012-08-01T13:21:24Z</dc:date>
    <item>
      <title>Unable to use Date Object in Script Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-use-date-object-in-script-task/m-p/116184#M81963</link>
      <description>Hi,When I try to use a Date object (javascript) in a script task I get the following exception:–com.vaadin.event.ListenerMethod$MethodExceptionCause: com.vaadin.event.ListenerMethod$MethodExceptionCause: org.activiti.engine.ActivitiException: coudn't deserialize value 'sun.org.mozilla.javascript.int</description>
      <pubDate>Wed, 01 Aug 2012 11:56:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-use-date-object-in-script-task/m-p/116184#M81963</guid>
      <dc:creator>caiw</dc:creator>
      <dc:date>2012-08-01T11:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to use Date Object in Script Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-use-date-object-in-script-task/m-p/116185#M81964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try fully-qualifying the "new Date()" -&amp;gt; "new java.util.Date()", as "new Date()" is a javascript-type…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 13:21:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-use-date-object-in-script-task/m-p/116185#M81964</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-08-01T13:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to use Date Object in Script Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-use-date-object-in-script-task/m-p/116186#M81965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you, that worked better!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I need to convert the date to ISO-8601 format to use it in a TimerCatchingEvent, as Time date.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the same script task as before, I tried using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var timeDate = tD.toISOString();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but got the following exception:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;–&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cause: com.vaadin.event.ListenerMethod$MethodException&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cause: org.activiti.engine.ActivitiException: problem evaluating script: sun.org.mozilla.javascript.internal.EcmaError: TypeError: Cannot find function toISOString. (#41) in&amp;nbsp; at line number 41&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1193)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.vaadin.ui.Button.fireClick(Button.java:539)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.vaadin.ui.Button.changeVariables(Button.java:206)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1299)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1219)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:735)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.lang.Thread.run(Thread.java:662)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Caused by: com.vaadin.event.ListenerMethod$MethodException&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cause: org.activiti.engine.ActivitiException: problem evaluating script: sun.org.mozilla.javascript.internal.EcmaError: TypeError: Cannot find function toISOString. (#41) in&amp;nbsp; at line number 41&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1193)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.explorer.ui.form.FormPropertiesForm.access$000(FormPropertiesForm.java:46)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.activiti.explorer.ui.form.FormPropertiesForm$1.buttonClick(FormPropertiesForm.java:145)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.lang.reflect.Method.invoke(Method.java:597)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; … 22 more&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;–&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried different browsers (that are supposed to support Date.prototype.toISOString) but I get the same exception every time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there another way to convert a date object to ISO-format for use in the TimerCatchingEvent?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;caiw&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 12:04:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-use-date-object-in-script-task/m-p/116186#M81965</guid>
      <dc:creator>caiw</dc:creator>
      <dc:date>2012-08-02T12:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to use Date Object in Script Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-use-date-object-in-script-task/m-p/116187#M81966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You could write a java-class that does this and instantiate it from JavaScript or alter the ScriptBindings, activiti uses to expose additional java-objects on top of the process-variables that are present now…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 12:58:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-use-date-object-in-script-task/m-p/116187#M81966</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-08-02T12:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to use Date Object in Script Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-use-date-object-in-script-task/m-p/116188#M81967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;And by the way, the Javascript is executed on the server, so it doesn't matter what browser you use to access the Vaadin-app anyway…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 12:59:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-use-date-object-in-script-task/m-p/116188#M81967</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-08-02T12:59:32Z</dc:date>
    </item>
  </channel>
</rss>

