cancel
Showing results for 
Search instead for 
Did you mean: 

Execute script for workflow in rule not working

sinche
Champ in-the-making
Champ in-the-making
Am working on Alfresco Version: Community - v3.3.0 (2132). Am trying to initiate advanced workflow via running rules. The options tried in this front are:
1. On adding content to a space, assign task to a single user
2. On adding content to a space, assign task to multiple users
3. On adding content to a space, assign task to a group

The 1st option has worked successfully, but while executing the 2nd and the 3rd option I am getting the below error
A system error happened during the operation: 09070011 Failed to execute script 'workspace://SpacesStore/fb53bbfe-36d7-42dc-ba59-e5f6185bdbb6': null


The scripts used is as per the information given in the below mentioned link
http://forums.alfresco.com/en/viewtopic.php?f=34&t=10441&st=0&sk=t&sd=a&start=15

Code for group review is as follows:

var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "jbpm$wf:parallelgroupreview";
workflow.parameters.requiredApprovePercent = 20;
workflow.parameters["bpm:workflowDescription"] = "Please review and approve: " + document.name;
workflow.parameters["bpm:groupAssignee"] = people.getGroup("GROUP_mygroup");
var futureDate = new Date();
futureDate.setDate(futureDate.getDate() + 7);
workflow.parameters["bpm:workflowDueDate"] = futureDate;
workflow.execute(document);

More detailed log is as follows:
17:46:35,393 User:216834 ERROR [ui.common.Utils] A system error happened during the operation: 09070005 Failed to execute scri
pt 'workspace://SpacesStore/fb53bbfe-36d7-42dc-ba59-e5f6185bdbb6': null
org.alfresco.scripts.ScriptException: 09070005 Failed to execute script 'workspace://SpacesStore/fb53bbfe-36d7-42dc-ba59-e5f61
85bdbb6': null
        at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:228)
        at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:187)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.ja
va:40)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodIn
terceptor.java:49)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy221.executeScript(Unknown Source)
        at org.alfresco.repo.action.executer.ScriptActionExecuter.executeImpl(ScriptActionExecuter.java:170)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:127)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:711)
        at org.alfresco.repo.action.executer.CompositeActionExecuter.executeImpl(CompositeActionExecuter.java:72)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:127)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:711)
        at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:648)
        at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:510)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.ja
va:40)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodIn
terceptor.java:49)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy23.executeAction(Unknown Source)
        at org.alfresco.repo.rule.RuleServiceImpl.executeRule(RuleServiceImpl.java:928)
        at org.alfresco.repo.rule.RuleServiceImpl.executePendingRule(RuleServiceImpl.java:896)
        at org.alfresco.repo.rule.RuleServiceImpl.executePendingRulesImpl(RuleServiceImpl.java:867)
        at org.alfresco.repo.rule.RuleServiceImpl.executePendingRules(RuleServiceImpl.java:840)
        at org.alfresco.repo.rule.RuleTransactionListener.beforeCommit(RuleTransactionListener.java:63)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.doBeforeCommit(AlfrescoTran
sactionSupport.java:716)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.doBeforeCommit(AlfrescoTran
sactionSupport.java:696)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransa
ctionSupport.java:656)
        at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizat
ionUtils.java:48)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTran
sactionManager.java:835)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactio
nManager.java:645)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManage
r.java:632)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAsp
ectSupport.java:314)
        at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:467)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:340)
        at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:130)
        at org.alfresco.web.bean.dialog.DialogManager.finish(DialogManager.java:534)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
        at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
        at javax.faces.component.UICommand.broadcast(UICommand.java:109)
        at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
        at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:110)
        at sun.reflect.GeneratedMethodAccessor522.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:1
22)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy204.doFilter(Unknown Source)
        at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:88)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:74)
        at sun.reflect.GeneratedMethodAccessor522.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:1
