Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
MuleSoft Juntando duas ou mais Listas ordenadas
Alex teles
January 10, 2017
Education
0
47
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
69
Chamando um flow de dentro do Transform Message
alexteles10
0
48
MuleSoft Como mockar resultado com transform mensager
alexteles10
0
21
MuleSoft mock com set payload
alexteles10
0
30
Como excluir o conector do facebook Do anyponit
alexteles10
0
51
Baixando conectores que não são nativos
alexteles10
0
42
Editor do Anypoint
alexteles10
0
34
MuleSoft Como fazer um when dentro de um when
alexteles10
0
28
MuleSoft Property configuração
alexteles10
0
39
Other Decks in Education
See All in Education
2 Mirovaya
libshare
0
220
子どもを抱えた転職活動
eririmba
1
430
American Progress: John Gast's Spirit of Manifest Destiny
oripsolob
0
780
Baparekraf Developer Day 2022 - Back-End (Dimas Maulana Dwi Saputra)
dicodingevent
0
480
英語授業研究学会・関東支部 第28回春季研究大会(山﨑資料)
hirokiyamazaki
0
280
How learning Chinese made me a better Python instructor
reuven
0
310
An introduction to network flow problems and algorithms
umepon
0
110
読書に悩むあなたに贈る50の読書方法カタログ / reading catalog Best50
aki_moon
8
1.9k
Цифровые финансы - магистерская программа Финэка МГИМО
epogrebnyak
0
210
「まず、やってみる」で変わり始めた世界
hfuruya
0
150
2021年度「コンピュータサイエンス教育」の カリキュラム開発に向けての実証研究
codeforeveryone
1
720
The Adventure of Kotlin and Compose Through The Multiplatform World
cmota
2
200
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
261
37k
Infographics Made Easy
chrislema
233
17k
Fontdeck: Realign not Redesign
paulrobertlloyd
73
4.1k
Art, The Web, and Tiny UX
lynnandtonic
280
17k
Building Flexible Design Systems
yeseniaperezcruz
310
34k
WebSockets: Embracing the real-time Web
robhawkes
57
5.4k
Building a Scalable Design System with Sketch
lauravandoore
448
30k
A Tale of Four Properties
chriscoyier
149
21k
Stop Working from a Prison Cell
hatefulcrawdad
261
17k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
37
3.3k
Bash Introduction
62gerente
597
210k
BBQ
matthewcrist
74
7.9k
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