AnsweredAssumed Answered

problem with set system time to workflow property

Question asked by addonin on Aug 14, 2012
Latest reply on Aug 14, 2012 by addonin
Hello!
Excuse me for possible language mistakes, I am not native speaker.
I make workflow and encountered with problem. I have property in content model:

<aspect name="astItRequest:requestProperties">
      <properties>
                     <property name="astItRequest:date">
                     <title>Some date</title>
                     <type>d:date</type>
                     </property>
………………………

And I use same property in workflow model (through aspect):

<type name="astItRequestWorkflowModel:submitRequestTask">
   <parent>bpm:startTask</parent>
   <mandatory-aspects>
      <aspect>astItRequest:requestProperties</aspect>
……………………….

Then I start workflow, I try to set "astItRequest:date" property with real time:

<start-state name="start">
    <task name="astItRequestWorkflowModel:submitRequestTask" swimlane="initiator" />
    <transition name="" to="request">
   <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
      <runas>admin</runas>
      <script>
         &lt;
                            var date = new Date();
                            executionContext.setVariable("astItRequest_date", date);
                            logger.log(executionContext.getVariable("astItRequest_date")); // just for output in catalina.out
                        &gt;            
      </script>
   </action>
</transition>

and receive next error (in catalina.out):

2012-08-07 05:30:45,542  DEBUG [repo.jscript.ScriptLogger] [http-8080-46] org.alfresco.service.cmr.workflow.WorkflowException: 07070163 Failed to signal transition null from workflow task jbpm$658

I don`t understand why I can`t do it, any suggestions? Maybe data type in content model and data type in workflow are not same types?
Thanks for help.

Outcomes