22)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy204.doFilter(Unknown Source)
        at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:88)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
        at org.alfresco.repo.workflow.StartWorkflowActionExecuter.executeImpl(StartWorkflowActionExecuter.java:153)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:127)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:711)
        at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:648)
        at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:510)
        at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:498)
        at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:719)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.ja
va:40)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodIn
terceptor.java:49)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy23.executeAction(Unknown Source)
        at org.alfresco.repo.jscript.ScriptAction.execute(ScriptAction.java:144)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
        at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)
        at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)
        at org.mozilla.javascript.gen.c1._c0(workspace://SpacesStore/fb53bbfe-36d7-42dc-ba59-e5f6185bdbb6:9)
        at org.mozilla.javascript.gen.c1.call(workspace://SpacesStore/fb53bbfe-36d7-42dc-ba59-e5f6185bdbb6)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
        at org.mozilla.javascript.gen.c1.call(workspace://SpacesStore/fb53bbfe-36d7-42dc-ba59-e5f6185bdbb6)
        at org.mozilla.javascript.gen.c1.exec(workspace://SpacesStore/fb53bbfe-36d7-42dc-ba59-e5f6185bdbb6)
        at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:457)
        at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:224)
        … 112 more

Am more interested in getting it working for wfSmiley Tonguearallelgroupreview rather than wfSmiley Tonguearallelreview. But neither of them are currently working. Anyone can help me on this ?
2 REPLIES 2

raeshelly
Champ in-the-making
Champ in-the-making
http://cms-howto.blogspot.com/2009/11/api-javascript-samples-in-alfresco.html

By default reviewpooled, parallelreview and parallelreview_group are not active, you have to rename the file workflow-context.xml.sample to workflow-context.xml in /tomcat/shared/../extension. Then you can use the workflow.

tejaswini
Champ in-the-making
Champ in-the-making
i am trying to have advanced Workflow model so i done as

1)under config\alfresco\extension i am having
                     message\GlobalWorkflow-message.properties
                     model\GlobalWorkflowModel.xml
                     someco-model-context.xml
                     scWorkflow.properties

the content of files are
a)GlobalWorkflowModel.xml

<namespaces>
      <namespace uri="com.global.workflow.model" prefix="global"/>
   </namespaces>   
   <types>
    <type name="global:reviewTask">
        <parent>bpm:startTask</parent>
         <properties>
          <property name="global:nurse_id">
              <title>Nurse No.</title>
            <type>d:int</type>
          </property>           
            <property name="global:assignment_id">
               <title>Assignment No</title>
            <type>d:int</type>
         </property>
            <property name="global:nurse_name">
            <title>Nurse Name</title>
               <type>d:text</type>
             </property>
          <property name="global:is_birthcert">
               <title>Birth Certification</title>
            <type>d:boolean</type>           
         </property>
         <property name="global:license_expiration_date">
               <title>License Expiration Date</title>
            <type>d:date</type>           
         </property>
         <property name="global:is_driver_licence">
               <title>Driver license</title>
            <type>d:boolean</type>           
         </property>
             <property name="global:wfDescription">
           <type>d:text</type>      
             </property>
 
         </properties>
      
         <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
     </type>    
   <type name="global:submitReviewTask">
          <parent>global:reviewTask</parent>
         <overrides>
            <property name="global:nurse_id">
            </property>
         <property name="global:assignment_id">
            </property>
         <property name="global:nurse_name">
            </property>
         <property name="global:is_birthcert">
            </property>
         <property name="global:license_expiration_date">
            </property>
         <property name="global:is_driver_licence">
            </property>
           <property name="global:wfDescription">
            </property>
         </overrides>
    </type>
   </types> 

b)Global-review-processdefination.xml
<?xml version="1.0" encoding="UTF-8"?>
<!–  Filename: Global-review-processdefinition.xml
     Description: This file describes entry of the model,property file and Workflow file
     Author: Amita Bhandari
