Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
MuleSoft Juntando duas ou mais Listas ordenadas
Search
Alex teles
January 10, 2017
Education
0
70
MuleSoft Juntando duas ou mais Listas ordenadas
MuleSoft Juntando duas ou mais Listas ordenadas
Alex teles
January 10, 2017
Tweet
Share
More Decks by Alex teles
See All by Alex teles
Mulesoft configurando conexão com banco AS400 DB2
alexteles10
0
94
Chamando um flow de dentro do Transform Message
alexteles10
0
76
MuleSoft Como mockar resultado com transform mensager
alexteles10
0
44
MuleSoft mock com set payload
alexteles10
0
54
Como excluir o conector do facebook Do anyponit
alexteles10
0
69
Baixando conectores que não são nativos
alexteles10
0
59
Editor do Anypoint
alexteles10
0
45
MuleSoft Como fazer um when dentro de um when
alexteles10
0
49
MuleSoft Property configuração
alexteles10
0
60
Other Decks in Education
See All in Education
Use Cases and Course Review - Lecture 8 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
1.3k
Cifrado asimétrico
irocho
0
370
RGBでも蛍光を!? / RayTracingCamp11
kugimasa
2
310
コマンドラインを見直そう(1995年からタイムリープ)
sapi_kawahara
0
630
焦りと不安を、技術力に変える方法 - 新卒iOSエンジニアの失敗談と成長のフレームワーク
hypebeans
1
630
Web 2.0 Patterns and Technologies - Lecture 8 - Web Technologies (1019888BNR)
signer
PRO
0
3k
Padlet opetuksessa
matleenalaakso
9
15k
沖ハック~のみぞうさんとハッキングチャレンジ☆~
nomizone
1
540
俺と地方勉強会 - KomeKaigi・地方勉強会への期待 -
pharaohkj
1
1.6k
核軍備撤廃に向けた次の大きな一歩─核兵器を先には使わないと核保有国が約束すること
hide2kano
0
200
子どもが自立した学習者となるデジタルの活用について
naokikato
PRO
0
170
生成AIとの付き合い方 / Generative AI and us
kaityo256
PRO
13
6.8k
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
300
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
140
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
200
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
110
Designing Powerful Visuals for Engaging Learning
tmiket
0
190
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.1k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
110
30 Presentation Tips
portentint
PRO
1
180
Transcript
MuleSoft 2017
Juntando duas ou mais Listas ordenadas
Visão geral de como vai ser feito no exemplo
Exemplo de Payload que vamos usar de como dever ser
a saída.
Configuração do Poll
Primeira lista setada no payload do type json
Segunda lista setada como uma lista de Strings java
Terceira lista setada como inteiro
Como vai ficar a saída
Lista 1 Lista 2 Lista 3 Lista 1 Lista 2
Lista 3
Index das listas
Rodando o projeto em odo degug
Payload antes de justar as listas Variáveis com as listas
Listas mescladas
XML Gerado
<?xml version="1.0" encoding="UTF-8"?> <mule xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" xmlns:metadata="http://www.mulesoft.org/schema/mule/metadata" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd"> <flow name="mock-set-payloadFlow"> <poll doc:name="Poll"> <fixed-frequency-scheduler frequency="1000" timeUnit="MINUTES"/> <logger message="====Start=====" level="INFO" doc:name="Logger"/> </poll> <set-payload value="[
{"Nome":"pao", "Descricao":"pao de queijo"}, {"Nome":"queijo", "Descricao":"queijo coalho"}, {"Nome":"Pipoca","Descricao":"Pipoca com mantega"}
]" doc:name="Set Payload" mimeType="application/json"/> <set-variable variableName="varValores" value="#[['10','221','399']]" mimeType="application/java" doc:name="Variable_valores"/> <set-variable variableName="varQTD" value="#[[3,1,10]]" doc:name="Variable_quantidades"/> <dw:transform-message metadata:id="26f9ac57-0bb8-4858-9518-148549e84370" doc:name="Transform Message"> <dw:input-payload mimeType="application/json"/> <dw:set-payload><![CDATA[%dw 1.0 %output application/java
--- payload map ((payloadProduto , index) -> { Name: payloadProduto.Nome,
Description: payloadProduto.Descricao, Value: flowVars.varValores[index], Quantity: flowVars.varQTD[index] })]]></dw:set-payload> </dw:transform-message> <logger message="=====resultado======#[message.payloadAs(java.lang.String)]" level="INFO" doc:name="Logger"/> </flow> </mule>
Bom Chegamos ou FIM Obrigado a todos