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 recuperando o TimeZone com groovy
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Alex teles
August 07, 2016
Education
78
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Mulesoft recuperando o TimeZone com groovy
Mulesoft recuperando o TimeZone com groovy
Alex teles
August 07, 2016
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
MuleSoft mock com set payload
alexteles10
0
64
Como excluir o conector do facebook Do anyponit
alexteles10
0
78
Baixando conectores que não são nativos
alexteles10
0
67
Editor do Anypoint
alexteles10
0
55
MuleSoft Como fazer um when dentro de um when
alexteles10
0
73
Other Decks in Education
See All in Education
Antigravityを使ってGeminiAPI(NanobananaPro)と連携して挿絵メーカーを作った
yoshimura_datam
0
150
「答えを出す」より「わかる」をつくる
kzkmaeda
1
270
Gitがない時代 インターネットがない時代の 開発話
sapi_kawahara
0
370
2026年度春学期 統計学 第14回 分布についての仮説を検証する ― 仮説検定(1) (2026. 7. 2)
akiraasano
PRO
0
130
NDIAS Automotive / IoT CTF 2026 Recap - Keyfob & OSINT
himitu23
0
300
2026年度春学期 統計学 第15回 分布についての仮説を検証する ― 仮説検定(2) (2026. 7. 9)
akiraasano
PRO
0
110
Examen de Selectividad. Geografía junio 2026 (Convocatoria Ordinaria). UCLM
juanmartin2026
1
5.1k
[2026前期火5] 論理学(京都大学文学部 前期 第14回)「計算は、証明ではない——ハルシネーションを三層ハーモニーで診る」
yatabe
0
200
アラムコSTEAMチャレンジ 実践報告書
codeforeveryone
0
210
生成AI時代のエンジニア育成について考えてみた
akasan
0
220
子どものためのプログラミング道場『CoderDojo』〜法人提携例〜 / Partnership with CoderDojo Japan
coderdojojapan
PRO
4
19k
AWS Skill Builderを活用した一石二鳥の業務計画
ysaeki
0
130
Featured
See All Featured
The browser strikes back
jonoalderson
0
1.5k
Deep Space Network (abreviated)
tonyrice
0
270
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Claude Code のすすめ
schroneko
67
230k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
250
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
480
BBQ
matthewcrist
89
10k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
220
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Transcript
None
Conector groovy Uso Liguagem Pegando o TimeZone
Inserindo valor na variável no código groovy
Configuração do poll
Xml do poll <poll doc:name="Poll"> <schedulers:cron-scheduler expression="0 0
1 1 * ? 2016"/> <logger message="======= Iniciado ========" level="INFO" doc:name="Logger"/> </poll>
Configuração de variavel Note que ela está sem valor na
expressão
Xml da variavel <set-variable variableName="dataTimeZone" value="" doc:name="Variable"/>
Configuração do groovy para pegar o timeZone
Código que recupera o time nove da Asia/Saigon <scripting:component
doc:name="Groovy"> <scripting:script engine="Groovy"><![CDATA[import groovy.time.TimeCategory timeZone = TimeZone.getTimeZone('Asia/Saigon') now = new Date() flowVars ['dataTimeZone'] = now.format('dd/MM/yyyy HH:mm:ss.S',timeZone)]]></scripting:script> </scripting:component>
Log pra mostra a variavel com valor do TimeZone
Xml do Log que mostra a vareavel <logger message="#[flowVars.dataTimeZone]"
level="INFO" doc:name="Logger"/>
<?xml version="1.0" encoding="UTF-8"?> <mule xmlns:schedulers="http://www.mulesoft.org/schema/mule/schedulers" xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting" 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/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule- scripting.xsd http://www.mulesoft.org/schema/mule/schedulers http://www.mulesoft.org/schema/mule/schedulers/current/mule- schedulers.xsd"> <flow name="exemplo_groovy_timezoneFlow"> <poll doc:name="Poll"> <schedulers:cron-scheduler expression="0 0 1 1 * ? 2016"/> <logger message="======= Iniciado ========" level="INFO" doc:name="Logger"/> </poll> <set-variable variableName="dataTimeZone" value="" doc:name="Variable"/> <scripting:component doc:name="Groovy"> <scripting:script engine="Groovy"><![CDATA[import groovy.time.TimeCategory timeZone = TimeZone.getTimeZone('Asia/Saigon') now = new Date() flowVars ['dataTimeZone'] = now.format('dd/MM/yyyy HH:mm:ss.S',timeZone)]]></scripting:script> </scripting:component> <logger message="#[flowVars.dataTimeZone]" level="INFO" doc:name="Logger"/> </flow> </mule> Xml completo
Obrigado a todos Fim