–>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="global:documentReview">

    <swimlane name="initiator"></swimlane>

    <swimlane name="assignee">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <actor>#{bpm_assignee}</actor>
      </assignment>
   </swimlane>

    <start-state name="start">
        <task name="global:reviewTask" swimlane="initiator" />
        <transition name="" to="startreview"/>
    </start-state>

    <node name="startreview" >
      <event type="node-enter">
          <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <script>
               <variable name="startDate" access="write,read"/>
                  <expression>
                         new Date();
                  </expression>
            </script>           
          </action>
        </event>
      
        <transition name="review" to="review" >              
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
                <script>
                          var workflowFile=companyhome.childByNamePath("GlobalPlacement/logger.xml");
                    if(workflowFile!=null)
                    {           
                              var  content="&lt;instanceID&gt;&lt;value&gt;"+bpm_package.properties["bpm:workflowInstanceId"]+"&lt;/value&gt;&lt;description&gt;"+global_wfDescription+"&lt;/description&gt;               &lt;initiator&gt;"+initiator.properties.userName+"&lt;/initiator&gt;                     &lt;status&gt;&lt;value&gt;Workflow Assigned&lt;/value&gt;&lt;actor&gt;"+bpm_assignee.properties.userName+"&lt;/actor&gt;   &lt;startdatetime&gt;"+startDate.getHours()+":"+startDate.getMinutes()+":"+startDate.getSeconds()+utils.pad(startDate.getDate(),2)+"-"+utils.pad((startDate.getMonth()+1),2)+"-"+utils.pad((startDate.getYear()-100),2)+"&lt;/startdatetime&gt;&lt;enddatetime&gt;"+startDate.getHours()+":"+startDate.getMinutes()+":"+startDate.getSeconds()+utils.pad(startDate.getDate(),2)+"-"+utils.pad((startDate.getMonth()+1),2)+"-"+utils.pad((startDate.getYear()-100),2)+"&lt;/enddatetime&gt;&lt;/status&gt;&lt;/instanceID&gt;&lt;/workflows&gt;";
                                                
                              var newcontent=workflowFile.content.substring( 0 , workflowFile.content.length() - 12);
                              workflowFile.content=newcontent+content;
                              workflowFile.save();    
                                 
                   }
                  
                   else
                   { 
                              doc=companyhome.childByNamePath("GlobalPlacement");
                              var workflowFile = doc.createFile("logger.xml");
                              workflowFile.content="&lt;workflows&gt;&lt;instanceID&gt;&lt;value&gt;"+bpm_package.properties["bpm:workflowInstanceId"]+"&lt;/value&gt;&lt;description&gt;"+global_wfDescription+"&lt;/description&gt;&lt;initiator&gt;"+initiator.properties.userName+"&lt;/initiator&gt;                     &lt;status&gt;&lt;value&gt;Workflow Assigned&lt;/value&gt;&lt;actor&gt;"+bpm_assignee.properties.userName+"&lt;/actor&gt;   &lt;startdatetime&gt;"+startDate.getHours()+":"+startDate.getMinutes()+":"+startDate.getSeconds()+utils.pad(startDate.getDate(),2)+"-"+utils.pad((startDate.getMonth()+1),2)+"-"+utils.pad((startDate.getYear()-100),2)+"&lt;/startdatetime&gt;&lt;enddatetime&gt;"+startDate.getHours()+":"+startDate.getMinutes()+":"+startDate.getSeconds()+utils.pad(startDate.getDate(),2)+"-"+utils.pad((startDate.getMonth()+1),2)+"-"+utils.pad((startDate.getYear()-100),2)+"&lt;/enddatetime&gt;&lt;/status&gt;&lt;/instanceID&gt;&lt;/workflows&gt;";
                              workflowFile.save();
                  }

                     
                    var userFile=companyhome.childByNamePath("GlobalPlacement/userlogger.xml");
                   
                    var actorname=bpm_assignee.properties.userName;
                  
                    if(userFile!=null)
                    {        var content=userFile.content;
                             var Index = content.indexOf(actorname);
                           
                           if(Index == -1)
                           {
                                      content ="&lt;user&gt;&lt;name&gt;"+bpm_assignee.properties.userName+"&lt;/name&gt;&lt;instanceID&gt;   &lt;id&gt;"+bpm_package.properties["bpm:workflowInstanceId"]+"&lt;/id&gt;&lt;description&gt;"+global_wfDescription+"&lt;/description&gt;&lt;task&gt;   &lt;value&gt;Workflow Assigned&lt;/value&gt;&lt;startdatetime&gt;"+startDate.getHours()+":"+startDate.getMinutes()+":"+startDate.getSeconds()+utils.pad(startDate.getDate(),2)+"-"+utils.pad((startDate.getMonth()+1),2)+"-"+utils.pad((startDate.getYear()-100),2)+"&lt;/startdatetime&gt;&lt;enddatetime /&gt;&lt;/task&gt;&lt;/instanceID&gt;&lt;/user&gt;&lt;/workflows&gt;";

                                      var newcontent=userFile.content.substring( 0 , userFile.content.length() - 12);
                             userFile.content=newcontent+content;
                             userFile.save();
                           }
                           
                           else
                           {
                                      var upperString = content.substring(0,content.indexOf(actorname));
                            
                             var lowerString = content.substring(content.indexOf(actorname),content.length());

                             var instanceString="&lt;instanceID&gt;   &lt;id&gt;"+bpm_package.properties["bpm:workflowInstanceId"]+"&lt;/id&gt;&lt;description&gt;"+global_wfDescription+"&lt;/description&gt;&lt;task&gt;   &lt;value&gt;Workflow Assigned&lt;/value&gt;&lt;startdatetime&gt;"+startDate.getHours()+":"+startDate.getMinutes()+":"+startDate.getSeconds()+utils.pad(startDate.getDate(),2)+"-"+utils.pad((startDate.getMonth()+1),2)+"-"+utils.pad((startDate.getYear()-100),2)+"&lt;/startdatetime&gt;&lt;enddatetime /&gt;&lt;/task&gt;&lt;/instanceID&gt;";
                            
                             var middleString = lowerString.substring(0,lowerString.indexOf("&lt;instanceID&gt;"));
                                      
                              var lastString =  lowerString.substring(lowerString.indexOf("&lt;instanceID&gt;"),lowerString.length());

                             userFile.content=upperString+middleString+instanceString+lastString;

                             userFile.save();
                           }    
                                 
                   }
                  
                   else
                   { 
                              doc=companyhome.childByNamePath("GlobalPlacement");
                              var userFile = doc.createFile("userlogger.xml");
                                        userFile.content="&lt;workflows&gt;&lt;user&gt;&lt;name&gt;"+bpm_assignee.properties.userName+"&lt;/name&gt;&lt;instanceID&gt;   &lt;id&gt;"+bpm_package.properties["bpm:workflowInstanceId"]+"&lt;/id&gt;&lt;description&gt;"+global_wfDescription+"&lt;/description&gt;&lt;task&gt;&lt;value&gt;Workflow Assigned&lt;/value&gt;&lt;startdatetime&gt;"+startDate.getHours()+":"+startDate.getMinutes()+":"+startDate.getSeconds()+utils.pad(startDate.getDate(),2)+"-"+utils.pad((startDate.getMonth()+1),2)+"-"+utils.pad((startDate.getYear()-100),2)+"&lt;/startdatetime&gt;&lt;enddatetime &gt;"+startDate.getHours()+":"+startDate.getMinutes()+":"+startDate.getSeconds()+utils.pad(startDate.getDate(),2)+"-"+utils.pad((startDate.getMonth()+1),2)+"-"+utils.pad((startDate.getYear()-100),2)+"&lt;/enddatetime&gt;&lt;/task&gt;&lt;/instanceID&gt;&lt;/user&gt;&lt;/workflows&gt;";
                              userFile.save();
                  }

            </script>
         </action>
      </transition>
    </node>
    <task-node name="review">
        <task name="global:submitReviewTask" swimlane="assignee">          
          <event type="task-create">
             <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
               <script>
                  <variable name="createReviewDate" access="write,read"/>
                  <expression>
                         new Date();
                  </expression>
               </script>           
            </action>
          </event>
          <event type="task-end">
             <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
               <script>
                  <variable name="endReviewDate" access="write,read"/>
                  <expression>
                         new Date();
                  </expression>
               </script>           
             </action>
         </event>
        </task>
        <transition name="Reject" to="end" >
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <!– logger.xml file is appended on the reject of the workflow
                 userFile.xml file is appended on the reject of the workflow
                sends mail if the task is  rejected–>
            <script>
                 
               var workflowFile=companyhome.childByNamePath("GlobalPlacement/logger.xml");     
               var date=new Date();
               var workflowInstanceId=bpm_package.properties["bpm:workflowInstanceId"];
              
               if(workflowFile!=null)
               {           
                        var wholeString = workflowFile.content;
                        var upperString = wholeString.substring(0,wholeString.indexOf(workflowInstanceId));
                        var lowerString =wholeString.substring(wholeString.indexOf(workflowInstanceId),wholeString.length());   var instanceStr = lowerString.substring(0,lowerString.indexOf("&lt;/instanceID&gt;"));

                        lowerString = lowerString.substring(lowerString.indexOf("&lt;/instanceID&gt;"),lowerString.length());
                        
                        var content="&lt;status&gt;&lt;value&gt;Reject&lt;/value&gt;&lt;actor&gt;"+bpm_assignee.properties.userName+"&lt;/actor&gt;&lt;startdatetime&gt;"+createReviewDate.getHours()+":"+createReviewDate.getMinutes()+":"+createReviewDate.getSeconds()+utils.pad(createReviewDate.getDate(),2)+"-"+utils.pad((createReviewDate.getMonth()+1),2)+"-"+utils.pad((createReviewDate.getYear()-100),2)+"&lt;/startdatetime&gt;&lt;enddatetime&gt;"+endReviewDate.getHours()+":"+endReviewDate.getMinutes()+":"+endReviewDate.getSeconds()+utils.pad(endReviewDate.getDate(),2)+"-"+utils.pad((endReviewDate.getMonth()+1),2)+"-"+utils.pad((endReviewDate.getYear()-100),2)+"&lt;/enddatetime&gt;&lt;/status&gt;";
                        
                        workflowFile.content = upperString + instanceStr + content + lowerString;
                        workflowFile.save(); 
                               
                              
               }
              
               var userFile=companyhome.childByNamePath("GlobalPlacement/userlogger.xml");     
              
               if(userFile!=null)
               {           
                        var wholeString = userFile.content;
                        var upperString = wholeString.substring(0,wholeString.indexOf(workflowInstanceId));
                        var lowerString =wholeString.substring(wholeString.indexOf(workflowInstanceId),wholeString.length());   var instanceStr = lowerString.substring(0,lowerString.indexOf("&lt;/instanceID&gt;"));

                        lowerString = lowerString.substring(lowerString.indexOf("&lt;/instanceID&gt;"),lowerString.length());
                        
                        var content= "&lt;task&gt;&lt;value&gt;Reject&lt;/value&gt;&lt;startdatetime&gt;"+createReviewDate.getHours()+":"+createReviewDate.getMinutes()+":"+createReviewDate.getSeconds()+utils.pad(createReviewDate.getDate(),2)+"-"+utils.pad((createReviewDate.getMonth()+1),2)+"-"+utils.pad((createReviewDate.getYear()-100),2)+" &lt;/startdatetime&gt;&lt;enddatetime&gt;"+endReviewDate.getHours()+":"+endReviewDate.getMinutes()+":"+endReviewDate.getSeconds()+utils.pad(endReviewDate.getDate(),2)+"-"+utils.pad((endReviewDate.getMonth()+1),2)+"-"+utils.pad((endReviewDate.getYear()-100),2)+"&lt;/enddatetime&gt;&lt;/task&gt;";
                                             
                        userFile.content = upperString + instanceStr + content + lowerString;
                        userFile.save(); 
                               
                              
               }
               
              
             </script>
          </action>
         
      </transition>
        <transition name="Approve" to="end">
            <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
           <!– logger.xml file is appended on the approval of the workflow
                 userFile.xml file is appended on the approval of the workflow
                sends mail if the task is  approved–>
              <script>
                 
                  var workflowFile=companyhome.childByNamePath("GlobalPlacement/logger.xml");     
                  var date=new Date();
                  var workflowInstanceId=bpm_package.properties["bpm:workflowInstanceId"];
                  if(workflowFile!=null)
                  {           
                        var wholeString = workflowFile.content;
                        var upperString = wholeString.substring(0,wholeString.indexOf(workflowInstanceId));
                        var lowerString = wholeString.substring(wholeString.indexOf(workflowInstanceId),wholeString.length());
                        var instanceStr = lowerString.substring(0,lowerString.indexOf("&lt;/instanceID&gt;"));
                        lowerString = lowerString.substring(lowerString.indexOf("&lt;/instanceID&gt;"),lowerString.length());
                        var content="&lt;status&gt;&lt;value&gt;Approve&lt;/value&gt;&lt;actor&gt;"+bpm_assignee.properties.userName+"&lt;/actor&gt;&lt;startdatetime&gt;"+createReviewDate.getHours()+":"+createReviewDate.getMinutes()+":"+createReviewDate.getSeconds()+utils.pad(createReviewDate.getDate(),2)+"-"+utils.pad((createReviewDate.getMonth()+1),2)+"-"+utils.pad((createReviewDate.getYear()-100),2)+"&lt;/startdatetime&gt;&lt;enddatetime&gt;"+endReviewDate.getHours()+":"+endReviewDate.getMinutes()+":"+endReviewDate.getSeconds()+utils.pad(endReviewDate.getDate(),2)+"-"+utils.pad((endReviewDate.getMonth()+1),2)+"-"+utils.pad((endReviewDate.getYear()-100),2)+"&lt;/enddatetime&gt;&lt;/status&gt;";
                           
                        workflowFile.content = upperString + instanceStr + content + lowerString;
                        workflowFile.save();
                                 
                  }
                
                 
                 
                  var userFile=companyhome.childByNamePath("GlobalPlacement/userlogger.xml");     
                 
                  if(userFile!=null)
                  {           
                        var wholeString = userFile.content;
                        var upperString = wholeString.substring(0,wholeString.indexOf(workflowInstanceId));
                        var lowerString = wholeString.substring(wholeString.indexOf(workflowInstanceId),wholeString.length());
                        var instanceStr = lowerString.substring(0,lowerString.indexOf("&lt;/instanceID&gt;"));
                        lowerString = lowerString.substring(lowerString.indexOf("&lt;/instanceID&gt;"),lowerString.length());
                        var content= "&lt;task&gt;&lt;value&gt;Approve&lt;/value&gt;&lt;startdatetime&gt;"+createReviewDate.getHours()+":"+createReviewDate.getMinutes()+":"+createReviewDate.getSeconds()+utils.pad(createReviewDate.getDate(),2)+"-"+utils.pad((createReviewDate.getMonth()+1),2)+"-"+utils.pad((createReviewDate.getYear()-100),2)+" &lt;/startdatetime&gt;&lt;enddatetime&gt;"+endReviewDate.getHours()+":"+endReviewDate.getMinutes()+":"+endReviewDate.getSeconds()+utils.pad(endReviewDate.getDate(),2)+"-"+utils.pad((endReviewDate.getMonth()+1),2)+"-"+utils.pad((endReviewDate.getYear()-100),2)+"&lt;/enddatetime&gt;&lt;/task&gt;";
                        
                        userFile.content = upperString + instanceStr + content + lowerString;
                        userFile.save();
                                 
                  }
                  var nurseFolder =companyhome.childByNamePath("GlobalPlacement/Nurse");
                  bpm_package.children[0].move(nurseFolder);

            </script>
         </action>
         
       </transition>
    </task-node>
  
    <end-state name="end"/>


