SlideShare a Scribd company logo
1 of 48
Develop Fast, Deploy Faster
Advantages of APS Scripting
Miguel Sanchez miguel-sanchez-galan
msgalan@gmail.com
howToBrothers.com
Learn. Connect. Collaborate.
Agenda
• App Designer
• Custom Code
• APS Scripting
• Spring Beans
• Environment Properties
• REST Calls
Development is all about TIME
Learn. Connect. Collaborate.
Development is all about TIME
Time traveling is just
too dangerous
App Designer
Learn. Connect. Collaborate.
App Designer
Time traveling is
just too dangerous
Learn. Connect. Collaborate.
App Designer
Drag & Drop
Configuration
Custom Code
Custom Code
Learn. Connect. Collaborate.
Custom Code
Backend
• Execution Listeners
• Task Listeners
• Script Tasks
• Service Tasks
Learn. Connect. Collaborate.
Custom Code
Script Backed
vs
Java BackedWhich one to choose?
Script vs Java
Learn. Connect. Collaborate.
Script vs Java
Implement
Changes
DeployTest
Learn. Connect. Collaborate.
Script vs Java - Deployment Life Cycle
IDE
Update App Model
Publish App
Restart
Place on
Classpath
actitivi-app
Generate
Java
Backed
~ couple of minutes
Script
Backed
~ few seconds
Learn. Connect. Collaborate.
Script vs Java
Update App Model
Publish App
Java Backed
Reuse code
Debug
Unit Test
Active Process
Instances
Script Backed
Reuse code
Debug
Unit Test
Active Process
Instances
Learn. Connect. Collaborate.
Script vs Java – Which one to choose
Time
required to
implement
the solution
Complexity of the solution
ScriptJava
APS Scripting
Learn. Connect. Collaborate.
APS Scripting
Enable scripts
Set properties
validator.editor.bpmn.disable.scripttask=false
validator.editor.bpmn.disable.scripttask.groovy=false
File: activiti-app.properties
Location: activiti-appWEB-INFclassesMETA-INFactiviti-app
Let’s make it work
Learn. Connect. Collaborate.
APS Scripting
Enable scripts
Uncomment the language you want to use
File: whitelisted-scripts.conf
Location: activiti-appWEB-INFclassesactiviti
Let’s make it work
Learn. Connect. Collaborate.
APS Scripting – Update Active Processes
• SetProcessDefinitionVersionCmd(processDefinitionId, processDefinitionVersion));
• dynamicBpmnService.saveProcessDefinitionInfo(processDefinitionId, infoNode);
Script Listeners
Learn. Connect. Collaborate.
Script Execution Listener
Class: org.activiti.engine.impl.bpmn.listener.ScriptExecutionListener
Object available: execution
Events: start, end, take
Learn. Connect. Collaborate.
Script Task Listener
Class: org.activiti.engine.impl.bpmn.listener.ScriptTaskListener
Object available: task
Events: create, assignment,
complete, delete
Learn. Connect. Collaborate.
Secure Script Listeners
File: activiti-app.properties
Location: activiti-appWEB-INFclassesMETA-INFactiviti-app
Learn. Connect. Collaborate.
Secure Script Listeners
Execution Listener
Class: org.activiti.scripting.secure.listener.SecureJavascriptExecutionListener
Task Listener
Class: org.activiti.scripting.secure.listener.SecureJavascriptTaskListener
The future
is now safe
Script Task
Learn. Connect. Collaborate.
Script Task
Object available: execution
Learn. Connect. Collaborate.
Script Tasks – Reuse Code
Learn. Connect. Collaborate.
Script Task - Reuse Code
Spring Beans
Learn. Connect. Collaborate.
Default Spring Beans
• userInfoBean
• emailBean
• documentMergeBean
• auditLogBean
Learn. Connect. Collaborate.
Custom Spring Beans
• Create a bean
Package: com.activiti.extension.bean
• Deploy the JAR file generated
Location: activiti-appWEB-INFlib
• Add your bean name to
File: beans-whitelist.conf
Location: activiti-appWEB-INFclassesactiviti Custom Beans, Cool!
Environment Variables
Learn. Connect. Collaborate.
Environment Properties
package com.activiti.extension.bean;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
import
org.springframework.beans.factory.annotation.Autowired;
@Component
public class EnvironmentProperties {
@Autowired
private Environment env;
public String get(String key) {
return env.getProperty(key);
}
}
Learn. Connect. Collaborate.
Environment Properties
Logging
Learn. Connect. Collaborate.
Logging
File: log4j.properties
Location: activiti-appWEB-INFclasses
We need to go back
to know what happened
Learn. Connect. Collaborate.
Logging
REST Calls
Learn. Connect. Collaborate.
REST Calls
Learn. Connect. Collaborate.
REST Calls – Basic Authentication
Learn. Connect. Collaborate.
Rest Calls – External Authentication
Learn. Connect. Collaborate.
Custom REST API
HTTP client
Java REST API
Script
Learn. Connect. Collaborate.
Custom REST API - Example
User sets the values on the app
form and completes the task
Script task calls the ACS API to
create the folder structure
Learn. Connect. Collaborate.
Custom REST API - Example
Learn. Connect. Collaborate.
Custom REST API - Example
• execution.getVariable(“numberofyears")
• acsApi.createFolder(parentNodeId, “name")
Learn. Connect. Collaborate.
Custom REST API - Example
Learn. Connect. Collaborate.
Final Thoughts
Learn. Connect. Collaborate.
Q & A
HowToBrothers.com

More Related Content

What's hot

What's hot (20)

Banfootguns devseccon 2019
Banfootguns devseccon 2019Banfootguns devseccon 2019
Banfootguns devseccon 2019
 
Top10 Characteristics of Awesome Apps
Top10 Characteristics of Awesome AppsTop10 Characteristics of Awesome Apps
Top10 Characteristics of Awesome Apps
 
Test-Driven Infrastructure with CloudFormation and Cucumber.
Test-Driven Infrastructure with CloudFormation and Cucumber. Test-Driven Infrastructure with CloudFormation and Cucumber.
Test-Driven Infrastructure with CloudFormation and Cucumber.
 
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
 
Continuous Testing in the Cloud
Continuous Testing in the CloudContinuous Testing in the Cloud
Continuous Testing in the Cloud
 
Atlassian Roadshow 2016 - DevOps Session
Atlassian Roadshow 2016 - DevOps SessionAtlassian Roadshow 2016 - DevOps Session
Atlassian Roadshow 2016 - DevOps Session
 
Async webdriverjs
Async webdriverjsAsync webdriverjs
Async webdriverjs
 
Docker Jenkins Pipeline Tutorial | Microservices Using Docker & Jenkins | Dev...
Docker Jenkins Pipeline Tutorial | Microservices Using Docker & Jenkins | Dev...Docker Jenkins Pipeline Tutorial | Microservices Using Docker & Jenkins | Dev...
Docker Jenkins Pipeline Tutorial | Microservices Using Docker & Jenkins | Dev...
 
DevOps para Open Source com Azure DevOps
DevOps para Open Source com Azure DevOpsDevOps para Open Source com Azure DevOps
DevOps para Open Source com Azure DevOps
 
Serverless Delivery
Serverless DeliveryServerless Delivery
Serverless Delivery
 
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
 
Azure DevOps Tutorial | Developing CI/ CD Pipelines On Azure | Edureka
Azure DevOps Tutorial | Developing CI/ CD Pipelines On Azure | EdurekaAzure DevOps Tutorial | Developing CI/ CD Pipelines On Azure | Edureka
Azure DevOps Tutorial | Developing CI/ CD Pipelines On Azure | Edureka
 
Continuous Everything v2.0
Continuous Everything v2.0Continuous Everything v2.0
Continuous Everything v2.0
 
Continuous Everything
Continuous EverythingContinuous Everything
Continuous Everything
 
Azure DevOps: the future of integration and traceability
Azure DevOps: the future of integration and traceabilityAzure DevOps: the future of integration and traceability
Azure DevOps: the future of integration and traceability
 
Rapid Development with Azure Spring Cloud
Rapid Development with Azure Spring CloudRapid Development with Azure Spring Cloud
Rapid Development with Azure Spring Cloud
 
Automated testing with Cypress
Automated testing with CypressAutomated testing with Cypress
Automated testing with Cypress
 
Slides 29-07-2017
Slides 29-07-2017Slides 29-07-2017
Slides 29-07-2017
 
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
 
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
 

Similar to Develop Fast Deploy Faster - APS Scripting - Alfresco DevCon 2019

How Heroku uses Heroku to build Heroku
How Heroku uses Heroku to build HerokuHow Heroku uses Heroku to build Heroku
How Heroku uses Heroku to build Heroku
Craig Kerstiens
 
Virtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitVirtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profit
Andreas Heim
 
Behaviour driven infrastructure
Behaviour driven infrastructureBehaviour driven infrastructure
Behaviour driven infrastructure
Lindsay Holmwood
 

Similar to Develop Fast Deploy Faster - APS Scripting - Alfresco DevCon 2019 (20)

DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
How Heroku uses Heroku to build Heroku
How Heroku uses Heroku to build HerokuHow Heroku uses Heroku to build Heroku
How Heroku uses Heroku to build Heroku
 
Virtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitVirtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profit
 
Google Cloud Endpointsによる API構築
Google Cloud Endpointsによる API構築Google Cloud Endpointsによる API構築
Google Cloud Endpointsによる API構築
 
Using Chef InSpec for Infrastructure Security
Using Chef InSpec for Infrastructure SecurityUsing Chef InSpec for Infrastructure Security
Using Chef InSpec for Infrastructure Security
 
Session 2
Session 2Session 2
Session 2
 
Session 2
Session 2Session 2
Session 2
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/Ops
 
Behaviour driven infrastructure
Behaviour driven infrastructureBehaviour driven infrastructure
Behaviour driven infrastructure
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Neotys PAC - Wilson Mar
Neotys PAC - Wilson MarNeotys PAC - Wilson Mar
Neotys PAC - Wilson Mar
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
DevOps on AWS
DevOps on AWSDevOps on AWS
DevOps on AWS
 
10 practices that every developer needs to start right now
10 practices that every developer needs to start right now10 practices that every developer needs to start right now
10 practices that every developer needs to start right now
 
DEV326_DevOps Essentials An Introductory Workshop on CICD Practices
DEV326_DevOps Essentials An Introductory Workshop on CICD PracticesDEV326_DevOps Essentials An Introductory Workshop on CICD Practices
DEV326_DevOps Essentials An Introductory Workshop on CICD Practices
 
WSO2Con EU 2015: Keynote - The Containerization of the Developer Workspace
WSO2Con EU 2015: Keynote - The Containerization of the Developer WorkspaceWSO2Con EU 2015: Keynote - The Containerization of the Developer Workspace
WSO2Con EU 2015: Keynote - The Containerization of the Developer Workspace
 
Dineshotham Kumar Khambhammettu
Dineshotham Kumar KhambhammettuDineshotham Kumar Khambhammettu
Dineshotham Kumar Khambhammettu
 

Recently uploaded

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
anilsa9823
 

Recently uploaded (20)

Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 

Develop Fast Deploy Faster - APS Scripting - Alfresco DevCon 2019

Editor's Notes

  1. We’re going to focus on the backend code