AnsweredAssumed Answered

A value for the mandatory parameter script-ref has not been set on the rule item script

Question asked by magarcia_sm on Feb 18, 2016
Latest reply on Feb 24, 2016 by magarcia_sm
Hi People,
I have the following problem. I have an applet that scans a file and places it in a given Space in Alfresco, when the file enters the space there is a rule that triggers an action to process this file. The code of the actions, and the rule, works fine in Alfresco 3.0 however now we are moving our custom code to Alfresco 4.2.

We have the action bean defined in the action-context.xml as this


<bean id="processFra-action" class="org.alfresco.web.actions.ProcessFraActionExecuter" parent="action-executer" >
      <property name="nodeService">
         <ref bean="NodeService" />
      </property>
      <property name="services">
         <ref bean="ServiceRegistry" />
      </property>
      <property name="facturaService">
         <ref bean="facturaService" />
      </property>
      <property name="authenticationComponent">
         <ref bean="AuthenticationComponent" />
      </property>
      <property name="accountService">
         <ref bean="accountService" />
      </property>
      <property name="lockService">
         <ref bean="LockService" />
      </property>
   </bean>



-This action processes the file.
-Converts the file to PDF.
-Move the file to another space.

The problem I have now with this configuration in Alfresco 4.2 is, that when the tiff file procuced by the applet, gets placed correctly in the destination space, the rule should be triggered, however I get this error and nothing gets done:


ww.alfresco.org/ws/service/content/1.0}ContentFault:<ns1:errorCode>0</ns1:errorCode><ns1:message>01090010 A value for the mandatory parameter script-ref has not been set on the rule item script</ns1:message>
   {http://xml.apache.org/axis/}exceptionName:org.alfresco.repo.webservice.content.ContentFault
   {http://xml.apache.org/axis/}stackTrace:
   at org.alfresco.repo.webservice.content.ContentWebService.write(ContentWebService.java:228)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:498)
   at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
   at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
   at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
   at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
   at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
   at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
   at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
   at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at java.lang.Thread.run(Thread.java:745)

   {http://xml.apache.org/axis/}hostname:SM-PC


My class extend ActionExecuterAbstractBase.
One tip was to override the method
public void execute(Action action, NodeRef actionedUponNodeRef)
not to perform validation however,it does not work, we are still getting this same situation.
To tell you the truth I dont know excatly what it means when the system says

A value for the mandatory parameter script-ref has not been set on the rule item script


As our code is a JAVA code implemented to be run as action.

Any solution to this problem please?

Thank you very much.

Outcomes