</process-definition>

c) under src i am having BootsrapAuthority…….java file
d) workflow-context.xml changed as

  
                                <props>
               <prop key="engineId">jbpm</prop>
               <prop key="location">alfresco/WEB-INF/classes/alfresco/extension/workflow/Global-review-processdefinition.xml</prop>
               <prop key="mimetype">text/xml</prop>
               <prop key="redeploy">false</prop>
            </props>

e)bootsrap-context.xml

  <props>
               <prop key="engineId">jbpm</prop>
               <prop key="location">alfresco/WEB-INF/classes/alfresco/extension/workflow/Global-review-processdefinition.xml</prop>
               <prop key="mimetype">text/xml</prop>
               <prop key="redeploy">false</prop>
            </props>
           
            </list>
        </property>
        <property name="models">
            <list>
               <value>alfresco/workflow/workflowModel.xml</value>
               <value>alfresco/workflow/wcmWorkflowModel.xml</value>
               <value>alfresco/workflow/invitation-nominated-workflow-model.xml</value>
               <value>alfresco/workflow/invitation-moderated-workflow-model.xml</value>
          <value>alfresco/WEB-INF/classes/alfresco/extension/model/GlobalWorkflowModel.xml</value>

            </list>
        </property>
        <property name="labels">
            <list>
               <value>alfresco/workflow/workflow-messages</value>
               <value>alfresco/workflow/wcm-workflow-messages</value>
               <value>alfresco/workflow/invitation-nominated-workflow-messages</value>
               <value>alfresco/workflow/invitation-moderated-workflow-messages</value>

      <value>alfresco/WEB-INF/classes/alfresco/extension/message/GlobalWorkflow-messages</value>

            </list>
        </property>

