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
Alex teles
August 07, 2016
Education
0
67
Mulesoft recuperando o TimeZone com groovy
Mulesoft recuperando o TimeZone com groovy
Alex teles
August 07, 2016
Tweet
Share
More Decks by Alex teles
See All by Alex teles
Mulesoft configurando conexão com banco AS400 DB2
alexteles10
0
89
Chamando um flow de dentro do Transform Message
alexteles10
0
71
MuleSoft Juntando duas ou mais Listas ordenadas
alexteles10
0
67
MuleSoft Como mockar resultado com transform mensager
alexteles10
0
40
MuleSoft mock com set payload
alexteles10
0
45
Como excluir o conector do facebook Do anyponit
alexteles10
0
66
Baixando conectores que não são nativos
alexteles10
0
57
Editor do Anypoint
alexteles10
0
42
MuleSoft Como fazer um when dentro de um when
alexteles10
0
45
Other Decks in Education
See All in Education
20250611_なんでもCopilot1年続いたぞ~
ponponmikankan
0
170
万博マニアックマップを支えるオープンデータとその裏側
barsaka2
0
810
GitHubとAzureを使って開発者になろう
ymd65536
1
160
バックオフィス組織にも「チームトポロジー」の考えが使えるかもしれない!!
masakiokuda
0
130
小学校女性教員向け プログラミング教育研修プログラム「SteP」の実践と課題
codeforeveryone
0
110
(2025) L'origami, mieux que la règle et le compas
mansuy
0
130
情報科学類で学べる専門科目38選
momeemt
0
590
生成AIとの上手な付き合い方【公開版】/ How to Get Along Well with Generative AI (Public Version)
handlename
0
630
2025年度春学期 統計学 第14回 分布についての仮説を検証する ー 仮説検定(1) (2025. 7. 10)
akiraasano
PRO
0
140
[FUN Open Campus 2025] 何でもセンシングしていいですか?
pman0214
0
240
教える側は、初学者に谷越えまで伴走すべき(ダニング・クルーガー効果からの考察)
hysmrk
3
140
Alumnote inc. Company Deck
yukinumata
0
2k
Featured
See All Featured
Practical Orchestrator
shlominoach
190
11k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.9k
YesSQL, Process and Tooling at Scale
rocio
173
14k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
A Modern Web Designer's Workflow
chriscoyier
696
190k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
51
5.6k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
Building Applications with DynamoDB
mza
96
6.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
840
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Unsuck your backbone
ammeep
671
58k
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