SlideShare a Scribd company logo
Facilitating Rich Data Manipulation in BPEL 
                           using E4X




                          Tammo van Lessen, Jörg Nitzsche, Dimka Karastoyanova
                                  Institute of Architecture of Application Systems
                                                        (IAAS)

University of Stuttgart
Universitätsstr. 38
70569 Stuttgart
Germany
                                                                            tammo.van.lessen@iaas.uni‐stuttgart.de
The Talk Today

           Motivation and Introduction
           Combining WS‐BPEL with E4X
                     Extension Assign Operation & Extension Activity
                     Injecting BPEL variables
                     Built‐in functions
           Conclusions




© Tammo van Lessen                                                     2
Problem Statement
                     Business Analyst




                     Process Developer




© Tammo van Lessen                       3
Low‐level Problems
           BPEL Variables must be initialized              var TShoppingCart shoppingCart
                                                           var TItem item
                                                           var EItem eitem
           Data types are typically not aligned
                                                                            Create 
              Data mediation required                                      Shopping
                                                           selectionFailure Cart

           Array manipulation is cumbersome
              doXSLTransform                                   AddItem                Complete

              Custom XSL scripts needed
                                                  Data type  Check                    Submit
           Reuse not possible                     mismatch Availability                Order



                                                               Add to
                                                                                      Confirm
                                              doXSLTransform    Cart




© Tammo van Lessen                                                                               4
Alternatives

           BPELJ
                     Use plain old Java snippets
                     Pro: Easy to use
                     Con: W3C DOM still quite cumbersome


           Semantic Data Mediation
                     SUPER technology
                     Pro: Killer feature on the conceptual level
                     Con: Requires too much modelling efforts

           <s:mediate inputVariable=quot;xquot; outputVariable=quot;yquot; mediatorIRI=quot;urn:anyquot;? />




© Tammo van Lessen                                                                     5
What is JavaScript/E4X?
           JavaScript
                     ECMA 262, Edition 3
                     JavaScript 1.6
           E4X
                     Proposed by BEA
                     ECMA 357
                     XML support at the language level
                        Literals, nodes, attributes, namespaces…
                     XPath‐like syntax
                     foreach…
                     Allows nodesets as LHS expressions
           var items = <items>
                          <item name=quot;SOA bookquot; price=quot;40quot; quantity=quot;2quot;/>
                          <item name=quot;BPM bookquot; price=quot;35quot; quantity=quot;3quot;/>
                          <item name=quot;EAI bookquot; price=quot;30quot; quantity=quot;1quot;/>
                       </items>;

           alert( items.item.(@name == quot;SOA bookquot;).@quantity );

           for each( var thisPrice in items..@price ) {
               sum += thisPrice;
           }

                                                                            6
© Tammo van Lessen
Using Javascript/E4X in BPEL <assign>

   <assign name=quot;e4x-assignquot;>
       <extensionAssignOperation>
           <js:snippet>
               myVar.TestPart += ' World';
           </js:snippet>
       </extensionAssignOperation>
   </assign>



   <assign name=quot;e4x-array-assignquot;>
       <extensionAssignOperation>
           <js:snippet>
               load('shoppingCartUtils.js');
               shoppingCart.parameters = createShoppingCartSkeleton();
               shoppingCart.parameters.items += createCartItem(item);
               shoppingCart.parameters.items.item.(@hyped=='true').price *= 2;
           </js:snippet>
       </extensionAssignOperation>
   </assign>




           BPEL variables are injected into JS context
           Variables can be read and written


                                                                                 7
© Tammo van Lessen
Using Javascript/E4X in BPEL <extensionActivities>

   <extensionActivity name=“adjustShippingDetailsquot;>
       <js:snippet>
           if (goldRatio > 1.0 || silverRatio > 1.0) {
               throwFault('urn:myprocess', 'IllegalArgumentFault',
                          'discount ratios must be <= 1.0');
           }
           if (customer.type == 'gold') {
               po.items.item.price *= goldRatio;
           } else if (customer.type == 'silver') {
               po.items.item.price *= silverRatio;
           } else if (customer.type == 'besteffort') {
               po.shippingMode = 'snailmail';
           }
       </js:snippet>
   </extensionActivity>




           JavaScript functions can be used to reuse such 
           snippets
           Use with caution!


                                                                     8