when i deploy i got exception on log as

SEVERE: Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextLoaderListener
org.alfresco.error.AlfrescoRuntimeException: 02250001 Workflow deployment failed
   at org.alfresco.repo.workflow.WorkflowDeployer.init(WorkflowDeployer.java:336)
   at org.alfresco.repo.workflow.WorkflowDeployer$1.doWork(WorkflowDeployer.java:443)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:514)
   at org.alfresco.repo.workflow.WorkflowDeployer.onBootstrap(WorkflowDeployer.java:439)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
   at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:617)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:69)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:516)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 02250000 Could not find bootstrap model alfresco/WEB-INF/classes/alfresco/extension/model/GlobalWorkflowModel.xml
   at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:137)
   at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:108)
   at org.alfresco.repo.workflow.WorkflowDeployer.init(WorkflowDeployer.java:266)
   … 38 more
Mar 25, 2010 3:33:08 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextListener
org.alfresco.error.AlfrescoRuntimeException: 02250001 Workflow deployment failed
   at org.alfresco.repo.workflow.WorkflowDeployer.init(WorkflowDeployer.java:336)
   at org.alfresco.repo.workflow.WorkflowDeployer$1.doWork(WorkflowDeployer.java:443)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:514)
   at org.alfresco.repo.workflow.WorkflowDeployer.onBootstrap(WorkflowDeployer.java:439)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
   at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:617)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:69)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:516)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

wht i am missing????
thanks in advance