SlideShare a Scribd company logo
1 of 27
Custom Action Framework 2 Neil Mc Erlean Ph.D. Senior Engineer, Alfresco twitter: @neilmcer
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
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)
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
The Action Services 6 Get Action Definitions Action Condition Definitions Parameter Constraints Create Action Action Condition Evaluate, Execute Actions ActionService Save Action Create Action (from saved node) public-services-context.xml action-services-context.xml RuntimeActionService
actionModel.xml (very abridged) 7 <type name="act:actionbase">   <associations>     <child-association name="act:parameters”/>   </associations>   </type> <type name="act:action">   <parent>act:actionbase</parent>   <properties>     <property name="act:actionTitle”/>     <property name="act:actionDescription”/>     <property name="act:executeAsynchronously”/>     <property name="act:runAsUser”/>   </properties>           <associations>     <child-association name="act:conditions”/>     <child-association name="act:compensatingAction”/>   </associations> </type>
Writing a custom action 8 3 basic components
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); }
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
Spring configuration 11 <beans>    <bean id="imageWatermarkActionBase”          class="org.alfresco.repo.watermarks.ImageWatermarkingAction"          parent="action-executer"> </bean>    <bean id="watermarkResourceBundles"  class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">       <property name="resourceBundles">          <list>             <value>alfresco.messages.watermark-config</value>          </list>       </property>    </bean> </beans>
Custom Action Framework 12 Demo I – Watermarks and QR codes ?
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?
Using QR codes 14 How to Launch a “QR Reader” app Point your phone’s camera at the QR code Done :)
QR codes in the media 15
Demo I 16 Watermarks and QR codes
Architecture 17
Demo I ctd. 18 See Eclipse & Share UI watermarks-context.xml watermark-config.properties WatermarkPositioning.java ImageWatermarkingAction.java barcodes-context.xml QrCodeProvider.java
19
20
Action enhancements in Alfresco 3.4 21 ScheduledPersistedActionService & Action Tracking Service ,[object Object],Long-running actions. Lists of target nodes ,[object Object],Action Execution Status Cancellable actions. ,[object Object],persisted actions only actions without target nodes only REST API only available to admin ,[object Object],[object Object]
act:allowedExecutionstatuses 23 <constraint name="act:allowedExecutionstatuses”             type="LIST">   <parameter name="allowedValues">     <list>       <value>New</value>       <value>Pending</value>       <value>Running</value>       <value>Completed</value>       <value>Cancelled</value>       <value>Failed</value>     </list>   </parameter> </constraint>
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}
Demo II 25 Action Tracking Service
Questions? 26 wiki.alfresco.com forums.alfresco.com issues.alfresco.com twitter: @neilmcer
27 Shape & Color Palette Normal Text Normal Text Normal Text
28
Custom Action Framework

More Related Content

What's hot

Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJS
Wei Ru
 

What's hot (20)

AngularJs-training
AngularJs-trainingAngularJs-training
AngularJs-training
 
Building an End-to-End AngularJS Application
Building an End-to-End AngularJS ApplicationBuilding an End-to-End AngularJS Application
Building an End-to-End AngularJS Application
 
Directives
DirectivesDirectives
Directives
 
Catalyst patterns-yapc-eu-2016
Catalyst patterns-yapc-eu-2016Catalyst patterns-yapc-eu-2016
Catalyst patterns-yapc-eu-2016
 
Controller in AngularJS
Controller in AngularJSController in AngularJS
Controller in AngularJS
 
Implicit objects advance Java
Implicit objects advance JavaImplicit objects advance Java
Implicit objects advance Java
 
Advanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSAdvanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JS
 
Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJS
 
AngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UXAngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UX
 
RSpec
RSpecRSpec
RSpec
 
Different way to share data between controllers in angular js
Different way to share data between controllers in angular jsDifferent way to share data between controllers in angular js
Different way to share data between controllers in angular js
 
Excellent
ExcellentExcellent
Excellent
 
Learning jsp
Learning jspLearning jsp
Learning jsp
 
Valentine with AngularJS
Valentine with AngularJSValentine with AngularJS
Valentine with AngularJS
 
