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 name="services">
         <ref bean="ServiceRegistry" />
      <property name="facturaService">
         <ref bean="facturaService" />
      <property name="authenticationComponent">
         <ref bean="AuthenticationComponent" />
      <property name="accountService">
         <ref bean="accountService" />
      <property name="lockService">
         <ref bean="LockService" />

-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:}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>
   at org.alfresco.repo.webservice.content.ContentWebService.write(
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(
   at java.lang.reflect.Method.invoke(
   at org.apache.axis.strategies.InvocationStrategy.visit(
   at org.apache.axis.SimpleChain.doVisiting(
   at org.apache.axis.SimpleChain.invoke(
   at org.apache.axis.handlers.soap.SOAPService.invoke(
   at org.apache.axis.server.AxisServer.invoke(
   at org.apache.axis.transport.http.AxisServlet.doPost(
   at javax.servlet.http.HttpServlet.service(
   at org.apache.axis.transport.http.AxisServletBase.service(
   at javax.servlet.http.HttpServlet.service(
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(
   at org.apache.catalina.core.StandardWrapperValve.invoke(
   at org.apache.catalina.core.StandardContextValve.invoke(
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
   at org.apache.catalina.core.StandardHostValve.invoke(
   at org.apache.catalina.valves.ErrorReportValve.invoke(
   at org.apache.catalina.valves.AccessLogValve.invoke(
   at org.apache.catalina.core.StandardEngineValve.invoke(
   at org.apache.catalina.connector.CoyoteAdapter.service(
   at org.apache.coyote.http11.AbstractHttp11Processor.process(
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
   at java.util.concurrent.ThreadPoolExecutor.runWorker(
   at java.util.concurrent.ThreadPoolExecutor$


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.