AnsweredAssumed Answered

external script in amp

Question asked by abruzzi on Aug 5, 2014
Latest reply on Aug 7, 2014 by mitpatoliya
I'm trying to package some work into an amp.  The work currently uses "org.alfresco.util.exec.RuntimeExec" to run an external script.  Ideally I'd like to package the script in the amp itself.  Which leads to two questions:

1. Where in the amp is a good place to put the script?

2. Since I don't know where the war will be installed, I would need to provide a relative path (but relative to where?) or some sort of property value that will know the absolute location of the war.  Is this possible?



                <property name="commandsAndArguments">
                    <map>
                        <entry key="*">
                            <list>
                                <value>sh</value>
                                <value>-c</value>
                                <value>/some/file/location/scriptname.sh '${source}' '${target}' OCRtoPDF</value>
                            </list>
                        </entry>
                    </map>
                </property>


Geof

Outcomes