Weitere ähnliche Inhalte Ähnlich wie Mule soft meetup warsaw november 13th, 2019 (20) Mehr von Patryk Bandurski (8) Kürzlich hochgeladen (20) Mule soft meetup warsaw november 13th, 20193. All contents © MuleSoft Inc.
Agenda
3
• Community updates
• Migration Case Study (Mule 3 to Mule 4)
• Networking time
• Disscussions
• What’s next & Close
6. All contents © MuleSoft Inc.
Organizer
• Senior Integration Developer at PwC Poland
• MuleSoft Ambassador
• MuleSoft Meetup Leader for Warsaw, Poland
• Latest Salesforce Trailblazer
https://trailhead.salesforce.com/trailblazers/p
atryk-bandurski
• Integration Blog
http://ambassadorpatryk.com/blog
• Working with MuleSoft products for over 8
years now
Patryk Bandurski
7. All contents © MuleSoft Inc.
Speaker
7
• Senior Integration Consultant at BlueSoft
• 6+ years in Integration as Developer,
System Analyst & Solution Architect on
multiple platforms
• Mulesoft Certified Developer – Level 1
(Mule 4)
• Mulesoft Certified Developer – Integration
& API Associate
• https://www.linkedin.com/in/krzysztof-
hałasa-279b69a4
Krzysztof Hałasa
8. All contents © MuleSoft Inc.
Share
8
• Share the Meetup in your social media
• Use Hashtags
– #MuleSoftMeetup
– #WarsawMuleSoftMeetup
Thanks
9. All contents © MuleSoft Inc. 9
Would you like to present some cool topic at the next Meetup?
To submit your idea, fill out this form:
https://tinyurl.com/become-speaker
Become a Speaker at the Meetup
14. All contents © MuleSoft Inc.
18,000+ members ready to help.
14
https://help.mulesoft.com/
• Check out the “MuleSoft
Training” category for all
training and certification-
related questions
Replaced with Help Center
15. All contents © MuleSoft Inc.
Warsaw MuleSoft Meetup Group
15
• https://tinyurl.com/warsaw-group
• On MuleSoft Help center
• Why?
– Suggest topics
– Discuss event’s topics
– Discuss anything you like
– Ask questions
– See updates regarding our
group!
Register today
17. All contents © MuleSoft Inc.
Topics to discuss today
17
1. Basic differences
– Coding ’habits’
– Error handling
2. Reference elements differences
– Salesforce
– VM Queue
– Databases
– Scripts
18. All contents © MuleSoft Inc.
Sample Services Concept - 1
18
HTTP
• POST #1
Salesforce
• Get data
– simple
SOQL
• Get data
– dynamic
SOQL
VM
• Salesforce
Data
• Additional
properties
Database
• Insert
salesforce
data with
properties
19. All contents © MuleSoft Inc.
Sample Services Concept - 2
19
HTTP
• POST #2
Script
• Prepare
Query in
Javascript
Database
• Run
prepared
query
(select)
JSON
Response
• Present
data
20. All contents © MuleSoft Inc.
Mule 3 Mule 4
Coding ’habits’ – properties, configurations etc.
20
• Anypoint Studio 6
– Both Community & Enterprise
• Manually setting-up Maven
• Property Placeholder
• Message Properties, Mule
Expression Language, DataWeave
1.0
• Anypoint Studio 7
– Only for Enterprise
– Intellij + Mule plugin for Community
• Ready-to-use Maven
• Configuration properties
• DataWeave 2.0
21. All contents © MuleSoft Inc.
Mule 3 Mule 4
Salesforce
21
• Single Salesforce Block
• SOQL - Query Builder
• Multiple
Salesforce Blocks
• No SOQL - Query
Builder
– but we used
Salesforce API
and wrote a
simple http
request to
access all
column names:
salesforceObject
sDescriptionFlow
22. All contents © MuleSoft Inc.
Salesforce – code example
22
Mule 3 Mule 4
Sometimes do not trust Anypoint Platform error list
23. All contents © MuleSoft Inc.
Mule 3 Mule 4
VM Queue
23
• Dynamically-set queue names
• Not possible(?) to get data from
queue on-demand
– or your speaker does not know how to do it
• Message property
• Need to define queue names ’up-
front’ in VM properties
• Easy getting data on-demand from
queue
• No message properties (?)
– or your speaker does not know how to do it
24. All contents © MuleSoft Inc.
Mule 3 Mule 4
VM Queue – code example
24
25. All contents © MuleSoft Inc.
• Multiple Database Blocks
• One Database Config Block
• DataWeave parameters in SQL Code
as prefered option
Mule 3 Mule 4
Databases
25
• One Database Block
• Multiple Database Config Blocks
• #[…] working in SQL Code
26. All contents © MuleSoft Inc.
Databases – code example
26
Mule 3 Mule 4
27. All contents © MuleSoft Inc.
Databases – known issues in Mule 4
27
Database connections
Out-of-memory on Mule Server caused by db-connector
Database connections are not being closed after flow processing end:
https://help.mulesoft.com/s/question/0D72T000003t3JO/database-connections-are-not-closing
Database connectors are consuming a lot of memory, causing OutOfMemory exception
Solution: Use try-catch block for each database call, and configure max/min pool
size in Database Config.
Solution: Upgrade mule-db-connector from 1.4.x to 1.5.x in pom.xml
29. All contents © MuleSoft Inc.
Mule 3 Mule 4
Scripts
29
• Multiple blocks for scripting
– One block also available – so a bit
’messy’
• message.setInvocationProperty(..)
as a method to set any number of
variables you want in one script
• One block for scripting
• No functions to set multiple
variables
– or your speaker does not know how to do it
– You can build your payload/variable,
so variables values can be set-up as
script-output elements, and re-write
to Mule Variable.
30. All contents © MuleSoft Inc.
Mule 3 Mule 4
Scripts – code example
30
31. All contents © MuleSoft Inc.
Mule 3 Mule 4
Error handling
31
• * Exception Strategy
– Catch
– Choice
– Custom
– Reference
– Rollback
– Mapping
• Try-Catch block
• On Error Continue / On Error
Propagate
32. All contents © MuleSoft Inc.
Mule 3 Mule 4
Error handling – code example
32
33. All contents © MuleSoft Inc.
Summary
33
• Mule 3 and Mule 4 has differences we cannot underrestimate during
migration project planning.
• So far – no migration tool. Each service we need to re-write code we have in
Mule 3 to be compatible with Mule 4.
• Not that hard to re-learn – useful course:
https://training.mulesoft.com/course/mulesoftu-mule443
• In my opinion, Mule 4 is more mature in concept – but has some difficulties
we need to overcome as is quite fresh platform.
35. All contents © MuleSoft Inc.
Materials
35
• High-level article about Mule 4 migrations:
– https://blog.bluesoft.com/mule-4-migration/
– https://docs.mulesoft.com/mule-runtime/4.2/migration-process
• MuleSoft Documenation
– https://docs.mulesoft.com/mule-runtime/4.2/migration-core
– https://docs.mulesoft.com/mule-runtime/4.2/migration-cheat-
sheet
36. All contents © MuleSoft Inc.
Kahoot!
36
• Interactive quizes/surveys
• From the web browser
• Visit the page
kahoot.it
and provide
• PIN number
• Your nick
37. All contents © MuleSoft Inc.
Let’s get familiar with
the Kahoot by a quick
4 questions warm up
Kahoot warmup!
38. All contents © MuleSoft Inc.
For 3 winners a special
prize is ready, so take
part in the trivia quiz
Trivia
39. All contents © MuleSoft Inc.
What’s next
39
• Feedback:
– Contact your organizer Patryk Bandurski via e-mail or LinkedIn profile to suggest
topics
– Contact MuleSoft at meetup@mulesoft.com for ways to improve the program
• Our next meetup:
– Date: Q1 2020
– Topic: not known yet
40. All contents © MuleSoft Inc.
What’s next
40
Invite your network to join
– https://meetups.mulesoft.com/warsaw/
Hinweis der Redaktion And as always, MuleSoft Forums are a great place to ask questions, give and get help. More than 18,000 members are ready to help, from all around the world.
Before posting your question, make sure to check if it has been asked before.
If you’re able to help another developer in need, don’t hesitate! The forum is really about getting help and giving back, and it’s a great way to to build your presence / reputation within the MuleSoft community.
There’s a section dedicated to Training in the forum, make sure to check it out if you have additional questions coming up afterwards. Basic differences – specyficzne zmiany, które dotyczą niemal każdego projektu
Reference elements differences – wybrane konektory/elementy, na których pokażę różnice w kodzie. https://play.kahoot.it/v2/lobby?quizId=211c4cc7-2ecb-4c5c-8eb6-b1066f176c42 https://create.kahoot.it/details/warsaw-mulesoft-meetup-5-trivia/1bd4c442-0701-4b65-b603-5fb51baa8cb1