SlideShare a Scribd company logo
1 of 23
ATG Pipelines
Kate Soglaeva
Agenda
O DAF Servlet Pipeline
O Commerce pipelines
DAF Servlet Pipeline
PageFilter
O PageFilter starts the DAF servlet pipeline
by calling DynamoHandler
startRequestServletNam
e
AuthenticationServlet
O provides authentication using the Basic
HTTP authentication mechanism
O DEMO
1. Servlet
ProfileRequestServlet
creates an instance of
the atg/userprofiling/Profile
create a cookie containing the Profile ID of the
current guest user
Auto-logs in
maintain persistent
information: persistentAnonymousProfiles=tr
ue
CachePreventionServlet
pResponse.setHeader("Pragma", "no-cache");
pResponse.addDateHeader("Expires", 0L);
pResponse.setHeader("Cache-Control", "no-
cache");
pResponse.setHeader("Cache-Control", "no-
store");
Inserting Servlets in the
Pipeline
Steps to create pipeline servlet
Add the
servlet to /atg/dynamo/servlet/Initial.initialServices
Set the new servlet’s nextServlet property
Reset the previous servlet’s nextServlet property
Define global scope component
Extend atg.servlet.pipeline.PipelineableServletImpl
PipelinebleServlet
InsertableServlet
DEMO
How to use?
1. Disable unnecessary servlets
2. Add new servlets if required
Ex. Reprice order functionality
Commerce pipelines
Commerce Pipelines
/atg/commerce/order/
OrderTools
/atg/commerce/order/
OrderManager
public void
updateOrder(Order pOrder)
/atg/commerce/PipelineManager
runProcess("updateOrder", map)
orderTools
pipelineManager
definitionFile
/atg/commerce/
commercepipeline.xml
LoadOrder Pipeline Chain
O OrderManager.loadOrder()
O loadOrderObject
O loadPriceInfoObjectsForOrder
UpdateOrder Pipeline Chain:
O OrderManager.updateOrder(
O updateOrderObject
O updateCommerceItemObjects
O updateShippingGroupObjects
O updatePaymentGroupObjects
O updateRelationshipObjects
O updatePriceInfoObjects
O saveManualAdjustments
ProcessOrder Pipeline Chain
O OrderManager.processOrder()
O checkForExpiredPromotions
O removeEmptyShippingGroups
O removeEmptyPaymentGroups
O moveUsedPromotionsauthorizePayment
O addOrderToRepository
O sendPromotionUsedMessage
O sendFulfillmentMessage
RepriceOrder Pipeline Chain
O CartModifierFormHandler.
handleRepriceOrder
O RepriceOrderDroplet
O priceOrderTotal
Questions?

More Related Content

What's hot

Content Storage With Apache Jackrabbit
Content Storage With Apache JackrabbitContent Storage With Apache Jackrabbit
Content Storage With Apache Jackrabbit
Jukka Zitting
 

What's hot (20)

Angular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsAngular - Chapter 3 - Components
Angular - Chapter 3 - Components
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Introduction to java 8 stream api
Introduction to java 8 stream apiIntroduction to java 8 stream api
Introduction to java 8 stream api
 
Angular
AngularAngular
Angular
 
ASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with Overview
 
Introduction to Apache Camel
Introduction to Apache CamelIntroduction to Apache Camel
Introduction to Apache Camel
 
Content Storage With Apache Jackrabbit
Content Storage With Apache JackrabbitContent Storage With Apache Jackrabbit
Content Storage With Apache Jackrabbit
 
Xke spring boot
Xke spring bootXke spring boot
Xke spring boot
 
AngularJS Directives
AngularJS DirectivesAngularJS Directives
AngularJS Directives
 
Routing & Navigating Pages in Angular 2
Routing & Navigating Pages in Angular 2Routing & Navigating Pages in Angular 2
Routing & Navigating Pages in Angular 2
 
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
 JavaScript - Chapter 9 - TypeConversion and Regular Expressions  JavaScript - Chapter 9 - TypeConversion and Regular Expressions
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
 
JavaScript Basic
JavaScript BasicJavaScript Basic
JavaScript Basic
 
Angular Directives
Angular DirectivesAngular Directives
Angular Directives
 
Spring boot Under Da Hood
Spring boot Under Da HoodSpring boot Under Da Hood
Spring boot Under Da Hood
 
Spring User Guide
Spring User GuideSpring User Guide
Spring User Guide
 
Spring Web MVC
Spring Web MVCSpring Web MVC
Spring Web MVC
 
Java script
Java scriptJava script
Java script
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
 
JavaScript - Chapter 10 - Strings and Arrays
 JavaScript - Chapter 10 - Strings and Arrays JavaScript - Chapter 10 - Strings and Arrays
JavaScript - Chapter 10 - Strings and Arrays
 

Similar to ATG pipelines

การเข ยนโปรแกรมต ดต_อฐานข_อม_ล
การเข ยนโปรแกรมต ดต_อฐานข_อม_ลการเข ยนโปรแกรมต ดต_อฐานข_อม_ล
การเข ยนโปรแกรมต ดต_อฐานข_อม_ล
Bongza Naruk
 
CiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForce
Ciklum Ukraine
 

Similar to ATG pipelines (20)

ASP.NET MVC
ASP.NET MVCASP.NET MVC
ASP.NET MVC
 
Aspnet Caching
Aspnet CachingAspnet Caching
Aspnet Caching
 
ATG Advanced Profile Management
ATG Advanced Profile ManagementATG Advanced Profile Management
ATG Advanced Profile Management
 
Svcc2009 Async Ws
Svcc2009 Async WsSvcc2009 Async Ws
Svcc2009 Async Ws
 
Altitude San Francisco 2018: Programming the Edge
Altitude San Francisco 2018: Programming the EdgeAltitude San Francisco 2018: Programming the Edge
Altitude San Francisco 2018: Programming the Edge
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Introduction To ASP.NET MVC
Introduction To ASP.NET MVCIntroduction To ASP.NET MVC
Introduction To ASP.NET MVC
 
SCWCD 2. servlet req - resp (cap3 - cap4)
SCWCD 2. servlet   req - resp (cap3 - cap4)SCWCD 2. servlet   req - resp (cap3 - cap4)
SCWCD 2. servlet req - resp (cap3 - cap4)
 
2 Asp Dot Net Ajax Extensions
2 Asp Dot Net Ajax Extensions2 Asp Dot Net Ajax Extensions
2 Asp Dot Net Ajax Extensions
 
Soap Toolkit Dcphp
Soap Toolkit DcphpSoap Toolkit Dcphp
Soap Toolkit Dcphp
 
Hackingtomcat
HackingtomcatHackingtomcat
Hackingtomcat
 
Hacking Tomcat
Hacking TomcatHacking Tomcat
Hacking Tomcat
 
การเข ยนโปรแกรมต ดต_อฐานข_อม_ล
การเข ยนโปรแกรมต ดต_อฐานข_อม_ลการเข ยนโปรแกรมต ดต_อฐานข_อม_ล
การเข ยนโปรแกรมต ดต_อฐานข_อม_ล
 
Ride on the Fast Track of Web with Ruby on Rails- Part 2
Ride on the Fast Track of Web with Ruby on Rails- Part 2Ride on the Fast Track of Web with Ruby on Rails- Part 2
Ride on the Fast Track of Web with Ruby on Rails- Part 2
 
java
java java
java
 
CiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForce
 
Servlet 3.0
Servlet 3.0Servlet 3.0
Servlet 3.0
 
Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018
 
Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018
 
Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5
 

More from Kate Semizhon

More from Kate Semizhon (14)

Cracking 1-on-1s
Cracking 1-on-1sCracking 1-on-1s
Cracking 1-on-1s
 
Serverless Pitfalls
Serverless PitfallsServerless Pitfalls
Serverless Pitfalls
 
Seven Facts about Belarus
Seven Facts about BelarusSeven Facts about Belarus
Seven Facts about Belarus
 
Git 101
Git 101Git 101
Git 101
 
How to improve code quality for iOS apps?
How to improve code quality for iOS apps?How to improve code quality for iOS apps?
How to improve code quality for iOS apps?
 
Database Change Management
Database Change ManagementDatabase Change Management
Database Change Management
 
Ecommerce in 2018
Ecommerce in 2018Ecommerce in 2018
Ecommerce in 2018
 
Oracle ATG Commerce Overview for developers
Oracle ATG Commerce Overview for developers Oracle ATG Commerce Overview for developers
Oracle ATG Commerce Overview for developers
 
How a project is born. Intro to Discovery Phase
How a project is born. Intro to Discovery Phase How a project is born. Intro to Discovery Phase
How a project is born. Intro to Discovery Phase
 
Code Review Tool Evaluation
Code Review Tool EvaluationCode Review Tool Evaluation
Code Review Tool Evaluation
 
Sonar Review
Sonar ReviewSonar Review
Sonar Review
 
Unit tests benefits
Unit tests benefitsUnit tests benefits
Unit tests benefits
 
SEO Instruments in ATG
SEO Instruments in ATGSEO Instruments in ATG
SEO Instruments in ATG
 
Common mistakes for ATG applications that affect performance
Common mistakes for ATG applications that affect performanceCommon mistakes for ATG applications that affect performance
Common mistakes for ATG applications that affect performance
 

Recently uploaded

Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Recently uploaded (20)

Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 

ATG pipelines

Editor's Notes

  1. When a user performs an action that prompts a response, the application server creates an instance of theHttpServletRequest and HttpServletResponse. Based on the directories and file extension of therequestURI, the application server uses servlet and filter mappings defined in web.xml to determine the nextresource to call.By default, PageFilter is mapped to handle JSP requests. When the application server invokes PageFilter,it checks the request and response for a reference to a Dynamo request and response pair. The pair doesnot exist, so PageFilter starts the DAF servlet pipeline by calling DynamoHandler, the first servlet in thepipeline. The DAF servlet pipeline processes through a series of servlets that modify the request and responseby extracting path information and providing session, user, and security information. The last servlet in thepipeline is TailPipelineServlet. It is responsible for calling FilterChain.doFilter(), which invokes thenext filter defined in web.xml. The web application, unless it uses Oracle ATG Web Commerce Portal, does notinclude other servlet filters.
  2. http://localhost:8180/dyn/admin/nucleus//atg/dynamo/servlet/dafpipeline/DynamoHandler/http://localhost:8180/dyn/admin/nucleus//atg/dynamo/servlet/adminpipeline/Resolves and starts processing from “atg.servlet.startRequestServletName” filter configuration parameterIn some cases can invoke only /atg/dynamo/servlet/dafpipeline/TailPipelineServlet
  3. The BasicAuthenticationPipelineServlet class provides authentication using the Basic HTTP authentication mechanism. A component for this servlet is not included in the standard servlet pipelines, but the class is available for use in servlet pipelines you might create in your own applications.
  4. http://docs.oracle.com/cd/E24152_01/Platform.10-1/ATGPlatformProgGuide/html/s2301profilerequestservlet01.htmlhttp://localhost:8180/dyn/admin/nucleus//atg/userprofiling/ProfileRequestServlet/
  5. CachePreventionServlet modifies the response headers for certain requests to indicate that the returned content should not be cached.
  6. Extend atg.servlet.pipeline.PipelineableServletImpl.Define the servlet as a globally scoped Nucleus component.Reset the previous servlet’s nextServlet property to point to the new servlet.Set the new servlet’s nextServlet property to point to the next servlet in the pipeline.Add the servlet’s path to the initialServices property of /atg/dynamo/servlet/Initial.
  7. The DispatcherPipelineableServlet interface provides a mechanism for conditionally branching the pipeline. This interface includes adispatcherServiceMap property that is a Map of possible servlets to invoke next, depending on some condition. For example, the MimeTypeDispatcherservlet determines which servlet to invoke depending on the MIME type of the request. ATG provides the implementation classDispatcherPipelineableServletImpl.
  8. http://docs.oracle.com/cd/E24152_01/Platform.10-1/ATGPlatformProgGuide/html/s0807insertingservletsinthepipeline01.htmlThe InsertableServlet interface lets a servlet insert itself into the pipeline when the service starts, without requiring changes to servlets already in the pipeline, through the insertAfterServlet property, which points back to the preceding servlet. The inserted servlet reads the preceding servlet’s nextServletproperty and points to it as the next servlet to execute after itself.For example, a servlet pipeline might contain Servlet1, whose nextServlet property points to Servlet2. You can insert MyNewServlet, which implementsInsertableServlet, between the two by setting its insertAfterServlet property so it points to Servlet1. This configuration splices ServletNew between Servlet1 and Servlet2 as follows:- MyNewServlet sets its own nextServlet property to the value of Servlet1’s nextServlet property.MyNewServlet reads Servlet1’s nextServlet property and links to Servlet2 as the next servlet to execute after itself.If an insertable servlet inserts only itself into a pipeline, it uses the nextServlet property of its insertAfterServlet servlet to resume pipeline execution. However, if the inserted servlet starts a secondary pipeline, it sets its own nextServlet property to the next servlet in that pipeline. After the last secondary pipeline servlet executes, it passes control to the nextServlet servlet originally specified by the insertAfterServlet servlet, and the original pipeline resumes execution.The ATG installation provides an implementation of the InsertableServlet interface, atg.servlet.pipeline.InsertableServletImpl. This class implements all Servlet methods, so you only need to override the service method.To add an InsertableServlet to the servlet pipeline:Write your servlet by extending atg.servlet.pipeline.InsertableServletImpl.Define the servlet as a globally scoped Nucleus component.Set the insertAfterServlet property of your servlet to point to the path of the pipeline servlet you want your servlet to follow. For example, you can insert a servlet after DynamoServlet as follows:insertAfterServlet=/atg/dynamo/servlet/dafpipeline/DynamoServletAdd the servlet’s path to the initialServices property of /atg/dynamo/servlet/Initial:initialServices+=/myServletWhen the inserted servlet finishes processing, it calls the method passRequest() (defined in InsertableServletImpl), which automatically passes the request and response objects to the next servlet in the pipeline.
  9. 1. The processing of an Order begins with a call from FormHandlers (CartModifierFormHandler) toOrderManager.processOrder().2. OrderManager.processOrder calls the PipelineManager to execute the processOrder pipelinewhich is configured in commercepipeline.xml3.The processOrder pipeline first validates the Order and then processes it by calling the sequenceof processors.4.Each processor is responsible to handle a task or can call another pipeline.5.Each processor after execution returns a status code and determines which processor in thechain to execute next.6.The Pipeline Manager enables us to dynamically add and remove processors and chains of processors.
  10. From OrderManager.java public PipelineManagergetPipelineManager() { return getOrderTools().getPipelineManager(); } public void updateOrder(Order pOrder) throws CommerceException {…HashMap map = new HashMap(13);map.put("OrderManager", this);map.put("Order", pOrder);map.put("Changed", Boolean.FALSE); try {map.put("OrderRepository",getOrderTools().getOrderRepository());getOrderTools().registerSynchronization(pOrder);getPipelineManager().runProcess("updateOrder", map); } catch (RunProcessException e) { throw new CommerceException(e); } finally { if (pOrderinstanceofOrderImpl && isTransactionMarkedAsRollBack()) ((OrderImpl) pOrder).invalidateOrder(); } if (pOrderinstanceofOrderImpl) ((OrderImpl) pOrder).updateVersion();…
  11. http://docs.oracle.com/cd/E24152_01/Platform.10-1/ATGCommProgGuide/html/s3102loadorderpipelinechain01.html
  12. updateOrderObjectupdateCommerceItemObjectsupdateShippingGroupObjectsupdateHandlingInstructionObjectsupdatePaymentGroupObjectsupdatePaymentStatusObjectsupdateRelationshipObjectsupdatePriceInfoObjectsupdateCostCenterObjectssaveManualAdjustmentssetLastModifiedTime
  13. The processOrder pipeline chain submits the given Order for checkout. The processOrder pipeline chain is executed by the processOrder() method in the OrderManager. The processOrder() method adds the given Order, Profile, Request, Locale, and OrderManager to its parameter list, which is supplied to the executing chain. The pipeline chain’s transaction mode is TX_REQUIRED.