Rails is not just Ruby
Rails is not just RubyRails is not just Ruby
Rails is not just Ruby
 
Built in filters
Built in filtersBuilt in filters
Built in filters
 
Angular js architecture (v1.4.8)
Angular js architecture (v1.4.8)Angular js architecture (v1.4.8)
Angular js architecture (v1.4.8)
 
Content Driven Zend_Acl in the Model Layer
Content Driven Zend_Acl in the Model LayerContent Driven Zend_Acl in the Model Layer
Content Driven Zend_Acl in the Model Layer
 
Angular js
Angular jsAngular js
Angular js
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
 

Similar to Custom Action Framework

[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
Carles Farré
 
JSF 2.0 (JavaEE Webinar)
JSF 2.0 (JavaEE Webinar)JSF 2.0 (JavaEE Webinar)
JSF 2.0 (JavaEE Webinar)
Roger Kitain
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
Sagar Nakul
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Php
funkatron
 

Similar to Custom Action Framework (20)

Os Leonard
Os LeonardOs Leonard
Os Leonard
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
 
JSF 2.0 (JavaEE Webinar)
JSF 2.0 (JavaEE Webinar)JSF 2.0 (JavaEE Webinar)
JSF 2.0 (JavaEE Webinar)
 
Introducing Struts 2
Introducing Struts 2Introducing Struts 2
Introducing Struts 2
 
JSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTLJSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTL
 
Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2
 
Struts Overview
Struts OverviewStruts Overview
Struts Overview
 
Struts2
Struts2Struts2
Struts2
 
JavaEE Spring Seam
JavaEE Spring SeamJavaEE Spring Seam
JavaEE Spring Seam
 
Jsfsunum
JsfsunumJsfsunum
Jsfsunum
 
สปริงเฟรมเวิร์ค4.1
สปริงเฟรมเวิร์ค4.1สปริงเฟรมเวิร์ค4.1
สปริงเฟรมเวิร์ค4.1
 
Jsfandsecurity
JsfandsecurityJsfandsecurity
Jsfandsecurity
 
Struts,Jsp,Servlet
Struts,Jsp,ServletStruts,Jsp,Servlet
Struts,Jsp,Servlet
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
Spring and DWR
Spring and DWRSpring and DWR
Spring and DWR
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Php
 
Spine.js
Spine.jsSpine.js
Spine.js
 
java ee 6 Petcatalog
java ee 6 Petcatalogjava ee 6 Petcatalog
java ee 6 Petcatalog
 
A Complete Tour of JSF 2
A Complete Tour of JSF 2A Complete Tour of JSF 2
A Complete Tour of JSF 2
 

More from Alfresco Software

More from Alfresco Software (20)

Alfresco Day Benelux Inholland studentendossier
Alfresco Day Benelux Inholland studentendossierAlfresco Day Benelux Inholland studentendossier
Alfresco Day Benelux Inholland studentendossier
 
Alfresco Day Benelux Hogeschool Inholland Records Management application
Alfresco Day Benelux Hogeschool Inholland Records Management applicationAlfresco Day Benelux Hogeschool Inholland Records Management application
Alfresco Day Benelux Hogeschool Inholland Records Management application
 
Alfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
Alfresco Day BeNelux: Customer Success Showcase - Saxion HogescholenAlfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
Alfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
 
Alfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
Alfresco Day BeNelux: Customer Success Showcase - Gemeente AmsterdamAlfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
Alfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
 
Alfresco Day BeNelux: The success of Alfresco
Alfresco Day BeNelux: The success of AlfrescoAlfresco Day BeNelux: The success of Alfresco
Alfresco Day BeNelux: The success of Alfresco
 
Alfresco Day BeNelux: Customer Success Showcase - Credendo Group
Alfresco Day BeNelux: Customer Success Showcase - Credendo GroupAlfresco Day BeNelux: Customer Success Showcase - Credendo Group
Alfresco Day BeNelux: Customer Success Showcase - Credendo Group
 
Alfresco Day BeNelux: Digital Transformation - It's All About Flow
Alfresco Day BeNelux: Digital Transformation - It's All About FlowAlfresco Day BeNelux: Digital Transformation - It's All About Flow
Alfresco Day BeNelux: Digital Transformation - It's All About Flow
 
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
 
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
 
Alfresco Day Vienna 2016: Alfrescos neue Rest API
Alfresco Day Vienna 2016: Alfrescos neue Rest APIAlfresco Day Vienna 2016: Alfrescos neue Rest API
Alfresco Day Vienna 2016: Alfrescos neue Rest API
 
Alfresco Day Vienna 2016: Support Tools für die Admin-Konsole
Alfresco Day Vienna 2016: Support Tools für die Admin-KonsoleAlfresco Day Vienna 2016: Support Tools für die Admin-Konsole
Alfresco Day Vienna 2016: Support Tools für die Admin-Konsole
 
Alfresco Day Vienna 2016: Entwickeln mit Alfresco
Alfresco Day Vienna 2016: Entwickeln mit AlfrescoAlfresco Day Vienna 2016: Entwickeln mit Alfresco
Alfresco Day Vienna 2016: Entwickeln mit Alfresco
 
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
 
Alfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
Alfresco Day Vienna 2016: Partner Lightning Talk: WesternacherAlfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
Alfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
 
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
 
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novum
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novumAlfresco Day Vienna 2016: Partner Lightning Talk - it-novum
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novum
 
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
 
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
 
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - SafranAlfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
 
Alfresco Day Warsaw 2016: Advancing the Flow of Digital Business
Alfresco Day Warsaw 2016: Advancing the Flow of Digital BusinessAlfresco Day Warsaw 2016: Advancing the Flow of Digital Business
Alfresco Day Warsaw 2016: Advancing the Flow of Digital Business
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 

Custom Action Framework

  • 1. Custom Action Framework 2 Neil Mc Erlean Ph.D. Senior Engineer, Alfresco twitter: @neilmcer
  • 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
  • 5. The Action Services 6 Get Action Definitions Action Condition Definitions Parameter Constraints Create Action Action Condition Evaluate, Execute Actions ActionService Save Action Create Action (from saved node) public-services-context.xml action-services-context.xml RuntimeActionService
  • 6. actionModel.xml (very abridged) 7 <type name="act:actionbase"> <associations> <child-association name="act:parameters”/> </associations> </type> <type name="act:action"> <parent>act:actionbase</parent> <properties> <property name="act:actionTitle”/> <property name="act:actionDescription”/> <property name="act:executeAsynchronously”/> <property name="act:runAsUser”/> </properties> <associations> <child-association name="act:conditions”/> <child-association name="act:compensatingAction”/> </associations> </type>
  • 7. Writing a custom action 8 3 basic components
  • 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
  • 10. Spring configuration 11 <beans> <bean id="imageWatermarkActionBase” class="org.alfresco.repo.watermarks.ImageWatermarkingAction" parent="action-executer"> </bean> <bean id="watermarkResourceBundles" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent"> <property name="resourceBundles"> <list> <value>alfresco.messages.watermark-config</value> </list> </property> </bean> </beans>
  • 11. Custom Action Framework 12 Demo I – Watermarks and QR codes ?
  • 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 :)
  • 14. QR codes in the media 15
  • 15. Demo I 16 Watermarks and QR codes
  • 17. Demo I ctd. 18 See Eclipse & Share UI watermarks-context.xml watermark-config.properties WatermarkPositioning.java ImageWatermarkingAction.java barcodes-context.xml QrCodeProvider.java
  • 18. 19
  • 19. 20
  • 20.
  • 21. act:allowedExecutionstatuses 23 <constraint name="act:allowedExecutionstatuses” type="LIST"> <parameter name="allowedValues"> <list> <value>New</value> <value>Pending</value> <value>Running</value> <value>Completed</value> <value>Cancelled</value> <value>Failed</value> </list> </parameter> </constraint>
  • 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}
  • 23. Demo II 25 Action Tracking Service
  • 24. Questions? 26 wiki.alfresco.com forums.alfresco.com issues.alfresco.com twitter: @neilmcer
  • 25. 27 Shape & Color Palette Normal Text Normal Text Normal Text
  • 26. 28