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 mock com set payload
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Alex teles
January 09, 2017
Education
64
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
MuleSoft mock com set payload
MuleSoft mock com set payload
Alex teles
January 09, 2017
More Decks by Alex teles
See All by Alex teles
Mulesoft configurando conexão com banco AS400 DB2
alexteles10
0
120
Chamando um flow de dentro do Transform Message
alexteles10
0
85
MuleSoft Juntando duas ou mais Listas ordenadas
alexteles10
0
82
MuleSoft Como mockar resultado com transform mensager
alexteles10
0
52
Como excluir o conector do facebook Do anyponit
alexteles10
0
79
Baixando conectores que não são nativos
alexteles10
0
68
Editor do Anypoint
alexteles10
0
56
MuleSoft Como fazer um when dentro de um when
alexteles10
0
74
MuleSoft Property configuração
alexteles10
0
65
Other Decks in Education
See All in Education
エビデンスベースト英語教育入門:エビデンスは科学的知見(だけ)ではない,制度だ!
terasawat
0
200
면접관 눈에 띄는 데이터 분석 포트폴리오 만드는 법 | 2026년 5월 세미나
datarian
0
1.1k
Beyond the Prompt: Programming as a Pathway to Statistical Thinking
minecr
0
350
Examen de Selectividad. Geografía julio 2026 (Convocatoria Extraordinaria). UCLM
juanmartin2026
1
13k
セキュリティ担当がいない中小医療機関を院外のRISSはどう支えるべきか / How External RISS Can Help Small Medical Institutions
eller86
0
170
学習者データを「見る」:外国語教師のためのデータの入力、分析、解釈方法
uranoken
0
300
[2026前期火5] 論理学(京都大学文学部 前期 第6回)「かつとまたはの規則」
yatabe
0
500
Visionary Initiative: Future Intelligence — Laying the foundations for the future of science, intelligence, and society | Science Tokyo
sciencetokyo
PRO
0
290
Claudeに作らせた線形代数講義資料(数回分)
take326
0
110
[2026前期火5] 論理学(京都大学文学部 前期 第12回)「証明を走らせる:カリー・ハワード対応」
yatabe
0
300
AI-Based Speaking Assessment of a Short-Term Study Abroad Program
uranoken
0
480
チームの鏡になるー自分の癖を知ると、チームのパターンが見えてくる@スクフェス仙台
saorimurooka
0
170
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
5.2k
A Soul's Torment
seathinner
7
3.5k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
560
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
Building Applications with DynamoDB
mza
96
7.2k
BBQ
matthewcrist
89
10k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
250
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Darren the Foodie - Storyboard
khoart
PRO
3
3.9k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.9k
New Earth Scene 8
popppiees
3
2.5k
Transcript
MuleSoft 2017
Hoje vamos falar de mock dados usando o Set
payload
Vamos criar um fluxo com da seguinte forma (Poll, set
Payload, Transform Message, log)
Mude a execução do Poll para minutos para não executa
a cada um segundo
Nosso transform espera receber uma lista de json com (Nome,
Descricao e Valor) então preciso passa essa estrutura com valores para testar.
Estrutura json [ { "Nome":"pao", "Descricao":"pao de queijo", "Valor":"1"
}, { "Nome":"queijo", "Descricao":"queijo coalho", "Valor":"2" } ]
No Set Payload no quadro value você tem que preenche
com o json semelhante com a esperada
Json setado no set payload e type MIME e Encoging
Rodando o projeto em modo Debug com break no Set
payload Payload vázio
Depois do set Payload o valor do set payload foi
atribuído ao payload
Resultado depois do transform uma lista conforme a saída setado
no transform
<?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", "Valor":"1" },
{ "Nome":"queijo", "Descricao":"queijo coalho", "Valor":"2"
} ]" encoding="UTF-8" mimeType="application/json" doc:name="Set Payload"/> <dw:transform-message metadata:id="a1c6eb81-1b6a-4655-b17f-2ee3d5afb0e0" doc:name="Transform Message"> <dw:input-payload doc:sample="input.json" mimeType="application/json"/> <dw:set-payload><![CDATA[%dw 1.0 %output application/java --- payload map ((payload01 , indexOfPayload01) -> { name: payload01.Nome, description: payload01.Descricao, value: payload01.Valor })]]></dw:set-payload> </dw:transform-message> <logger message="=====resultado======#[message.payloadAs(java.lang.String)]" level="INFO" doc:name="Logger"/> </flow> </mule>
FIM