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
69
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
100
Chamando um flow de dentro do Transform Message
alexteles10
0
78
MuleSoft Juntando duas ou mais Listas ordenadas
alexteles10
0
73
MuleSoft Como mockar resultado com transform mensager
alexteles10
0
46
MuleSoft mock com set payload
alexteles10
0
55
Como excluir o conector do facebook Do anyponit
alexteles10
0
71
Baixando conectores que não são nativos
alexteles10
0
61
Editor do Anypoint
alexteles10
0
46
MuleSoft Como fazer um when dentro de um when
alexteles10
0
61
Other Decks in Education
See All in Education
Measuring your measuring
jonoalderson
2
750
国際卓越研究大学計画|Science Tokyo(東京科学大学)
sciencetokyo
PRO
0
48k
演習:GitHubの基本操作 / 06-github-basic
kaityo256
PRO
0
210
【ベテランCTOからのメッセージ】AIとか組織とかキャリアとか気になることはあるけどさ、個人の技術力から目を背けないでやっていきましょうよ
netmarkjp
2
4k
0203
cbtlibrary
0
140
心理学を学び活用することで偉大なスクラムマスターを目指す − 大学とコミュニティを組み合わせた学びの循環 / Becoming a great Scrum Master by learning and using psychology
psj59129
1
2k
Information Architectures - Lecture 2 - Next Generation User Interfaces (4018166FNR)
signer
PRO
1
1.9k
SJRC 2526
cbtlibrary
1
220
Data Presentation - Lecture 5 - Information Visualisation (4019538FNR)
signer
PRO
0
3k
栃木にいても「だいじ」だっぺ〜! 栃木&全国アジャイルコミュニティへの参加・運営の魅力
sasakendayo
1
180
L'artisanat logiciel à l'heure du numérique responsable
thirion
0
120
2025年の本当に大事なAI動向まとめ
frievea
1
200
Featured
See All Featured
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
71
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
WENDY [Excerpt]
tessaabrams
9
36k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
980
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
67
37k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
550
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
180
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
140
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.9k
Unsuck your backbone
ammeep
672
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