<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.4" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Ankiewsky Blog</title>
	<link>http://edgarsilva.com.br</link>
	<description>Edgar Silva</description>
	<pubDate>Sun, 06 Jul 2008 00:59:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.4</generator>
	<language>en</language>
			<item>
		<title>Um pouco de história e cultura: Presença Judaica na Amazonia</title>
		<link>http://edgarsilva.com.br/2008/07/06/um-pouco-de-historia-e-cultura-presenca-judaica-na-amazonas/</link>
		<comments>http://edgarsilva.com.br/2008/07/06/um-pouco-de-historia-e-cultura-presenca-judaica-na-amazonas/#comments</comments>
		<pubDate>Sun, 06 Jul 2008 00:55:53 +0000</pubDate>
		<dc:creator>Edgar Silva</dc:creator>
		
	<category>off-topic</category>
		<guid isPermaLink="false">http://edgarsilva.com.br/2008/07/06/um-pouco-de-historia-e-cultura-presenca-judaica-na-amazonas/</guid>
		<description><![CDATA[Tirando as muitas piadas dos meu amigos mais próximos, com minha descendência judaica,que de fato sao engraçadas, uma grande amiga resolveu mandar algo mais útil, me mandou um link interessante da revista Veja que fala sobre alguns movimentos de imigração judaica para &#8220;aquelas bandas&#8221;, o que torna muito difícil de rastrear é o fato das [...]]]></description>
			<content:encoded><![CDATA[<p>Tirando as muitas piadas dos meu amigos mais próximos, com minha descendência judaica,que de fato sao engraçadas, uma grande amiga resolveu mandar algo mais útil, me mandou um link interessante da revista Veja que fala sobre alguns movimentos de imigração judaica para &#8220;aquelas bandas&#8221;, o que torna muito difícil de rastrear é o fato das mudanças de nome ou as adaptações. Veja a seguir a matéria:</p>
<p><!-- #BeginEditable "corpo" --><strong><span class="chapeu">Vida brasileira<br />
</span><span class="titulo">Amazônia, terra prometida</span></strong></p>
<p>A história dos judeus sefarditas que<br />
emigraram para o Pará e o Amazonas<span class="assinatura"><br />
Leonardo Coutinho</span></p>
<table width="350" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td><span class="credito">Octavio Cardoso<br />
</span> <img width="350" height="211" src="http://veja.abril.com.br/080306/imagens/vida_brasileira1.jpg" /></td>
</tr>
<tr>
<td class="legenda"><span class="legendaLaranja">A FAMÍLIA                    BARCESSAT<br />
</span> O clã do engenheiro Isaac Barcessat, de 74 anos<em>                    (no círculo branco da foto acima),</em> foi dos poucos                    que conseguiram manter as raízes judaicas intactas. Barcessat                    é neto de sefarditas marroquinos que imigraram para o                    Pará no século XIX. Seu avô, Fortunato Athias,                    começou a vida no Brasil em 1880, fabricando cachaça.                    Depois, tornou-se dono de um seringal e, finalmente, estabeleceu-se                    na cidade de Breves, no Pará. Lá, nasceu Ana,                    a mãe de Barcessat <em>(no círculo branco da foto                    abaixo). </em></td>
</tr>
<tr>
<td><span class="credito">Arquivo pessoal<br />
</span> <img width="350" height="313" src="http://veja.abril.com.br/080306/imagens/vida_brasileira2.jpg" /></td>
</tr>
</table>
<table width="270" cellspacing="0" cellpadding="1" border="0" bgcolor="#000000" align="right">
<tr>
<td>
<table width="100%" cellspacing="0" cellpadding="11" border="0" bgcolor="#eeeeee">
<tr>
<td>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td><img width="70" height="14" src="http://veja.abril.com.br/veja_online_2003/imagens/retrancas/vejaTambem.gif" /></td>
</tr>
<tr>
<td><img height="8" src="http://veja.abril.com.br/veja_online_2003/imagens/pixTransp.gif" /></td>
</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td valign="top" colspan="2"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">NESTA                                REPORTAGEM</font></td>
</tr>
<tr>
<td valign="top" style="width: 8px"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><img vspace="3" src="http://veja.abril.com.br/veja_online_2003/imagens/setLarjD.gif" /></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><a href="javascript:Janela('pop_vida.html','T1','620','175');">Quadro:                                As ondas de imigração judaica</a></strong></font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p align="left"><span class="texto">O Brasil recebeu cinco ondas de                imigração judaica. A primeira ocorreu em 1630, quando                Pernambuco foi tomado pelos holandeses. Nos 24 anos de dominação                holandesa no Nordeste, eles fundaram a primeira colônia hebraica                e a primeira sinagoga na América. Sob um governo de tolerância                religiosa, os judeus chegaram a constituir 50% da população                branca pernambucana nesse período. Com a derrota dos holandeses,                os judeus perderam seus negócios. Expulsos, ajudaram a fundar                Nova Amsterdã, hoje Nova York. Dessa fase, sobraram apenas                as ruínas da sinagoga pernambucana. A segunda leva deixou                marcas mais profundas, embora não aparentes. No início                do século XIX, judeus marroquinos emigraram para a Amazônia.                Eles foram atraídos pela promessa de liberdade de culto e                por uma campanha publicitária internacional feita pelo governo                da então província do Grão-Pará. Em                1880, chegaram a Manaus. A assimilação desses sefarditas                (como são chamados os judeus do norte da África) foi                tamanha que, atualmente, a proporção de descendentes                de judeus entre a população branca da Região                Norte é a maior do país.</span><span class="texto">                </span></p>
<table width="300" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td><span class="credito">Ricardo Oliveira<br />
</span> <img width="300" height="151" src="http://veja.abril.com.br/080306/imagens/vida_brasileira3.jpg" /></td>
</tr>
<tr>
<td class="legenda"><span class="legendaLaranja">UM RABINO QUE                    VIROU SANTO<br />
</span> Em 1908, rabinos marroquinos enviaram um representante,                    Shalom Emanuel Muyal, para fiscalizar o cumprimento das regras                    judaicas pelos imigrantes na Amazônia. Muyal morreu dois                    anos depois. Ninguém sabe o motivo pelo qual ele ganhou                    fama de milagreiro entre os católicos de Manaus. Seu                    túmulo é alvo de peregrinações</td>
</tr>
</table>
<p align="left"><span class="texto">Uma investigação                genética dos brasileiros feita pela Universidade Federal                de Minas Gerais mostra que 16% da população da Amazônia                que se declara branca tem algum judeu entre seus antepassados. É                uma proporção muito maior do que a exibida por São                Paulo, onde vivem 60% dos 120.000 judeus brasileiros, ou por Pernambuco,                estado no qual essa cifra não supera 2%. A razão para                haver tantos descendentes de judeus na Amazônia se deve a                uma peculiaridade. Nos primeiros anos do século XIX, praticamente                só entraram no Brasil sefarditas do sexo masculino. Os mais                ricos conseguiram abrir lojas de secos e molhados em Belém                e outras cidades da região. A maioria, porém, adotou                a profissão de regatão, como é conhecido o                caixeiro-viajante que troca mercadorias industrializadas por produtos                da floresta, como látex e peles de animais. Os regatões                sefarditas só traziam a família para o Brasil ou se                casavam com judias depois que acumulavam dinheiro. No meio-tempo,                faziam como os portugueses: amancebavam-se com índias, caboclas                e até mesmo mulheres brancas católicas.</span><span class="texto">                </span></p>
<table width="300" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td><span class="credito">Roberto Setton<br />
</span> <img width="300" height="200" src="http://veja.abril.com.br/080306/imagens/vida_brasileira4.jpg" /></td>
</tr>
<tr>
<td class="legenda"><span class="legendaLaranja">A SINAGOGA DE                    BELÉM<br />
</span> A capital do Pará abriga o templo mais antigo                    em funcionamento do país. Inaugurado em 1824, só                    foi precedido pela sinagoga fundada pelos judeus holandeses                    no Recife no século XVII, cujas ruínas foram descobertas                    nos anos 90</td>
</tr>
</table>
<p align="left"><span class="texto">A definição cultural                de judeu não segue integralmente a genética. Só                é considerado como tal quem tem mãe judia e pratica                a religião judaica. Por esse motivo, a maioria dos descendentes                dos regatões sefarditas não é reconhecida como                parte dessa comunidade. E a própria lógica da miscigenação                fez com que os laços com a cultura hebraica fossem completamente                perdidos nas gerações seguintes. Muitos nem sequer                sabem que descendem de judeus. Outros, ainda, se dizem judeus, mas                praticam o cristianismo. Em muitos casos, o ambiente isolado da                Amazônia esmoreceu a religiosidade dos imigrantes, que tinham                dificuldade para praticar sua fé. A primeira sinagoga de                Belém só foi inaugurada em 1824, catorze anos depois                da chegada dos primeiros sefarditas. O cemitério judaico                de Belém, o primeiro do país, foi inaugurado somente                em 1848. Para manterem vivas suas tradições, os imigrantes                mais fervorosos passaram a copiar a <em>Torá,</em> o livro                sagrado dos judeus, e outros textos religiosos a mão em cadernos                comuns. Em celebrações religiosas, como a da circuncisão,                a cachaça substituía o vinho. Pela tradição,                esse ritual deve ser realizado oito dias após o nascimento                do menino. Na Amazônia, eles aconteciam com até dez                anos de atraso. No início do século XX, um menino                foi circuncidado aos 12 anos, porque o pai esperou que nascessem                seus irmãos para ir uma vez só da floresta até                Belém. O aspecto paradoxal é que, se o isolamento                na floresta diluiu a religiosidade de parte dos sefarditas, ele                propiciou a preservação de seu idioma, o hakitía.                Hoje, a língua subsiste apenas em determinadas localidades                da Amazônia e no próprio Marrocos. &#8220;A importância                da floresta na manuntenção do hakitía é                inestimável&#8221;, diz o lingüista Mohamed El-Madkouri Maatoui,                da Universidade Autônoma de Madri. </span></p>
<p align="left"><span class="texto"> No fim do século XIX,                os sefarditas enriqueceram com o ciclo da borracha. Os mais bem-sucedidos                mandaram seus filhos estudar no Rio de Janeiro. Em 1890, as notícias                da súbita prosperidade do Pará motivaram uma nova                onda de imigração judaica. Em boa parte, ela foi financiada                pelos que já estavam estabelecidos no país. A população                judaica no interior do Pará cresceria, assim, exponencialmente.                Para se ter uma idéia, metade dos 14.000 habitantes de Cametá,                um entreposto comercial da Amazônia, era constituída                por sefarditas. O êxito financeiro dos imigrantes provocou                uma onda de anti-semitismo. Há relatos de ataques feitos                a residências e lojas de imigrantes entre 1889 e 1901. As                agressões começavam com passeatas e terminavam com                depredações. Embora tenham sido chamadas de mata-judeus,                não há registro de que tenham resultado no assassinato                de ninguém.</span><span class="texto"> </span></p>
<table width="300" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td><span class="credito">Octavio Cardoso<br />
</span> <img width="300" height="200" src="http://veja.abril.com.br/080306/imagens/vida_brasileira5.jpg" /></td>
</tr>
<tr>
<td class="legenda"><span class="legendaLaranja">JUDEUS E CRISTÃOS<br />
</span> A professora aposentada Meryam Shimon Benessuly, de                    75 anos <em>(de vermelho, no centro),</em> fala hakitía,                    idioma original dos sefarditas marroquinos, e segue à                    risca muitos costumes judaicos, mas trocou a religião                    de seus antepassados pelo catolicismo. &#8220;São costumes                    que adquiri quando criança e que faço questão                    que minha família mantenha. Não por fé,                    mas por orgulho de pertencer a uma cultura milenar&#8221;, diz                    ela</td>
</tr>
</table>
<p align="left"><span class="texto">O isolamento imposto aos sefarditas                na Amazônia chamou a atenção de rabinos no Marrocos,                no início do século XX. Para fiscalizar o cumprimento                das normas religiosas pela comunidade estabelecida na floresta,                Shalom Emanuel Muyal foi enviado à região, em 1908.                Dois anos depois de chegar a Manaus, Muyal foi vitimado por uma                doença tropical, provavelmente febre amarela. E aqui reside                um aspecto curiosíssimo do sincretismo brasileiro: depois                de sua morte, sabe-se lá o motivo, ele ganhou fama de milagreiro                entre os católicos locais. Muyal foi enterrado num canto                do principal cemitério de Manaus (não havia cemitérios                judaicos na capital amazonense naquele tempo) e sua sepultura tornou-se                alvo de peregrinações. A fim de evitar que as velas                acesas pelos fiéis danificassem a laje do túmulo,                o rabino da sinagoga de Manaus mandou construir um muro ao seu redor.                Os católicos não se deram por vencidos: passaram a                usar o obstáculo como suporte para placas e quadros em que                pedem graças e agradecem pelos pedidos que teriam sido atendidos                por Muyal. &#8220;É impressionante: ele se tornou o santo judeu                dos católicos da Amazônia&#8221;, admite Isaac Dahan, da                sinagoga de Manaus. A devoção é tanta que,                nos anos 60, uma tentativa de trasladar os restos mortais do rabino                milagreiro para Israel foi abortada em virtude das manifestações                indignadas dos amazonenses. </span></p>
<p><span class="texto"> Quando o ciclo da borracha terminou,                no início do século XX, as famílias judias                mais ricas de Belém mudaram-se para o Rio de Janeiro. &#8220;Lá,                há uma espécie de sucursal da nossa comunidade&#8221;, diz                o rabino Moyses Elmescany, da capital paraense. Boa parte da influência                dos judeus na Amazônia foi apagada. A sinagoga de Cametá,                por exemplo, foi engolida pelo Rio Tocantins e não foi reconstruída.                Hoje, nenhum dos habitantes da cidade segue o judaísmo. Em                localidades como Óbidos, Breves e Muaná, no Pará,                e Tefé e Humaitá, no Amazonas, existem apenas sepulturas.                Da procura por uma extensão da Terra Prometida na Amazônia,                restaram genes escondidos.</span></p>
<p>Fonte: <a href="http://veja.abril.com.br/080306/p_062.html">http://veja.abril.com.br/080306/p_062.html </a>
</p>
]]></content:encoded>
			<wfw:commentRSS>http://edgarsilva.com.br/2008/07/06/um-pouco-de-historia-e-cultura-presenca-judaica-na-amazonas/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>OpenTDC: Fomos</title>
		<link>http://edgarsilva.com.br/2008/06/29/opentdc-fomos/</link>
		<comments>http://edgarsilva.com.br/2008/06/29/opentdc-fomos/#comments</comments>
		<pubDate>Sun, 29 Jun 2008 14:39:57 +0000</pubDate>
		<dc:creator>Edgar Silva</dc:creator>
		
	<category>eventos</category>
	<category>jboss</category>
		<guid isPermaLink="false">http://edgarsilva.com.br/2008/06/29/opentdc-fomos/</guid>
		<description><![CDATA[O Evento OpenTDC foi de fato muito bom, palestras lotadas e super informativas, parabens a equipe organizadora. Na foto Bruno Rossetto Machado(JBoss Consultant), Edgar, David Barzilay(Gerente de Marketing da Red Hat BR)



]]></description>
			<content:encoded><![CDATA[<p>O Evento <a href="http://www.thedevelopersconference.com.br/opentdc.html">OpenTDC</a> foi de fato muito bom, palestras lotadas e super informativas, parabens a equipe organizadora. Na foto Bruno Rossetto Machado(JBoss Consultant), Edgar, David Barzilay(Gerente de Marketing da Red Hat BR)
</p>
<p align="center">
<img src="http://farm4.static.flickr.com/3171/2621332824_c3415666cb.jpg?v=0"/></p>
]]></content:encoded>
			<wfw:commentRSS>http://edgarsilva.com.br/2008/06/29/opentdc-fomos/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>OpenTDC : Evento da GlobalCode esse sábado na Anhembi/Morumbi</title>
		<link>http://edgarsilva.com.br/2008/06/27/opentdc-evento-da-globalcode-esse-sabado-na-anhembimorumbi/</link>
		<comments>http://edgarsilva.com.br/2008/06/27/opentdc-evento-da-globalcode-esse-sabado-na-anhembimorumbi/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 03:17:32 +0000</pubDate>
		<dc:creator>Edgar Silva</dc:creator>
		
	<category>eventos</category>
		<guid isPermaLink="false">http://edgarsilva.com.br/2008/06/27/opentdc-evento-da-globalcode-esse-sabado-na-anhembimorumbi/</guid>
		<description><![CDATA[
Olá amigos, este sábado ocorrerá a versão gratuita do TDC(The Developers Conference), que é o OpenTDC, as inscrições são no &#8220;vasco&#8221;, pela grade, há algumas palestras que vale a pena você estar presente, além é claro de poder conhecer, encontrar pessoas, trocar idéias e tudo mais.
O site do evento é:  http://www.thedevelopersconference.com.br/opentdc.html
O site para inscrições é: [...]]]></description>
			<content:encoded><![CDATA[<div align="center"></div>
<p>Olá amigos, este sábado ocorrerá a versão gratuita do TDC(The Developers Conference), que é o OpenTDC, as inscrições são no &#8220;vasco&#8221;, pela grade, há algumas palestras que vale a pena você estar presente, além é claro de poder conhecer, encontrar pessoas, trocar idéias e tudo mais.</p>
<p>O site do evento é:  <a target="_blank" href="http://www.thedevelopersconference.com.br/opentdc.html">http://www.thedevelopersconference.com.br/opentdc.html</a></p>
<p>O site para inscrições é: <a href="http://www.thedevelopersconference.com.br/inscricoes.seam">http://www.thedevelopersconference.com.br/inscricoes.seam</a></p>
<p>O JBoss Seam está presente em grande estilo, não só em algumas aplicações feitas pelo time da GlobalCode, acredito que será bastante falado no evento, vide a grade. Mas o Seam não será o único representante da família JBoss, meu colega <a href="http://brmachado.blogspot.com">Bruno Machado</a>, estará proferindo uma palestra sobre <em><strong>Administração de JBoss</strong></em>, onde vai mostrar dicas de tunning, load-balance, execução de multiplas-instâncias e etc. Há algumas outras palestras também, que não as quero perder por nada.<br />
Eu estarei lá, de bermuda, camiseta e tênis, ajudando o Gerente de Marketing da Red Hat Brasil, David Barzilay, no stand da JBoss dentro do evento. Vejo vocês por lá.</p>
<p>Grande Abraço</p>
<p>Edgar</p>
<div style="text-align: center"><img src="http://www.thedevelopersconference.com.br/img/logo_open_sp.png" /></div>
]]></content:encoded>
			<wfw:commentRSS>http://edgarsilva.com.br/2008/06/27/opentdc-evento-da-globalcode-esse-sabado-na-anhembimorumbi/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Algumas lições sobre BPMs Opensources</title>
		<link>http://edgarsilva.com.br/2008/06/25/algumas-licoes-sobre-bpms-opensources/</link>
		<comments>http://edgarsilva.com.br/2008/06/25/algumas-licoes-sobre-bpms-opensources/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 04:27:42 +0000</pubDate>
		<dc:creator>Edgar Silva</dc:creator>
		
	<category>jboss</category>
		<guid isPermaLink="false">http://edgarsilva.com.br/2008/06/25/algumas-licoes-sobre-bpms-opensources/</guid>
		<description><![CDATA[No meu blog no Java.net, escrevi um pouco sobre algumas visões sobre BPM e algumas notas sobre o nosso jBPM, veja aqui o texto:
Business Processing Modeling – BPM, I was starting my career when I heard the word “Workflow” by the first time, of course I had many other things to learn, instead to pay [...]]]></description>
			<content:encoded><![CDATA[<p>No meu <a target="_blank" href="http://weblogs.java.net/blog/edgars/archive/2008/06/some_thoughts_a.html">blog no Java.net</a>, escrevi um pouco sobre algumas visões sobre BPM e algumas notas sobre o nosso jBPM, veja aqui o texto:</p>
<p>Business Processing Modeling – BPM, I was starting my career when I heard the word “Workflow” by the first time, of course I had many other things to learn, instead to pay attention on some thing that seems to be too complicated, however in during any computer science or related course we learn some about “State Machines”, well, I wanna tell you a history that I heard when I worked for one of the biggest federal bank in Brazil: Workflow products had arrived down here in end of 90&#8217;s, this bank tried implement a Workflow, although instead to map the the activities into a “State Machine Diagram” where would be possible figure out where the process&#8217;s drawbacks or too long waits came from, they mixed business logic to process logic, obtaining serious performance problems and not too accurate information, the word “workflow” was abolished for a long time on this bank after this first frustrated try. Maybe, such things like that happened in all over the world, that&#8217;s why during too much time, the concept to try get the company&#8217;s process and map all of them represented using cool colored diagrams, which internally are not much more than a “State Machine”. The workflow products getting started so to hibernate, and then as a “pheonix” are relaunched but now with a new name: BPM (Business Process Modeling)! Maybe now, many people will stop to read this entry, but sorry, I can&#8217;t figure out BPM in any other way, but now it is dressed much better, with new terminologies and concepts that make it “hot” or “fashion”.</p>
<p>All the text above is just to call your attention for BPM Opensource implementations as an alternative for commercial licensing vendors,as such alternatives I can recommend you the following: OSWorkflow, IntalioBPM and jBPM, actually I respect all of them, but I&#8217;ve been using jBPM most frequently, that&#8217;s why I will point some about it here. But, I recommend you take a look about the other ones. From this point of this entry, I don&#8217;t wanna promote any project marketing, in despite of the fact I wanna tell you my particular vision about jBPM as a solution, and based on my professional experience show you where and how you may apply it into your projects.</p>
<p>The best way I found to look at jBPM, is that it is a great BPM Engine, and it is not a weakness, I mean: When you think about BPM you can take many scenarios, since from modeling, management, governance and so on. JBPM is a really cool BPM framework and Engine. When you have an Application that has an internal workflow with a complete User Interface or a set of Services to do everything you want without. In other words, imagine you have a HelpDesk System built 10 years ago with OracleForms , and you have mapped a kind of workflow on that, however you never figured out how measure your business activity monitoring(BAM). Now, keep in mind that you can during your regular activities in your system call a procedure to generate a simples text file with some information, which can be used to fill information into a process execution of a jBPM process instance, and from another system you can handle such information to get some report or any other issue. If we are speaking about text file generating, it could be a serious candidate for an ESB listener to process it, well but ESB is out of this scope, but keep ESBs usage in mind.</p>
<p>In general, jBPM can be your best option when you want embed a BPM engine into your application, good scenarios contributes for that, such as: JBPM has a native extensible and open language called jPDL, that can process both HumanTasks in addition to invoke WebServices via Java components, it counts with BPEL support as well. In a near future, jBPM will have a PVM(Process Virtual Machine), which basically is “State Machine Framework”, which will render a process independent from the language source, support for BPEL, XPDL using PVM are in the plans of jBPM new versions. A really nice Eclipe plugin where is possible design all process visually, in addition to this, you can use Java components to interact with Node events(node-enter, node-leave for example) or during a transition from a node to another, and everything associating Java objetcs to some specific event during the process execution. The last good reason to use jBPM is the Seam intergration, which make the process management really easy for any developer.</p>
<p>For sure, that you may use jBPM as a “BPM Suite” as well, but keep in mind that you will keep Business Analyst designing the process in UML or in some BPMN tool, and you will need a tech-guy to transform this design in to a jpdl diagram, where a Eclipse plugin is available.</p>
<p>By the way, when you made an option by use an Opensource engine such as jBPM, you can do that because your plan can be get culture about BPM first, and it is really important for a SOA strategy. No matter if you have many boxes with SOA solutions with you have no idea how use them, and even worst when you already paid for them.</p>
<p>Well, if you need more information, you can go to <a href="http://www.jboss.org/jbossjbpm">jBPM web site</a>, and download the lastest jbpm-jpdl-suite, which contains the framework and the eclipse plugin all together. Watch the demos, and take a look into documentation.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://edgarsilva.com.br/2008/06/25/algumas-licoes-sobre-bpms-opensources/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Revisitando Drools</title>
		<link>http://edgarsilva.com.br/2008/06/23/revisitando-drools/</link>
		<comments>http://edgarsilva.com.br/2008/06/23/revisitando-drools/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 23:52:28 +0000</pubDate>
		<dc:creator>Edgar Silva</dc:creator>
		
	<category>jboss</category>
		<guid isPermaLink="false">http://edgarsilva.com.br/2008/06/23/revisitando-drools/</guid>
		<description><![CDATA[Se você utiliza o drools e seu plugin para Eclipse, pode ter visto que na mais nova versão, para que você consiga usar DSLs, é preciso renomear o arquivo de regras para .dslr, desta forma você consegue atribuir um &#8220;expander&#8221; e trabalhar com sua linguagem natural. Como no exemplo:
package com.sample
expander pt_BR.dsl
import com.sample.DroolsTest.Message;
import com.sample.ChamadaTelefonica;
import com.sample.Tarifador;
rule &#8220;chamada [...]]]></description>
			<content:encoded><![CDATA[<p>Se você utiliza o drools e seu plugin para Eclipse, pode ter visto que na mais nova versão, para que você consiga usar DSLs, é preciso renomear o arquivo de regras para .dslr, desta forma você consegue atribuir um &#8220;expander&#8221; e trabalhar com sua linguagem natural. Como no exemplo:</p>
<blockquote><p><em>package com.sample</em></p>
<p><em>expander pt_BR.dsl</em></p>
<p><em>import com.sample.DroolsTest.Message;<br />
import com.sample.ChamadaTelefonica;<br />
import com.sample.Tarifador;</em></p>
<p><em>rule &#8220;chamada local&#8221;<br />
when<br />
quando a chamada eh local<br />
then<br />
o valor do minuto eh 2.00<br />
end</em></p>
<p><em>rule &#8220;chamada longa distancia&#8221;<br />
when<br />
quando a chamada eh longa distancia<br />
then<br />
o valor do minuto eh 4.00<br />
end</em></p></blockquote>
<p>O código acima processa um exemplo de um objeto que seria uma &#8220;Chamada Telefonica&#8221;, você pode estar se perguntando onde estão os comandos reais, a resposta é que está no pt_BR.dsl, veja o exemplo abaixo:</p>
<blockquote><p><em>[condition][]quando a chamada eh local=c : ChamadaTelefonica( local==destino)<br />
[condition][]quando a chamada eh longa distancia=c : ChamadaTelefonica( local!=destino)<br />
[consequence][]o valor do minuto eh {valor}=c.setValor( Tarifador.minutesBetween(c.getInicio(), c.getFim())*{valor});</em></p></blockquote>
<p>Por último, ao carregar meu arquivo de regras, eu também associo meu arquivos de DSL ao de regras:</p>
<blockquote><p><em>Reader source = new InputStreamReader( DroolsTest.class.getResourceAsStream( &#8220;/Sample.dslr&#8221; ) );</em></p>
<p><em>Reader dsl = new InputStreamReader( DroolsTest.class.getResourceAsStream( &#8220;/pt_BR.dsl&#8221; ) );</em></p>
<p><em>PackageBuilder builder = new PackageBuilder();</em></p>
<p><em>builder.addPackageFromDrl( source,dsl );</em></p></blockquote>
<p>Pronto, agora podemos ter a liberdade de lidar com as regras da forma que bem entendermos. Maiores informações sobre o projeto Drools: <a target="_blank" href="http://www.jboss.org/drools">http://www.jboss.org/drools</a>. Claro, que deixo aqui o agradecimento ao meu amigo Tirelli (core-developer do drools), que sempre me tirar as dúvidas necessárias para montar nossos projetos.</p>
<p>E
</p>
]]></content:encoded>
			<wfw:commentRSS>http://edgarsilva.com.br/2008/06/23/revisitando-drools/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>jBPM e sua associações com Tarefas e Usuários</title>
		<link>http://edgarsilva.com.br/2008/06/12/jbpm-e-sua-associacoes-com-tarefas-e-usuarios/</link>
		<comments>http://edgarsilva.com.br/2008/06/12/jbpm-e-sua-associacoes-com-tarefas-e-usuarios/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 23:04:24 +0000</pubDate>
		<dc:creator>Edgar Silva</dc:creator>
		
	<category>jboss</category>
		<guid isPermaLink="false">http://edgarsilva.com.br/2008/06/12/jbpm-e-sua-associacoes-com-tarefas-e-usuarios/</guid>
		<description><![CDATA[No jBPM, uma das features mais interessantes é a capacidade de processamento de Tarefas Humanas(HumanTasks), que por sua vez podem guardar várias sub-tarefas de cada usuário em cada fase(node) do workflow.
Quando você cria uma tarefa dentro de um task-node, como por exemplo: [Veja Link]



Para controlar todo a associação de usuário, estabelecemos uma classe para tratar [...]]]></description>
			<content:encoded><![CDATA[<p>No jBPM, uma das features mais interessantes é a capacidade de processamento de Tarefas Humanas(HumanTasks), que por sua vez podem guardar várias sub-tarefas de cada usuário em cada fase(node) do workflow.</p>
<p>Quando você cria uma tarefa dentro de um task-node, como por exemplo: [<a target="_blank" title="Clique para ver a imagem" href="http://edgarsilva.com.br/wp-content/uploads/2008/06/screenshot-java-ee-carlic-src-main-jpdl-licenciamento-processdefinitionxml-eclipse-platform.png">Veja Link</a>]</p>
<div align="center">
<div style="text-align: center"></div>
</div>
<div>Para controlar todo a associação de usuário, estabelecemos uma classe para tratar o "assign" da tarefa. Esta classe é UserTaskAssignment, que implementa a interface AssignmentHandler. Nesta classe, como as TaskNodes serão disparadas após o início do processo, no nó de Início(start), logo que o processo passar por ele, armazenaremos uma variável de contexto, no caso um id de usuário. E para cada task, capturamos este id e associamos a(s) tarefa(s), veja o handler:<br />
<div class="igBar"><span id="ljava-3"><a href="#" onclick="javascript:showCodeTxt('java-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span><br />
<div id="java-3">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> UserTasksAssignment <span style="color: #000000; font-weight: bold;">implements</span> AssignmentHandler <span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">private</span> <span style="color: #993333;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #993333;">long</span> serialVersionUID = -930174228262828841L;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> assign<span style="color: #66cc66;">&#40;</span>Assignable assignable, ExecutionContext executionContext<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?q=allinurl%3AException+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Exception</span></a> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">assignable.<span style="color: #006600;">setActorId</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#41;</span> executionContext.<span style="color: #006600;">getVariable</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"rg"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Agora, fiz uma adaptação em um dos métodos do meu serviço para mostrar para o usuário X, quantas tarefas e em quais instâncias de processos eles tem tarefas pendentes:</p>
<div class="igBar"><span id="ljava-4"><a href="#" onclick="javascript:showCodeTxt('java-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span><br />
<div id="java-4">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@SuppressWarnings<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"unchecked"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@GET</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@Path<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"/realize/pagementosefa/{id}/{rg}"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@ProduceMime<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"text/plain"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> doPagamentoSefa<span style="color: #66cc66;">&#40;</span>@PathParam<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"id"</span><span style="color: #66cc66;">&#41;</span><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> id,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@PathParam<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"rg"</span><span style="color: #66cc66;">&#41;</span><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> rg<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">JbpmContext ctx = JbpmConfiguration.<span style="color: #006600;">getInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">createJbpmContext</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">try</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">GraphSession graphSession = ctx.<span style="color: #006600;">getGraphSession</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ProcessInstance processInstance = graphSession</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.<span style="color: #006600;">loadProcessInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3ALong+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Long</span></a><span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3ACollection+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Collection</span></a> taskList = <span style="color: #000000; font-weight: bold;">null</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">processInstance.<span style="color: #006600;">getTaskMgmtInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getTaskInstances</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">taskList = <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3ACollection+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Collection</span></a><span style="color: #66cc66;">&#41;</span> ctx.<span style="color: #006600;">getTaskList</span><span style="color: #66cc66;">&#40;</span>rg<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">processInstance.<span style="color: #006600;">getContextInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">setVariable</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"idsefa"</span>,&nbsp; <a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">currentTimeMillis</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>+1L <span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">StringBuilder b = <span style="color: #000000; font-weight: bold;">new</span> StringBuilder<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>TaskInstance taskInstance : taskList<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">b.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a>.<span style="color: #006600;">format</span><span style="color: #66cc66;">&#40;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">"User %s, the Task:: %s is waiting for your start. This is a task from the Process Id:%s<span style="color: #000099; font-weight: bold;">\n</span>"</span>,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; taskInstance.<span style="color: #006600;">getActorId</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">taskInstance.<span style="color: #006600;">getName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">taskInstance.<span style="color: #006600;">getProcessInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getId</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">b.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Payment Id: "</span> + processInstance.<span style="color: #006600;">getContextInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getVariable</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"idsefa"</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">return</span> b.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>&nbsp; ;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">finally</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ctx.<span style="color: #006600;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>O resultado final de retorno para testes de Dubug seria, para o comando REST: http://localhost:8080/licenciamento/realize/pagementosefa/55/1111</p>
<pre>User 1111, the Task:: entregar recibo is waiting for your start. This is a task from the Process Id: 55
User 1111, the Task:: pagar is waiting for your start. This is a task from the Process Id: 55
Payment Id: 1213310025945</pre>
<pre /></div>
]]></content:encoded>
			<wfw:commentRSS>http://edgarsilva.com.br/2008/06/12/jbpm-e-sua-associacoes-com-tarefas-e-usuarios/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Você sabe o que é o JON (JBoss Operations Network)?</title>
		<link>http://edgarsilva.com.br/2008/06/12/voce-sabe-o-que-e-o-jon-jboss-operations-network/</link>
		<comments>http://edgarsilva.com.br/2008/06/12/voce-sabe-o-que-e-o-jon-jboss-operations-network/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 04:52:02 +0000</pubDate>
		<dc:creator>Edgar Silva</dc:creator>
		
	<category>jboss</category>
		<guid isPermaLink="false">http://edgarsilva.com.br/2008/06/12/voce-sabe-o-que-e-o-jon-jboss-operations-network/</guid>
		<description><![CDATA[Este post pode estar demorado, mas nunca é tarde demais para se falar, o JBoss Operations Network, ou o JON, é a ferramenta em browser web que permite controle, administração, monitoração do ambiente e geração de alertas sobre eventos que podem ocorrer no seu parque de máquinas, onde hajam um ou vários servidores com JBoss [...]]]></description>
			<content:encoded><![CDATA[<p>Este post pode estar demorado, mas nunca é tarde demais para se falar, o JBoss Operations Network, ou o JON, é a ferramenta em browser web que permite controle, administração, monitoração do ambiente e geração de alertas sobre eventos que podem ocorrer no seu parque de máquinas, onde hajam um ou vários servidores com JBoss Application Server instalados.</p>
<p>O JON, é acessível somente para clientes que possuem suporte oficial da Red Hat, em outras palavras, só as versões <em>Enterprise</em> de JBoss AS são homologadas para o JON, bem como só estes clientes podem adquirir a subscrição(licença de suporte) para este produto.</p>
<p>Num passado, esta ferramenta utilizava em sua estrutura do kernel da Hyperic, por este motivo não era "Opensource"! Como assim não era? Agora é? A resposta é: Sim, agora o código base para o JON é opensource, resultado da união de esforços entre Red Hat e Hyperic, criando assim o projeto RHQ-Project.</p>
<p>Com o projeto RHQ, lançamos recentemente o Jon 2.0 GA, que é a mais nova versão do JON, entre as inúmeras melhorias e novidades, destaco a capacidade de cricação de extensões(plugins), que permitem os clientes criarem suas próprias formas de monitoração, desde algum requisito de hardware, infra ou até mesmo de aplicações, por exemplo: "Quantas vendas foram realizadas no último dia?", podendo gerar um alerta, caso o número tenha sido menor que 20% ao baseline estabelecido.</p>
<p>Claro, o foco do JON é monitorar as questões de sistemas operacionais(solaris, win e linux a exemplo), JBoss AS e seus recursos (filas JMS, EJBs, DataSources/Pools de Conexão,Sessões Hibernate), além de Tomcat, Apache e até o MS IIS.</p>
<p>De fato, o JON torna a plataforma JBoss AS, mais que uma plataforma estável e performática, mas também agora, como uma cara corporativa.</p>
<p><em><strong>Sites</strong></em></p>
<ul>
<li>JON - <a target="_blank" href="http://www.jroller.com/rafaelbenevides/entry/jboss_operation_network">http://www.jroller.com/rafaelbenevides/entry/jboss_operation_network</a></li>
<li>Demo do JON - <a target="_blank" href="https://network.jboss.com/confluence/display/JON2/Demo-Intro">https://network.jboss.com/confluence/display/JON2/Demo-Intro</a></li>
<li>Hyperic - <a target="_blank" href="http://www.hyperic.com/">http://www.hyperic.com/</a></li>
<li>Projeto RHQ - <a target="_blank" href="http://www.rhq-project.org">http://www.rhq-project.org<br />
</a></li>
</ul>
<p>E claro, parabens Sport do Recife, pela Copa do Brasil!!!!! <img src='http://edgarsilva.com.br/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
<img width="833" height="493" title="JON" alt="JON" src="http://www.jboss.com/images/jbosson_monitoring.png" />
</p>
]]></content:encoded>
			<wfw:commentRSS>http://edgarsilva.com.br/2008/06/12/voce-sabe-o-que-e-o-jon-jboss-operations-network/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Criando um Novo LoginModule JAAS no JBoss</title>
		<link>http://edgarsilva.com.br/2008/06/07/criando-um-novo-loginmodule-jaas-no-jboss/</link>
		<comments>http://edgarsilva.com.br/2008/06/07/criando-um-novo-loginmodule-jaas-no-jboss/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 04:04:47 +0000</pubDate>
		<dc:creator>Edgar Silva</dc:creator>
		
	<category>java</category>
		<guid isPermaLink="false">http://edgarsilva.com.br/2008/06/07/criando-um-novo-loginmodule-jaas-no-jboss/</guid>
		<description><![CDATA[Em um dos clientes que eu estamos atendendo na empresa, um dos requisitos é autenticar no RACF, uma espécie de LDAP para o Mainframe. Nosso cliente, disponibilizou um WS que faz este trabalho "sujo". Nos resta então criar um LoginModule que suporte esta nova funcionalidade.
Quando você proteger Aplicações em Java é importante saber onde você [...]]]></description>
			<content:encoded><![CDATA[<p>Em um dos clientes que eu estamos atendendo na empresa, um dos requisitos é autenticar no RACF, uma espécie de LDAP para o Mainframe. Nosso cliente, disponibilizou um WS que faz este trabalho "sujo". Nos resta então criar um LoginModule que suporte esta nova funcionalidade.</p>
<p>Quando você proteger Aplicações em Java é importante saber onde você pode se conectar, o JBoss oferece por padrão alguns LoginModules, entre eles:</p>
<p>-LoginModule baseado em arquivos properties<br />
-LoginModule baseado em Banco de Dados<br />
-LoginModule para LDAP</p>
<p>Em nossa solução, estaremos promovendo mais um LoginModule. O primeiro passo é alterar o login-config.xml dentro de /default/conf, no caso adicionamos mais um LoginModule, como a seguir:<br />
<img width="614" height="178" alt="Screenshot-*login-config.xml (-opt-java-jboss-as-jboss-4.2.2.GA-server-dev-conf) - gedit.png" src="http://weblogs.java.net/blog/edgars/archive/Screenshot-*login-config.xml%20%28-opt-java-jboss-as-jboss-4.2.2.GA-server-dev-conf%29%20-%20gedit.png" /></p>
<p>Adicionamos até uma propriedade, que é o WSDL do Serviço, que pode variar dependendo do caso, e ai a configuração poderá ser feita no LoginModule, sem a necessidade de recompilação.</p>
<p>Estamos dizendo acima que a classe org.jboss.security.auth.api.JBossLoginModuleWS é a implementação deste mecanismo de Login. Veja o código-fonte de exemplo:</p>
<div class="igBar"><span id="ljava-6"><a href="#" onclick="javascript:showCodeTxt('java-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span><br />
<div id="java-6">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;pre&gt;package org.<span style="color: #006600;">jboss</span>.<span style="color: #006600;">security</span>.<span style="color: #006600;">auth</span>.<span style="color: #006600;">api</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import java.security.acl.Group;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import java.util.Map;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.security.auth.Subject;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.security.auth.Subject;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.security.auth.callback.CallbackHandler;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.security.auth.login.LoginException;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import org.jboss.security.SimpleGroup;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import org.jboss.security.SimplePrincipal;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import org.jboss.security.auth.spi.UsernamePasswordLoginModule;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import org.jboss.security.auth.api.ws.client.*;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import org.jboss.security.auth.ws.AutenticateProxy;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/**</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* @author Edgar Silva</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> JBossLoginModuleWS <span style="color: #000000; font-weight: bold;">extends</span> UsernamePasswordLoginModule <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/**</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* WSDL address</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">private</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> wsdl;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">protected</span> org.<span style="color: #006600;">jboss</span>.<span style="color: #006600;">security</span>.<span style="color: #006600;">auth</span>.<span style="color: #006600;">ws</span>.<a href="http://www.google.com/search?q=allinurl%3APrincipal+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Principal</span></a> p;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> JBossLoginModuleWS<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">super<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@Override</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> initialize<span style="color: #66cc66;">&#40;</span>Subject subject, CallbackHandler callbackHandler,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3AMap+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Map</span></a> sharedState, <a href="http://www.google.com/search?q=allinurl%3AMap+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Map</span></a> options<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">super.<span style="color: #006600;">initialize</span><span style="color: #66cc66;">&#40;</span>subject, callbackHandler, sharedState, options<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">log.<span style="color: #006600;">info</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"WebServices Login Module : initialize"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@Override</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">protected</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> getUsersPassword<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> LoginException <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">return</span> <span style="color: #ff0000;">""</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@Override</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #993333;">boolean</span> validatePassword<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> inputPassword, <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> expectedPassword<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333;">boolean</span> isValid = <span style="color: #000000; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>inputPassword != <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">try</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">log.<span style="color: #006600;">info</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Connecting via WS .............."</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> username = getUsername<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">log.<span style="color: #006600;">info</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"UserName: "</span> + getUsername<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">log.<span style="color: #006600;">info</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Password: "</span>+ inputPassword<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">p = <span style="color: #000000; font-weight: bold;">new</span> AutenticateProxy<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">autentica</span><span style="color: #66cc66;">&#40;</span>username, inputPassword<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">log.<span style="color: #006600;">info</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Connected as: "</span> + p.<span style="color: #006600;">getUsuario</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">isValid = <span style="color: #66cc66;">&#40;</span>p != <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AThrowable+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Throwable</span></a> e<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">e.<span style="color: #006600;">printStackTrace</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">super.<span style="color: #006600;">setValidateError</span><span style="color: #66cc66;">&#40;</span>e<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">return</span> isValid;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@Override</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">protected</span> <a href="http://www.google.com/search?q=allinurl%3AGroup+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Group</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> getRoleSets<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> LoginException <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">SimpleGroup userRoles = <span style="color: #000000; font-weight: bold;">new</span> SimpleGroup<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Roles"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">userRoles.<span style="color: #006600;">addMember</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> SimplePrincipal<span style="color: #66cc66;">&#40;</span>p.<span style="color: #006600;">getGrupo</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3AGroup+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Group</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> roleSets = <span style="color: #66cc66;">&#123;</span>userRoles<span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">return</span> roleSets;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> getWsdl<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">return</span> wsdl;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> setWsdl<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> wsdl<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">wsdl</span> = wsdl;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span>&lt;/pre&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Agora, a qualquer momento que você proteger uma Aplicação Web, ou quiser utilizar o Servidor de Aplicações para fazer isto, você deverá configurar o jboss-web.xml para apontar para o LoginModule que voce configurou no login-config.xml, veja o exemplo a seguir:<br />
<img alt="jboss-web.xml" title="jboss-web.xml" src="http://weblogs.java.net/blog/edgars/archive/Screenshot-jboss-web.xml%20%28-opt-java-jboss-as-jboss-4.2.2.GA-server-dev-deploy-TestWSLoginModule.war-WEB-INF%29%20-%20gedit.png" /></p>
<p><a name="line68"></a><a name="line68"></a>Além desta configuração, você deverá proteger as páginas de uma Aplicação Web, por exemplo, sendo assim, você irá configurar o web.xml da sua aplicações para pedir o "Realm"(LoginModule) que vc configurou com o nome WSLoginModule, em nosso caso vamos liberar apenas o acesso as páginas .jsp caso o Login seja efetivado no WebServices de autenticação. Veja o web.xml:</p>
<p><a name="line68"></a><a name="line68"></a><img align="middle" title="web.xml" alt="web.xml" src="http://weblogs.java.net/blog/edgars/archive/Screenshot-web.xml%20%28-opt-java-jboss-as-jboss-4.2.2.GA-server-dev-deploy-TestWSLoginModule.war-WEB-INF%29%20-%20gedit.png" /></p>
<p><a name="line68"></a><a name="line68"></a>Esta é mais uma dica, que sei que posso precisar um dia novamente!</p>
<p><a name="line68"></a><a name="line68"></a>[]s<br />
E
</p>
]]></content:encoded>
			<wfw:commentRSS>http://edgarsilva.com.br/2008/06/07/criando-um-novo-loginmodule-jaas-no-jboss/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>JUGDAY 2008 - Porto Alegre dia 31/05</title>
		<link>http://edgarsilva.com.br/2008/05/26/jugday-2008-porto-alegre-dia-3105/</link>
		<comments>http://edgarsilva.com.br/2008/05/26/jugday-2008-porto-alegre-dia-3105/#comments</comments>
		<pubDate>Mon, 26 May 2008 19:31:05 +0000</pubDate>
		<dc:creator>Edgar Silva</dc:creator>
		
	<category>eventos</category>
		<guid isPermaLink="false">http://edgarsilva.com.br/2008/05/26/jugday-2008-porto-alegre-dia-3105/</guid>
		<description><![CDATA[
Vou estar por lá, se você mora em Porto Alegre ou arredores, é uma grande oportunidade de estar participando deste evento da comunidade Java gaúcha.
Vão estar pessoas feras como:

Paulo Silveira (Caelum)
Daniel Wildt (Dell)
Eduardo Sasso
O JME-Man: Marlon Luz
Vitório Sassi
Fábio Patrício
Dalton Camargo

Tomara que não esteja frio, visto que me recuperei a pouco de uma gripe forte destas [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rsjug.org"><img src="http://www.rsjug.org/images/jugday-20081.png" /></a></p>
<p>Vou estar por lá, se você mora em Porto Alegre ou arredores, é uma grande oportunidade de estar participando deste evento da comunidade Java gaúcha.</p>
<p>Vão estar pessoas feras como:</p>
<ul>
<li>Paulo Silveira (Caelum)</li>
<li>Daniel Wildt (Dell)</li>
<li>Eduardo Sasso</li>
<li>O JME-Man: Marlon Luz</li>
<li>Vitório Sassi</li>
<li>Fábio Patrício</li>
<li>Dalton Camargo</li>
</ul>
<p>Tomara que não esteja frio, visto que me recuperei a pouco de uma gripe forte destas paulistanas que são bem cascas-grossas para se curar.<br />
E
</p>
]]></content:encoded>
			<wfw:commentRSS>http://edgarsilva.com.br/2008/05/26/jugday-2008-porto-alegre-dia-3105/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Combinando jBPM com REST &#8230; Mais que possível, é até simples</title>
		<link>http://edgarsilva.com.br/2008/05/26/combinando-jbpm-com-rest-mais-que-possivel-e-ate-simples/</link>
		<comments>http://edgarsilva.com.br/2008/05/26/combinando-jbpm-com-rest-mais-que-possivel-e-ate-simples/#comments</comments>
		<pubDate>Mon, 26 May 2008 19:15:57 +0000</pubDate>
		<dc:creator>Edgar Silva</dc:creator>
		
	<category>java</category>
	<category>jboss</category>
		<guid isPermaLink="false">http://edgarsilva.com.br/2008/05/26/combinando-jbpm-com-rest-mais-que-possivel-e-ate-simples/</guid>
		<description><![CDATA[Ao deparar-se com o jBPM a primeira impressão sempre é meio confusa, mas depois que se passa do terceiro processo baseado em BPM e com a idéia de POG, e isto nada quer dizer a famosa "Programação Orientada a Gambiarra" e sim a Programação Orientada a Grafos , sim é isto mesmo: Graphos, ou quem [...]]]></description>
			<content:encoded><![CDATA[<p>Ao deparar-se com o jBPM a primeira impressão sempre é meio confusa, mas depois que se passa do terceiro processo baseado em BPM e com a idéia de POG, e isto nada quer dizer a famosa "Programação Orientada a Gambiarra" e sim a <span style="font-weight: bold">Programação Orientada a Grafos</span> , sim é isto mesmo: Graphos, ou quem sabe "desenhos", ou "caixinhas" ou o que sua imaginação preferir.</p>
<p>Este pequeno post mostra uma idéia de como você pode combinar a implementação EasyRest e o jBPM ambos membros do guarda-chuva de soluções JBoss, vamos começar com algumas considerações para quem for implementar algo no mundo real:</p>
<ul>
<li>No Exemplo, o jbpmContext pode ser melhor aproveitado</li>
<li>O uso de TaskNodes (nós que suportam interação humanda) poderiam no caso abaixo serem simplesmente nodes do tipo State ou simples Nodes</li>
</ul>
<p><span style="font-weight: bold">Processo</span></p>
<p>O exemplo é simples, apenas trata que quando você quer licenciar um veiculo, você passa por: a) Um pagamento na Secretaria de Fazenda, b) Faz uma Vistoria do seu carro, c) o Detran lhe envia o documento e pronto.</p>
<p><img title="processoLic" id="image227" alt="processoLic" src="http://edgarsilva.com.br/wp-content/uploads/2008/05/processo.png" /></p>
<p>A idéia então é através de algumas URLs, poder te acessibilidade a navegar por n instancias deste processo, e a qualquer momento, saber em que passo seu veículo está, assim como o Detran também contabilizar informações para ele, gerando assim um dado que poderia ser registrado num dashboard de uma solução BAM.</p>
<p><span style="font-weight: bold">As URLS de Exemplo</span></p>
<ol>
<li>/licencia/{placa}/{ano} - Para iniciar um processo e recebimento de guia de pagamento</li>
<li>/realize/pagementosefa/{id da guia de pagamento} - Para movimentar o "Grafo" do Processo pra frente</li>
<li>realize/vistoria/{id da guia de pagto}/{id confirmacao pagamento sefa} - Para movimentar para o nó "envia-documento"</li>
</ol>
<p style="font-weight: bold">Implementando Estes exemplos</p>
<p>1 - Temos que iniciar a nova instancia de um processo, para isto veja noss método que responde pela URL no nosso pojo de servico REST:</p>
<div class="igBar"><span id="ljava-10"><a href="#" onclick="javascript:showCodeTxt('java-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span><br />
<div id="java-10">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@<a href="http://www.google.com/search?q=allinurl%3AProvider+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Provider</span></a></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@Path<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"/"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Service <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ProcessDefinition processDefinition;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@GET</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@Path<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"/licencia/{ano}/{placa}"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@ProduceMime<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"text/plain"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> licenciar<span style="color: #66cc66;">&#40;</span>@PathParam<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"ano"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> ano, @PathParam<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"placa"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> placa<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">JbpmContext ctx = JbpmConfiguration.<span style="color: #006600;">getInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">createJbpmContext</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">try</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ProcessInstance instance = ctx.<span style="color: #006600;">newProcessInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"licenciamento"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">instance.<span style="color: #006600;">getContextInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">setVariable</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"ano"</span>, ano<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">instance.<span style="color: #006600;">getContextInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">setVariable</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"placa"</span>, placa<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Token t = instance.<span style="color: #006600;">getRootToken</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">t.<span style="color: #006600;">signal</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ctx.<span style="color: #006600;">save</span><span style="color: #66cc66;">&#40;</span>instance<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3ALong+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Long</span></a><span style="color: #66cc66;">&#40;</span>instance.<span style="color: #006600;">getId</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">finally</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ctx.<span style="color: #006600;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Observe que adicionamos algumas variáveis no contexto do jbpm, estas variáveis são armazenadas em memória ou persistidas no Banco de Dados, fazendo com que a qualquer momento você possa recuperá-las.</p>
<p>2 - Agora vamos recuperar uma instância de processo ativa, com base no id repassado na URL Rest.</p>
<div class="igBar"><span id="ljava-11"><a href="#" onclick="javascript:showCodeTxt('java-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span><br />
<div id="java-11">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@GET</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@Path<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"/realize/pagementosefa/{id}"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@ProduceMime<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"text/plain"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> doPagamentoSefa<span style="color: #66cc66;">&#40;</span>@PathParam<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"id"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> id<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">JbpmContext ctx = JbpmConfiguration.<span style="color: #006600;">getInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">createJbpmContext</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">try</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">GraphSession graphSession = ctx.<span style="color: #006600;">getGraphSession</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ProcessInstance processInstance = graphSession</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.<span style="color: #006600;">loadProcessInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3ALong+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Long</span></a><span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3ACollection+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Collection</span></a> taskList = <span style="color: #000000; font-weight: bold;">null</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">taskList = <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3ACollection+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Collection</span></a><span style="color: #66cc66;">&#41;</span> processInstance.<span style="color: #006600;">getTaskMgmtInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getTaskInstances</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TaskInstance<span style="color: #66cc66;">&#41;</span>taskList.<span style="color: #006600;">iterator</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">next</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">end</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">processInstance.<span style="color: #006600;">getContextInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">setVariable</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"idsefa"</span>,&nbsp; <a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">currentTimeMillis</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>+1L <span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">return</span> processInstance.<span style="color: #006600;">getContextInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getVariable</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"idsefa"</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> ;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">finally</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ctx.<span style="color: #006600;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>3 - Continuando o Processo promovendo a navegação:</p>
<div class="igBar"><span id="ljava-12"><a href="#" onclick="javascript:showCodeTxt('java-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span><br />
<div id="java-12">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@GET</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@Path<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"/realize/vistoria/{id}/{idsefa}"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@ProduceMime<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"text/plain"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> doVistoria<span style="color: #66cc66;">&#40;</span>@PathParam<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"id"</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> id, @PathParam<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"idsefa"</span><span style="color: #66cc66;">&#41;</span> <a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a> idSefa<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">JbpmContext ctx = JbpmConfiguration.<span style="color: #006600;">getInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">createJbpmContext</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">try</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">GraphSession graphSession = ctx.<span style="color: #006600;">getGraphSession</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ProcessInstance processInstance = graphSession</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.<span style="color: #006600;">loadProcessInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3ALong+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Long</span></a><span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>processInstance.<span style="color: #006600;">getContextInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getVariable</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"idsefa"</span><span style="color: #66cc66;">&#41;</span>==<span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">return</span> <span style="color: #ff0000;">"POR FAVOR FACA A PAGAMENTO NA SEFA"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3ACollection+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Collection</span></a> taskList = <span style="color: #000000; font-weight: bold;">null</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">taskList = <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3ACollection+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Collection</span></a><span style="color: #66cc66;">&#41;</span> processInstance.<span style="color: #006600;">getTaskMgmtInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getTaskInstances</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">taskList.<span style="color: #006600;">iterator</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">next</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>TaskInstance<span style="color: #66cc66;">&#41;</span>taskList.<span style="color: #006600;">iterator</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">next</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">end</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">processInstance.<span style="color: #006600;">getContextInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">setVariable</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"idvistoria"</span>,&nbsp; <a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">currentTimeMillis</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>+1L <span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">return</span> processInstance.<span style="color: #006600;">getContextInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getVariable</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"idvistoria"</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> ;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">finally</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ctx.<span style="color: #006600;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Considerações</strong></p>
<p>O modelo de desenvolvimento desta solução muito mais que simples, torna-se divertido, claro que esta aplicação é uma demo, que é uma das coisas que vamos mostrar no <a target="_blank" href="http://www.rsjug.org/">JUGDAY </a>dia 31 em Porto Alegre as 16:00, na palestra <strong>OpenSource SOA com JBoss .</strong> Vejo vocês por lá então "tché".</p>
<p>[]s</p>
<p>E
</p>
]]></content:encoded>
			<wfw:commentRSS>http://edgarsilva.com.br/2008/05/26/combinando-jbpm-com-rest-mais-que-possivel-e-ate-simples/feed/</wfw:commentRSS>
		</item>
	</channel>
</rss>
