cancel
Showing results for 
Search instead for 
Did you mean: 

HELP!!!! alfresco actions

enkidu
Champ in-the-making
Champ in-the-making
hi mates,

need help.. i want to transform xml to pdf using a custom transformer (a script batch file). i copy and paste the example from http://docs.alfresco.com/4.1/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Ftasks%2Fserv-runtimetr...

but i didnt know how the action will be performed (didnt show up under actions). did i need to do something more then create a file under extensions? some advice would be nice.

using alfresco 4.2.d
17 REPLIES 17

jpotts
World-Class Innovator
World-Class Innovator
See if <a href="http://ecmarchitect.com/images/articles/alfresco-actions/actions-article-2ed.pdf">this tutorial</a> on custom actions is of any help, particularly the part about adding the custom action to the Share user interface through the custom config.

Jeff

enkidu
Champ in-the-making
Champ in-the-making
hi jeff,

thnx for ur reply.. i downloaded the alfresco sdk but i dont know which one of all those jar files are necessary to compile the code in ur example.. some hints would be nice.
i downloaded the sdk from https://process.alfresco.com/ccdl/?file=release/community/build-4848/alfresco-community-sdk-4.2.e.zi...

some issues trying to compile the sample code with some classes like i.e. NodeRef.

enkidu
Champ in-the-making
Champ in-the-making
still waiting for an answer!.. its easier to get response from jesus as from a developer of the alfresco staff

jpotts
World-Class Innovator
World-Class Innovator
If you import the SDK into your Eclipse workspace and then make the SDK AlfrescoEmbedded project a dependency for the project you are working on, you won't have to hunt down JAR files. Everything will compile.

If you would prefer to use Maven, that's another option. In that case you don't need to download the SDK at all.

All of this is actually covered in various tutorials, books, and wiki pages, so that's probably why you haven't gotten an answer.

Jeff

enkidu
Champ in-the-making
Champ in-the-making
thnx for ur reply jeff.. ;O)

enkidu
Champ in-the-making
Champ in-the-making
Hi jeff,

i got the example work thanx to your hint.. but now i wanna go a step further and get the name of the node so i tried this: http://wiki.alfresco.com/wiki/NodeRef_cookbook

i copy and paste:


       ServiceRegistry serviceRegistry = (ServiceRegistry) beanFactory.getBean(ServiceRegistry.SERVICE_REGISTRY);
       NodeService nodeService = serviceRegistry.getNodeService();
       ContentService contentService = serviceRegistry.getContentService();
       FileFolderService fileFolderService = serviceRegistry.getFileFolderService();

but now i have the problem that he didnt find beanFactory.. where did i get it from? any ideas?

– ok i found the solution:

    <bean id="logger-action" class="org.alfresco.sample.LoggerActionExecuter" parent="action-executer">
      <property name="nodeService">
         <ref bean="nodeService" />
      </property>
   </bean>  

enkidu
Champ in-the-making
Champ in-the-making
hi jeff,

can u give me a hint how to programm a custom transformer lets say: i want to transform a xml from a folder "source" using a stylesheet xsl and store the result in folder "target".

i would like use RuntimeExecutableContentTransformerWorker but didnt find any tutorial which explains how to do so. the only one i found is: http://wiki.alfresco.com/wiki/Content_Transformations

but the java code is useless if u wanna do ur own transformer

jpotts
World-Class Innovator
World-Class Innovator
The Alfresco Developer Guide has a custom transformer example. It does a transformation of project files to plain text. Here is a link to the Java code: http://code.google.com/p/alfresco-developer-guide/source/browse/tags/ch4_3.4_community/client-extens...

Other than that there are many out-of-the-box transformers. The source code for those are very helpful in developing your own custom transformers.

Jeff

jpotts
World-Class Innovator
World-Class Innovator
Make sure you use NodeService instead of nodeService. The lower-cased bean is private to Alfresco and is missing things like security, audit, and transactions. The upper-cased bean is public. That's the one you should be injecting.

Jeff