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
73
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
110
Chamando um flow de dentro do Transform Message
alexteles10
0
82
MuleSoft Juntando duas ou mais Listas ordenadas
alexteles10
0
76
MuleSoft Como mockar resultado com transform mensager
alexteles10
0
49
MuleSoft mock com set payload
alexteles10
0
60
Como excluir o conector do facebook Do anyponit
alexteles10
0
74
Baixando conectores que não são nativos
alexteles10
0
64
Editor do Anypoint
alexteles10
0
52
MuleSoft Como fazer um when dentro de um when
alexteles10
0
71
Other Decks in Education
See All in Education
2026年度春学期 統計学 第4回 データを「分布」で見る (2026. 4. 30)
akiraasano
PRO
0
140
SARA Annual Report 2025-26
sara2023
1
360
Human-AI Interaction - Lecture 11 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
1.1k
The Art & Science of Elearning
tmiket
1
220
「機械学習と因果推論」入門 ③ 漸近効率な推定量と二重機械学習
masakat0
0
690
0526
cbtlibrary
0
160
教育現場から見た Ruby on Rails
yasslab
PRO
0
170
Science Tokyo国際卓越研究大学計画_202604
sciencetokyo
PRO
0
4.3k
Dashboards - Lecture 11 - Information Visualisation (4019538FNR)
signer
PRO
1
2.7k
0506
cbtlibrary
0
190
事業紹介資料(トレーナー養成講座)
kentaro1981
0
450
良い塩梅を実現する、AWSネットワーク3分クッキング
masakiokuda
1
260
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Raft: Consensus for Rubyists
vanstee
141
7.5k
Producing Creativity
orderedlist
PRO
348
40k
Fireside Chat
paigeccino
42
4k
The Curious Case for Waylosing
cassininazir
1
390
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.7k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
150
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