© Tammo van Lessen
Built‐in Functions
           load(…)
                     Loads custom JS/E4X library
           print(…)
                     Prints debug output to console
           piid()
                     Returns process instance ID
           activityName()
                     Returns activity name

           processName()
                     Returns the process’ QName
           throwFault(namespace, localpart, faultmsg)
           throwFault(xmlobject)
                     Throws a BPEL fault

           validate(…)
                     Validates a variable’s content against its schema
                                                                         9
© Tammo van Lessen
Conclusions
           Variable Assignments in vanilla BPEL are cumbersome
                     Adding items to lists is not possible
                        Would require a nodeset as LHS expression
                        Can be done using external XSL scripts
                     Batch‐updating an XPath match is not possible
                     Variable initialization is very verbose
                     No reuse possible for recurring data manipulation tasks.
           Using E4X in BPEL
                     Provides a convenient syntax for rich XML manipulation
                     Reuse of such scripts across activities and processes is possible
                     Simplifies array manipulation
           Implementation available
                     Publicly available in Apache ODE
                     Will be part of the upcoming 2.0 release

                                                                                         10
© Tammo van Lessen
End of Document

More Related Content

What's hot

Professional JavaScript Development - Creating Reusable Code
Professional JavaScript Development -  Creating Reusable CodeProfessional JavaScript Development -  Creating Reusable Code
Professional JavaScript Development - Creating Reusable Code
Wildan Maulana
 
