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
65
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
78
Chamando um flow de dentro do Transform Message
alexteles10
0
58
MuleSoft Juntando duas ou mais Listas ordenadas
alexteles10
0
56
MuleSoft Como mockar resultado com transform mensager
alexteles10
0
32
MuleSoft mock com set payload
alexteles10
0
33
Como excluir o conector do facebook Do anyponit
alexteles10
0
58
Baixando conectores que não são nativos
alexteles10
0
46
Editor do Anypoint
alexteles10
0
38
MuleSoft Como fazer um when dentro de um when
alexteles10
0
37
Other Decks in Education
See All in Education
生成AIを活用できる大学教職員になる-基本と実践-
gmoriki
0
300
phygital__le_magasin_augmenté.pdf
martine
0
2.6k
Interactive Tabletops and Surfaces - Lecture 7 - Next Generation User Interfaces (4018166FNR)
signer
PRO
1
1.2k
4 занятие. Разбор бизнес-моделей и метод красной нити #ideaNN 9.02.2024.
karlov
0
230
Virtual and Augmented Reality - Lecture 8 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
1.2k
Data Processing and Visualisation Frameworks - Lecture 6 - Information Visualisation (4019538FNR)
signer
PRO
1
1.7k
View Manipulation and Reduction - Lecture 9 - Information Visualisation (4019538FNR)
signer
PRO
0
1.4k
第33回 JAWS-UG札幌 クラウド女子会コラボ 勉強会
nagisa53
2
360
パフォーマンス・チューニング入門
oracle4engineer
PRO
2
620
Visualisation Techniques - Lecture 8 - Information Visualisation (4019538FNR)
signer
PRO
0
1.7k
令和6年度 無料トライアルキャンペーン説明会
asial_edu
0
850
財務分析 - 入門編
lsuzuki
0
370
Featured
See All Featured
Web Components: a chance to create the future
zenorocha
305
41k
A Modern Web Designer's Workflow
chriscoyier
689
190k
The MySQL Ecosystem @ GitHub 2015
samlambert
243
12k
Building Adaptive Systems
keathley
31
1.9k
How to name files
jennybc
65
93k
RailsConf 2023
tenderlove
4
540
Building a Scalable Design System with Sketch
lauravandoore
456
32k
Git: the NoSQL Database
bkeepers
PRO
422
63k
Stop Working from a Prison Cell
hatefulcrawdad
266
19k
Rails Girls Zürich Keynote
gr2m
91
13k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
40
4.4k
The Language of Interfaces
destraynor
151
23k
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