This session starts with an overview of the custom action framework. Learn how to leverage Alfresco's action services to perform repeatable operations on your content. Understand Alfresco's built-in actions and discover how you can encapsulate your business logic in your own custom actions should you need to. Then you'll see how these software components can be reused on demand from the browser or automatically from folder rules, scheduled jobs and other sources. Finally you'll be brought fully up to date with recent feature development by Alfresco in this area.
2. Custom Action Framework 3 Agenda Introduction features, capabilities recipe for custom action development Demo I - Dev Alfresco 3.4 action enhancements Demo II – ActionTrackingService Questions
3. Custom Action Framework 4 Introduction What is an action? Built-in actions. check-out create-thumbnail Parameters & conditions Composite actions [A]synchronous, persistable. Building blocks for app dev (e.g. RM module)
4. Action triggers 5 Programmatically from Java, JavaScript or over REST Action javaAction = actionService.createAction(name); javaAction.setParameterValue(“magicNumber”, 42); actionService.executeAction(javaAction, nodeRef); var jsAction = actions.create(name); jsAction.parameters[“magicNumber”] = 42; jsAction.execute(node); POST /api/actionQueue?async=true
8. The Action Executer 9 abstract class ActionExecuterAbstractBase extends ParameterizedItemAbstractBase implements ActionExecuter { protected abstract void executeImpl(Action action, NodeRef actionedUponNodeRef); } public abstract class ParameterizedItemAbstractBase { protected abstract void addParameterDefinitions(List<ParameterDefinition> paramList); }
9. The resource file(s) 10 config/alfresco/messages/foo-config.properties {a}.title=My title {a}.description=My desc. {a}.{param-name}.display-label=My display label {a} is action bean name
12. What are QR codes? 13 QR codes 2-d barcode TM Denso Wave, Inc. ISO’d & license-free iPhone & Android apps Popular in Japan Appearing in Ireland. Hyperlinks for the physical world?
13. Using QR codes 14 How to Launch a “QR Reader” app Point your phone’s camera at the QR code Done :)
22. Running actions REST API 24 GET /api/running-actions? type={type?}&nodeRef={nodeRef?} GET /api/running-action/{action_tracking_id} POST /api/running-actions?nodeRef={nodeRef?} DELETE /api/running-action/{action_tracking_id}