How to upgrade your application with no downtime (using edition-based redefin...
How to upgrade your application with no downtime (using edition-based redefin...How to upgrade your application with no downtime (using edition-based redefin...
How to upgrade your application with no downtime (using edition-based redefin...
Oren Nakdimon
 
Domain Driven Design and Hexagonal Architecture with Rails
Domain Driven Design and Hexagonal Architecture with RailsDomain Driven Design and Hexagonal Architecture with Rails
Domain Driven Design and Hexagonal Architecture with Rails
Declan Whelan
 
New features in abap
New features in abapNew features in abap
New features in abap
Srihari J
 
Advanced React Component Patterns - ReactNext 2018
Advanced React Component Patterns - ReactNext 2018Advanced React Component Patterns - ReactNext 2018
Advanced React Component Patterns - ReactNext 2018
Robert Herbst
 
Relentless Refactoring
Relentless RefactoringRelentless Refactoring
Relentless Refactoring
Mark Rickerby
 
Enterprise Data Validation
Enterprise Data ValidationEnterprise Data Validation
Enterprise Data Validation
Kevin Hazzard
 

What's hot (7)

Professional JavaScript Development - Creating Reusable Code
Professional JavaScript Development -  Creating Reusable CodeProfessional JavaScript Development -  Creating Reusable Code
Professional JavaScript Development - Creating Reusable Code
 
How to upgrade your application with no downtime (using edition-based redefin...
How to upgrade your application with no downtime (using edition-based redefin...How to upgrade your application with no downtime (using edition-based redefin...
How to upgrade your application with no downtime (using edition-based redefin...
 
Domain Driven Design and Hexagonal Architecture with Rails
Domain Driven Design and Hexagonal Architecture with RailsDomain Driven Design and Hexagonal Architecture with Rails
Domain Driven Design and Hexagonal Architecture with Rails
 
New features in abap
New features in abapNew features in abap
New features in abap
 
Advanced React Component Patterns - ReactNext 2018
Advanced React Component Patterns - ReactNext 2018Advanced React Component Patterns - ReactNext 2018
Advanced React Component Patterns - ReactNext 2018
 
Relentless Refactoring
Relentless RefactoringRelentless Refactoring
Relentless Refactoring
 
Enterprise Data Validation
Enterprise Data ValidationEnterprise Data Validation
Enterprise Data Validation
 

Similar to Facilitating Rich Data Manipulation in BPEL using E4X

Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client Development
Tamir Khason
 
NHibernate (The ORM For .NET Platform)
NHibernate (The ORM For .NET Platform)NHibernate (The ORM For .NET Platform)
NHibernate (The ORM For .NET Platform)
Samnang Chhun
 
Jscript Fundamentals
Jscript FundamentalsJscript Fundamentals
Jscript Fundamentals
rspaike
 
Webcast 09/2008 - Silverlight 2 Beta 2
Webcast 09/2008 - Silverlight 2 Beta 2Webcast 09/2008 - Silverlight 2 Beta 2
Webcast 09/2008 - Silverlight 2 Beta 2
sleguiza
 
Extending Schemas
Extending SchemasExtending Schemas
Extending Schemas
LiquidHub
 
2 Roads to Redemption - Thoughts on XSS and SQLIA
2 Roads to Redemption - Thoughts on XSS and SQLIA2 Roads to Redemption - Thoughts on XSS and SQLIA
2 Roads to Redemption - Thoughts on XSS and SQLIA
guestfdcb8a
 
Jquery 1
Jquery 1Jquery 1
Wpf Tech Overview2009
Wpf Tech Overview2009Wpf Tech Overview2009
Wpf Tech Overview2009
Our Community Exchange LLC
 
Wai Aria - An Intro
Wai Aria - An IntroWai Aria - An Intro
Wai Aria - An Intro
Matt Machell
 
Javazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicJavazone 2010-lift-framework-public
Javazone 2010-lift-framework-public
Timothy Perrett
 
Nhibernatethe Orm For Net Platform 1226744632929962 8
Nhibernatethe Orm For Net Platform 1226744632929962 8Nhibernatethe Orm For Net Platform 1226744632929962 8
Nhibernatethe Orm For Net Platform 1226744632929962 8
Nicolas Thon
 
Practical catalyst
Practical catalystPractical catalyst
Practical catalyst
dwm042
 
Advanced Oracle Troubleshooting
Advanced Oracle TroubleshootingAdvanced Oracle Troubleshooting
Advanced Oracle Troubleshooting
Hector Martinez
 
XML Schema Patterns for Databinding
XML Schema Patterns for DatabindingXML Schema Patterns for Databinding
XML Schema Patterns for Databinding
Paul Downey
 
Ajax
AjaxAjax
Ajax
jainaman
 
Sinatra
SinatraSinatra
Metaprogramming
MetaprogrammingMetaprogramming
Metaprogramming
Ganesh Samarthyam
 
Building AOL's High Performance, Enterprise Wide Mail Application With Silver...
Building AOL's High Performance, Enterprise Wide Mail Application With Silver...Building AOL's High Performance, Enterprise Wide Mail Application With Silver...
Building AOL's High Performance, Enterprise Wide Mail Application With Silver...
goodfriday
 
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixService Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMix
Bruce Snyder
 
Struts2
Struts2Struts2

Similar to Facilitating Rich Data Manipulation in BPEL using E4X (20)

Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client Development
 
NHibernate (The ORM For .NET Platform)
NHibernate (The ORM For .NET Platform)NHibernate (The ORM For .NET Platform)
NHibernate (The ORM For .NET Platform)
 
Jscript Fundamentals
Jscript FundamentalsJscript Fundamentals
Jscript Fundamentals
 
Webcast 09/2008 - Silverlight 2 Beta 2
Webcast 09/2008 - Silverlight 2 Beta 2Webcast 09/2008 - Silverlight 2 Beta 2
Webcast 09/2008 - Silverlight 2 Beta 2
 
Extending Schemas
Extending SchemasExtending Schemas
Extending Schemas
 
2 Roads to Redemption - Thoughts on XSS and SQLIA
2 Roads to Redemption - Thoughts on XSS and SQLIA2 Roads to Redemption - Thoughts on XSS and SQLIA
2 Roads to Redemption - Thoughts on XSS and SQLIA
 
Jquery 1
Jquery 1Jquery 1
Jquery 1
 
Wpf Tech Overview2009
Wpf Tech Overview2009Wpf Tech Overview2009
Wpf Tech Overview2009
 
Wai Aria - An Intro
Wai Aria - An IntroWai Aria - An Intro
Wai Aria - An Intro
 
Javazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicJavazone 2010-lift-framework-public
Javazone 2010-lift-framework-public
 
Nhibernatethe Orm For Net Platform 1226744632929962 8
Nhibernatethe Orm For Net Platform 1226744632929962 8Nhibernatethe Orm For Net Platform 1226744632929962 8
Nhibernatethe Orm For Net Platform 1226744632929962 8
 
Practical catalyst
Practical catalystPractical catalyst
Practical catalyst
 
Advanced Oracle Troubleshooting
Advanced Oracle TroubleshootingAdvanced Oracle Troubleshooting
Advanced Oracle Troubleshooting
 
XML Schema Patterns for Databinding
XML Schema Patterns for DatabindingXML Schema Patterns for Databinding
XML Schema Patterns for Databinding
 
Ajax
AjaxAjax
Ajax
 
Sinatra
SinatraSinatra
Sinatra
 
Metaprogramming
MetaprogrammingMetaprogramming
Metaprogramming
 
Building AOL's High Performance, Enterprise Wide Mail Application With Silver...
Building AOL's High Performance, Enterprise Wide Mail Application With Silver...Building AOL's High Performance, Enterprise Wide Mail Application With Silver...
Building AOL's High Performance, Enterprise Wide Mail Application With Silver...
 
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixService Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMix
 
Struts2
Struts2Struts2
Struts2
 

More from Tammo van Lessen

Behavior-driven Business Process Development with BPMN
Behavior-driven Business Process Development with BPMNBehavior-driven Business Process Development with BPMN
Behavior-driven Business Process Development with BPMN
Tammo van Lessen
 
Vorsicht Schuldenfalle - Was die IT aus der Finanzwelt lernen kann
Vorsicht Schuldenfalle - Was die IT aus der Finanzwelt lernen kannVorsicht Schuldenfalle - Was die IT aus der Finanzwelt lernen kann
Vorsicht Schuldenfalle - Was die IT aus der Finanzwelt lernen kann
Tammo van Lessen
 
Logging & Metrics
Logging & Metrics  Logging & Metrics
Logging & Metrics
Tammo van Lessen
 
Quality Assurance and Testing of Automated Business Processes
Quality Assurance and Testing of Automated Business ProcessesQuality Assurance and Testing of Automated Business Processes
Quality Assurance and Testing of Automated Business Processes
Tammo van Lessen
 
Business Process Management with BPMN & BPEL
Business Process Management  with BPMN & BPELBusiness Process Management  with BPMN & BPEL
Business Process Management with BPMN & BPEL
Tammo van Lessen
 
Web Service Composition mit WS-BPEL und dem Open-Source-Orchester
Web Service Composition mit WS-BPEL und dem Open-Source-OrchesterWeb Service Composition mit WS-BPEL und dem Open-Source-Orchester
Web Service Composition mit WS-BPEL und dem Open-Source-Orchester
Tammo van Lessen
 
BPM meets Semantic Web
BPM meets Semantic WebBPM meets Semantic Web
BPM meets Semantic Web
Tammo van Lessen
 
Virtualizing Services and Resources with ProBus: The WS-Policy-Aware Service...
Virtualizing Services and Resources with ProBus: The WS-Policy-Aware Service...Virtualizing Services and Resources with ProBus: The WS-Policy-Aware Service...
Virtualizing Services and Resources with ProBus: The WS-Policy-Aware Service...
Tammo van Lessen
 
SOA-based Business Integration with Eclipse BPEL and Apache ODE
SOA-based Business Integration with Eclipse BPEL and Apache ODESOA-based Business Integration with Eclipse BPEL and Apache ODE
SOA-based Business Integration with Eclipse BPEL and Apache ODE
Tammo van Lessen
 
Formalizing Message Exchange Patterns using BPEL light
Formalizing Message Exchange Patterns using BPEL lightFormalizing Message Exchange Patterns using BPEL light
Formalizing Message Exchange Patterns using BPEL light
Tammo van Lessen
 
BPM meets Semantic Web
BPM meets Semantic WebBPM meets Semantic Web
BPM meets Semantic Web
Tammo van Lessen
 
An Execution Engine For Semantic Business Processes
An Execution Engine For Semantic Business ProcessesAn Execution Engine For Semantic Business Processes
An Execution Engine For Semantic Business Processes
Tammo van Lessen
 
Web Services Orchestration with BPEL 2.0
Web Services Orchestration with BPEL 2.0Web Services Orchestration with BPEL 2.0
Web Services Orchestration with BPEL 2.0
Tammo van Lessen
 

More from Tammo van Lessen (13)

Behavior-driven Business Process Development with BPMN
Behavior-driven Business Process Development with BPMNBehavior-driven Business Process Development with BPMN
Behavior-driven Business Process Development with BPMN
 
Vorsicht Schuldenfalle - Was die IT aus der Finanzwelt lernen kann
Vorsicht Schuldenfalle - Was die IT aus der Finanzwelt lernen kannVorsicht Schuldenfalle - Was die IT aus der Finanzwelt lernen kann
Vorsicht Schuldenfalle - Was die IT aus der Finanzwelt lernen kann
 
Logging & Metrics
Logging & Metrics  Logging & Metrics
Logging & Metrics
 
Quality Assurance and Testing of Automated Business Processes
Quality Assurance and Testing of Automated Business ProcessesQuality Assurance and Testing of Automated Business Processes
Quality Assurance and Testing of Automated Business Processes
 
Business Process Management with BPMN & BPEL
Business Process Management  with BPMN & BPELBusiness Process Management  with BPMN & BPEL
Business Process Management with BPMN & BPEL
 
Web Service Composition mit WS-BPEL und dem Open-Source-Orchester
Web Service Composition mit WS-BPEL und dem Open-Source-OrchesterWeb Service Composition mit WS-BPEL und dem Open-Source-Orchester
Web Service Composition mit WS-BPEL und dem Open-Source-Orchester
 
BPM meets Semantic Web
BPM meets Semantic WebBPM meets Semantic Web
BPM meets Semantic Web
 
Virtualizing Services and Resources with ProBus: The WS-Policy-Aware Service...
Virtualizing Services and Resources with ProBus: The WS-Policy-Aware Service...Virtualizing Services and Resources with ProBus: The WS-Policy-Aware Service...
Virtualizing Services and Resources with ProBus: The WS-Policy-Aware Service...
 
SOA-based Business Integration with Eclipse BPEL and Apache ODE
SOA-based Business Integration with Eclipse BPEL and Apache ODESOA-based Business Integration with Eclipse BPEL and Apache ODE
SOA-based Business Integration with Eclipse BPEL and Apache ODE
 
Formalizing Message Exchange Patterns using BPEL light
Formalizing Message Exchange Patterns using BPEL lightFormalizing Message Exchange Patterns using BPEL light
Formalizing Message Exchange Patterns using BPEL light
 
BPM meets Semantic Web
BPM meets Semantic WebBPM meets Semantic Web
BPM meets Semantic Web
 
An Execution Engine For Semantic Business Processes
An Execution Engine For Semantic Business ProcessesAn Execution Engine For Semantic Business Processes
An Execution Engine For Semantic Business Processes
 
Web Services Orchestration with BPEL 2.0
Web Services Orchestration with BPEL 2.0Web Services Orchestration with BPEL 2.0
Web Services Orchestration with BPEL 2.0
 

Recently uploaded

Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Kunal Gupta
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
Priyanka Aash
 
Google I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged SlidesGoogle I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged Slides
Google Developer Group - Harare
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Torry Harris
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
bhumivarma35300
 
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
alexjohnson7307
 
Amul milk launches in US: Key details of its new products ...
Amul milk launches in US: Key details of its new products ...Amul milk launches in US: Key details of its new products ...
Amul milk launches in US: Key details of its new products ...
chetankumar9855
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
RaminGhanbari2
 
CiscoIconsLibrary cours de réseau VLAN.ppt
CiscoIconsLibrary cours de réseau VLAN.pptCiscoIconsLibrary cours de réseau VLAN.ppt
CiscoIconsLibrary cours de réseau VLAN.ppt
moinahousna
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
ssuser1915fe1
 
The importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT StandardizationThe importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT Standardization
Axel Rennoch
 
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
sunilverma7884
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
Using LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and MilvusUsing LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and Milvus
Zilliz
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
BrainSell Technologies
 
Figma AI Design Generator_ In-Depth Review.pdf
Figma AI Design Generator_ In-Depth Review.pdfFigma AI Design Generator_ In-Depth Review.pdf
Figma AI Design Generator_ In-Depth Review.pdf
Management Institute of Skills Development
 
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Muhammad Ali
 
WhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring AppsWhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring Apps
HackersList
 
Pigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending PlantPigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending Plant
LINUS PROJECTS (INDIA)
 

Recently uploaded (20)

Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
 
Google I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged SlidesGoogle I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged Slides
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
 
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
 
Amul milk launches in US: Key details of its new products ...
Amul milk launches in US: Key details of its new products ...Amul milk launches in US: Key details of its new products ...
Amul milk launches in US: Key details of its new products ...
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
 
CiscoIconsLibrary cours de réseau VLAN.ppt
CiscoIconsLibrary cours de réseau VLAN.pptCiscoIconsLibrary cours de réseau VLAN.ppt
CiscoIconsLibrary cours de réseau VLAN.ppt
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
 
The importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT StandardizationThe importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT Standardization
 
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
Using LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and MilvusUsing LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and Milvus
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
 
Figma AI Design Generator_ In-Depth Review.pdf
Figma AI Design Generator_ In-Depth Review.pdfFigma AI Design Generator_ In-Depth Review.pdf
Figma AI Design Generator_ In-Depth Review.pdf
 
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
 
WhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring AppsWhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring Apps
 
Pigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending PlantPigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending Plant
 

Facilitating Rich Data Manipulation in BPEL using E4X

  • 1. Facilitating Rich Data Manipulation in BPEL  using E4X Tammo van Lessen, Jörg Nitzsche, Dimka Karastoyanova Institute of Architecture of Application Systems (IAAS) University of Stuttgart Universitätsstr. 38 70569 Stuttgart Germany tammo.van.lessen@iaas.uni‐stuttgart.de
  • 2. The Talk Today Motivation and Introduction Combining WS‐BPEL with E4X Extension Assign Operation & Extension Activity Injecting BPEL variables Built‐in functions Conclusions © Tammo van Lessen 2
  • 3. Problem Statement Business Analyst Process Developer © Tammo van Lessen 3
  • 4. Low‐level Problems BPEL Variables must be initialized var TShoppingCart shoppingCart var TItem item var EItem eitem Data types are typically not aligned Create  Data mediation required Shopping selectionFailure Cart Array manipulation is cumbersome doXSLTransform AddItem Complete Custom XSL scripts needed Data type  Check Submit Reuse not possible mismatch Availability Order Add to Confirm doXSLTransform Cart © Tammo van Lessen 4
  • 5. Alternatives BPELJ Use plain old Java snippets Pro: Easy to use Con: W3C DOM still quite cumbersome Semantic Data Mediation SUPER technology Pro: Killer feature on the conceptual level Con: Requires too much modelling efforts <s:mediate inputVariable=quot;xquot; outputVariable=quot;yquot; mediatorIRI=quot;urn:anyquot;? /> © Tammo van Lessen 5
  • 6. What is JavaScript/E4X? JavaScript ECMA 262, Edition 3 JavaScript 1.6 E4X Proposed by BEA ECMA 357 XML support at the language level Literals, nodes, attributes, namespaces… XPath‐like syntax foreach… Allows nodesets as LHS expressions var items = <items> <item name=quot;SOA bookquot; price=quot;40quot; quantity=quot;2quot;/> <item name=quot;BPM bookquot; price=quot;35quot; quantity=quot;3quot;/> <item name=quot;EAI bookquot; price=quot;30quot; quantity=quot;1quot;/> </items>; alert( items.item.(@name == quot;SOA bookquot;).@quantity ); for each( var thisPrice in items..@price ) { sum += thisPrice; } 6 © Tammo van Lessen
  • 7. Using Javascript/E4X in BPEL <assign> <assign name=quot;e4x-assignquot;> <extensionAssignOperation> <js:snippet> myVar.TestPart += ' World'; </js:snippet> </extensionAssignOperation> </assign> <assign name=quot;e4x-array-assignquot;> <extensionAssignOperation> <js:snippet> load('shoppingCartUtils.js'); shoppingCart.parameters = createShoppingCartSkeleton(); shoppingCart.parameters.items += createCartItem(item); shoppingCart.parameters.items.item.(@hyped=='true').price *= 2; </js:snippet> </extensionAssignOperation> </assign> BPEL variables are injected into JS context Variables can be read and written 7 © Tammo van Lessen
  • 8. Using Javascript/E4X in BPEL <extensionActivities> <extensionActivity name=“adjustShippingDetailsquot;> <js:snippet> if (goldRatio > 1.0 || silverRatio > 1.0) { throwFault('urn:myprocess', 'IllegalArgumentFault', 'discount ratios must be <= 1.0'); } if (customer.type == 'gold') { po.items.item.price *= goldRatio; } else if (customer.type == 'silver') { po.items.item.price *= silverRatio; } else if (customer.type == 'besteffort') { po.shippingMode = 'snailmail'; } </js:snippet> </extensionActivity> JavaScript functions can be used to reuse such  snippets Use with caution! 8 © Tammo van Lessen
  • 9. Built‐in Functions load(…) Loads custom JS/E4X library print(…) Prints debug output to console piid() Returns process instance ID activityName() Returns activity name processName() Returns the process’ QName throwFault(namespace, localpart, faultmsg) throwFault(xmlobject) Throws a BPEL fault validate(…) Validates a variable’s content against its schema 9 © Tammo van Lessen
  • 10. Conclusions Variable Assignments in vanilla BPEL are cumbersome Adding items to lists is not possible Would require a nodeset as LHS expression Can be done using external XSL scripts Batch‐updating an XPath match is not possible Variable initialization is very verbose No reuse possible for recurring data manipulation tasks. Using E4X in BPEL Provides a convenient syntax for rich XML manipulation Reuse of such scripts across activities and processes is possible Simplifies array manipulation Implementation available Publicly available in Apache ODE Will be part of the upcoming 2.0 release 10 © Tammo van Lessen