Índice:


Objetivo:


     Este documento tem como finalidade, demonstrar o uso da atividade "Atualizar Registros Localizando na Tabela".



Configuração:

    

<style type="text/css">
.expand-container{
margin-top:5px !important;
font-weight: normal !important;
}

.expand-control{
margin-bottom: 5px !important;
}

pre{
white-space: inherit !important;
}

table tr:nth-child(odd), table tr:nth-child(odd) > *{
   background: transparent !important;
border: 0 !important;
}

.pdl .codeContent .gutter{
    border-right: 1px solid #ccc !important;
}

.wiki-content .innerCell {
    overflow-y: hidden;
}

.HiddenDiv .confluence-information-macro {
    width: calc(100% - 25px);
    background: #fff !important; 
    -moz-border-radius: 0px !important;
    -webkit-border-radius: 0px !important;
    border-radius: 0px !important;
    color: #333;
    margin: 10px 0 1em 0;
    min-height: 20px;
    padding: 10px;
    position: relative;
    text-align: left !important;
}

.HiddenDiv .confluence-information-macro p.title{
padding-left: 20px;
    margin-top: -5px;
}

.HiddenDiv .confluence-information-macro .confluence-information-macro-icon.aui-iconfont-error{
	color: #fff;
}

.HiddenDiv .confluence-information-macro .confluence-information-macro pre{
    display: none;
}
.HiddenDiv .wiki-content a:link, .HiddenDiv .wiki-content a, .HiddenDiv .tab-nav-link, .HiddenDiv .current{
     color: #000 !important; 
}

.wiki-content a:link {
    color: #000 !important;
}

.lastDiv + pre{
    font-family: inherit;
}

.white-container{
    -moz-box-shadow: 2px 2px 2px #aaa;
    -webkit-box-shadow: 2px 2px 2px #aaa;
    box-shadow: 2px 2px 2px #aaa;
}

.confluence-embedded-file-wrapper .confluence-embedded-image{
    max-width: 100% !important;
    max-height: 100%;
}

</style>
<script type="text/javascript" language="javascript">

"use strict"

const Show = (divName, imgName) => {
window["currentElement"] = divName;
if(typeof divName === "string"){
	if(document.getElementById(divName).offsetHeight < 2){
     $("#" + divName).animate({height: $("#" + divName).get(0).scrollHeight + 7});
     $("#" + divName).css("visibility", "visible")
     $("#" + imgName).attr('src', '/download/attachments/309398329/remove.png?version=1&modificationDate=1509386912062&api=v2');  
     $(".HiddenDiv .tab-nav-link").on("click", function(){
          window["currentElement"] = $(this).parents().find(".HiddenDiv").attr("id");
     });  
	 $(".HiddenDiv .confluence-information-macro").mutate('height',function (element,info){
          this.selector.each(function(index, element){
             if($(this).parent().attr("id") == window["currentElement"])
             $(this).parent().height($(this).outerHeight() + 61);
          });		
     });
    }
    else{
     $("#" + divName).animate({height: "0px"});
     $("#" + divName).css("visibility", "hidden")
     $("#" + imgName).attr('src', '/download/attachments/309398329/add.png?version=1&modificationDate=1509382756808&api=v2');
    }
}
}
</script>

<div style="border:1px solid #aab8c6;padding:5px;-moz-border-radius: 5px;-webkit-border-radius: 5px;border-radius: 5px;background: #f7f7f7">      
      <div style="background:#f7f7f7;width:calc(100% - 10px);height:30px;color: #000;font-weight:bold;font-size: 16px;padding:5px;border-bottom: 1px solid #aab8c6;margin-bottom:14px">
           <span style="float:left"><img style="width: 16px; height: 16px; margin-top:3px" src="/download/attachments/149881483/settings.png?version=1&modificationDate=1509720640465&api=v2" /></span>
           <span style="float:left;font-size:inherit;padding-left:5px">Configuração</span>
     </div>
<div style="border: 1px solid #aab8c6">      
       <div style="background:#f7f7f7;width:calc(100% - 10px);height:30px;color: #000;font-weight:bold;font-size: 16px;padding:5px;border-bottom: 0px;">
           <span style="float:left;margin-top: 4px"><img style="width: 16px; height: 16px; margin-top:3px" src="/download/attachments/190516500/info.png?version=1&modificationDate=1509568958717&api=v2" /></span>
           <span style="float:left;font-size:inherit;padding-left:5px;margin-top: 3px">Informações Gerais</span>
      </div>
<div style="background:#f0f0f0;width:calc(100% - 10px);height:auto;min-height:30px;color: #000;font-weight:bold;font-size: 16px;padding:5px;border-bottom: 0px;">
           <div><span style="float:left;margin-top: 4px;font-weight:normal !important"><img style="width: 16px; height: 16px; margin-top:3px" src="/download/attachments/416843571/family-tree.png?version=1&modificationDate=1537984930243&api=v2" /></span>
           <span style="float:left;font-size:inherit;padding-left:5px;margin-top: 4px;font-weight:normal !important">Atividade <b>Atualizar Registros Localizando na Tabela</b></span><span style="float:right;margin-top: 4px;padding-right:5px;cursor:pointer" onclick="setTimeout(() => Show('hiddenDiv22', 'img22'));"><img id="img22" name="img22" style="width: 16px; height: 16px; margin-top: 3px" src="/download/attachments/309398329/add.png?version=1&modificationDate=1509382756808&api=v2"></span></div>
      </div>
<div style="background: #e2e2e2;">
<div id="hiddenDiv22" class="HiddenDiv" style="visibility:hidden;height: 0px; line-height: 30px; padding-left: 5px; background: #e2e2e2;">
<strong>Objetivo:</strong> A finalidade da atividade "Atualizar Registros Localizando na Tabela" é permitir que o usuário recupere dados de uma coluna da tabela resultante de uma consulta SQL.<br>
<strong>Passo a Passo:</strong> Primeiramente é necessário arrastar a atividade <strong>"Atualizar Registros Localizando na Tabela"</strong> para o <strong>"Fluxo de Trabalho Sequencial"</strong> em sua fórmula visual.<br><br>
<b>OBS:</b> Devemos lembrar que a atividade "Atualizar Registros Localizando na Tabela" deverá vir sempre acompanhada da atividade "Executar Consulta SQL".
<div style="background: #fff; padding:10px;text-align:center;width:calc(100% - 25px);margin:10px 0px;">

</div>
Após atividade ter sido adicionada ao fluxo de trabalho, é necessário configurar as propriedades da atividade.
<div style="background: #fff; padding:10px;text-align:center;width:calc(100% - 25px);margin:10px 0px">

</div>
No exemplo acima, as propriedades foram preenchidas da seguinte maneira:
<div style="background: #fff; padding:10px;text-align:center;width:calc(100% - 25px);margin:10px 0px">



Não se esqueça de preencher as propriedades da atividade "Executar Consulta SQL"

Mais de "Atividade Executar Consulta SQL"

</div>
Após preencher as propriedades, salve e execute a <strong>Fórmula Visual</strong>. Verifique o resultado do processo. A <strong>Fórmula Visual</strong> deverá executar com sucesso. Com isso poderemos seguir para o exemplo de utilização real da atividade.
<div style="background: #fff; padding:10px;text-align:center;width:calc(100% - 25px);margin:10px 0px">

</div>
<span style="font-size: 20px;">EXEMPLO PRÁTICO</span><br>
Vamos agora ver um exemplo prático do uso da atividade "Atualizar Registros Localizando na Tabela".
<div style="background: #fff; padding:10px;text-align:center;width:calc(100% - 25px);margin:10px 0px">

</div>
Após preenchermos as suas atividades iniciais, iremos adicionar agora, três outras atividades, são elas:<br>
- Executar Código<br>
<div style="background: #fff; padding:10px;text-align:center;width:calc(100% - 25px);margin:10px 0px">

private void codeActivity1_ExecuteCode(object sender, System.EventArgs args)
{
  this.rmsExpressionActivity1.Expression = "'" + this.rmsTableFilterActivity1.OutPutValue.ToString() + "'";
}

Mais de "Atividade Executar Código"

</div>
- Expressão<br>
<div style="background: #fff; padding:10px;text-align:center;width:calc(100% - 25px);margin:10px 0px">

A Atividade de Expressão deverá ser adicionada com a propriedade Expressões com qualquer valor, foi usado 1, como exemplo.

Mais de "Atividade Expressão"

</div>
- Enviar e-mail<br>
<div style="background: #fff; padding:10px;text-align:center;width:calc(100% - 25px);margin:10px 0px">

Lembre-se de preencher corretamente o assunto do e-mail,os destinatários, remetente e texto do e-mail. Como exemplo colocamos a informação obtida pela atividade "Atualizar Registros Localizando na Tabela" como texto do e-mail.

Mais de "Atividade Enviar E-mail"

</div>
Salve e execute e veja o resultado.<br>
<span style="font-size: 20px;">RESULTADO</span><br>
<div style="background: #fff; padding:10px;text-align:center;width:calc(100% - 25px);margin:10px 0px">



</div>
</div>
</div>
</div>
<div style="padding:7px"></div>
<div style="border: 1px solid #aab8c6">      
       <div style="background:#f7f7f7;width:calc(100% - 10px);height:30px;color: #000;font-weight:bold;font-size: 16px;padding:5px;border-bottom: 0px;">
           <span style="float:left;margin-top: 4px"><img style="width: 16px; height: 16px; margin-top:3px" src="/download/attachments/309398329/preference.png?version=1&modificationDate=1509369965368&api=v2" /></span>
           <span style="float:left;font-size:inherit;padding-left:5px;margin-top: 3px">Parâmetros da Atividade</span>
      </div>
      <div style="background:#f0f0f0;width:calc(100% - 10px);height:auto;min-height:30px;color: #000;font-weight:bold;font-size: 16px;padding:5px;border-bottom: 0px;">
           <div style="width:100%;height: 30px;border-bottom:1px solid #d0d0d0;padding-bottom:5px;"><span style="float:left;margin-top: 4px;font-weight:normal !important"><img style="width: 16px; height: 16px; margin-top:3px" src="/download/attachments/309398329/cube.png?version=1&modificationDate=1509370590936&api=v2" /></span>
           <span style="float:left;font-size:inherit;padding-left:5px;margin-top: 4px;font-weight:normal !important">Chave da Fonte de Dados <b>(Obrigatório)</b></span><span style="float:right;margin-top: 4px;padding-right:5px;cursor:pointer" onclick="Show('hiddenDiv3', 'img3');"><img id="img3" name="img3" style="width: 16px; height: 16px; margin-top: 3px" src="/download/attachments/309398329/add.png?version=1&modificationDate=1509382756808&api=v2"></span></div>
<div style="background: #e2e2e2;">
<div id="hiddenDiv3" style="visibility:hidden;height: 0px; line-height: 30px; padding-left: 5px; background: #e2e2e2;font-weight:normal">
<strong>Descrição:</strong> Campos da fonte de dados que serão utilizados como chave para pesquisa.<br>
<strong>Tipo:</strong> String (Cadeia de caracteres)<br>
<strong>Como Usar:</strong> Esse parâmetro é do tipo <strong>Cadeia de Caracteres</strong>, ou seja, deve-se utilizar um valor alfanumérico que represente a os campos da fonte de dados que serão utilizados como <strong>chave para pesquisa.</strong>.<br>
<strong>Valor Utilizado na Requisição:</strong> CODCOLIGADA;CODFILIAL
</div>
</div>
<div style="width:100%;height: 30px;border-bottom:1px solid #d0d0d0;padding-bottom:5px;padding-top:5px"><span style="float:left;margin-top: 4px;font-weight:normal !important"><img style="width: 16px; height: 16px; margin-top:3px" src="/download/attachments/309398329/cube.png?version=1&modificationDate=1509370590936&api=v2" /></span>
           <span style="float:left;font-size:inherit;padding-left:5px;margin-top: 4px;font-weight:normal !important">Chave de Pesquisa da Linha <b>(Obrigatório)</b></span><span style="float:right;margin-top: 4px;padding-right:5px;cursor:pointer" onclick="Show('hiddenDiv4', 'img4');"><img id="img4" name="img4" style="width: 16px; height: 16px; margin-top: 3px" src="/download/attachments/309398329/add.png?version=1&modificationDate=1509382756808&api=v2"></span></div>
<div style="background: #e2e2e2;">
<div id="hiddenDiv4" style="visibility:hidden;height: 0px; line-height: 30px; padding-left: 5px; background: #e2e2e2;font-weight:normal">
<strong>Descrição:</strong> Campos da linha que serão utilizados como chave para pesquisa.<br>
<strong>Tipo:</strong> String (Cadeia de caracteres)<br>
<strong>Como Usar:</strong> Esse parâmetro é do tipo <strong>Cadeia de Caracteres</strong>, ou seja, deve-se utilizar um valor alfanumérico que represente a os campos da linha que serão utilizados como <strong>chave para pesquisa.</strong><br>
<strong>Valor Utilizado na Requisição:</strong> CODCOLIGADA;CODFILIAL
</div>
</div>
<div style="width:100%;height: 30px;border-bottom:1px solid #d0d0d0;padding-bottom:5px;padding-top:5px"><span style="float:left;margin-top: 4px;font-weight:normal !important"><img style="width: 16px; height: 16px; margin-top:3px" src="/download/attachments/309398329/cube.png?version=1&modificationDate=1509370590936&api=v2" /></span>
           <span style="float:left;font-size:inherit;padding-left:5px;margin-top: 4px;font-weight:normal !important">Coluna que será Retornada pela Pesquisa <b>(Obrigatório)</b></span><span style="float:right;margin-top: 4px;padding-right:5px;cursor:pointer" onclick="Show('hiddenDiv109', 'img109');"><img id="img109" name="img109" style="width: 16px; height: 16px; margin-top: 3px" src="/download/attachments/309398329/add.png?version=1&modificationDate=1509382756808&api=v2"></span></div>
<div style="background: #e2e2e2;">
<div id="hiddenDiv109" style="visibility:hidden;height: 0px; line-height: 30px; padding-left: 5px; background: #e2e2e2;font-weight:normal">
<strong>Descrição:</strong> Coluna que terá o seu valor retornado pela pesquisa.<br>
<strong>Tipo:</strong> String (Cadeia de caracteres)<br>
<strong>Como Usar:</strong> Esse parâmetro é do tipo <strong>Cadeia de Caracteres</strong>, ou seja, deve-se utilizar um valor alfanumérico que represente a a coluna que terá o seu valor retornado pela <strong>pesquisa</strong>.</strong><br>
<strong>Valor Utilizado na Requisição:</strong> NOME
</div>
</div>
<div style="width:100%;height: 30px;border-bottom:1px solid #d0d0d0;padding-bottom:5px;padding-top:5px"><span style="float:left;margin-top: 4px;font-weight:normal !important"><img style="width: 16px; height: 16px; margin-top:3px" src="/download/attachments/309398329/cube.png?version=1&modificationDate=1509370590936&api=v2" /></span>
           <span style="float:left;font-size:inherit;padding-left:5px;margin-top: 4px;font-weight:normal !important">Fonte de Dados da Pesquisa <b>(Obrigatório)</b></span><span style="float:right;margin-top: 4px;padding-right:5px;cursor:pointer" onclick="Show('hiddenDiv5', 'img5');"><img id="img5" name="img5" style="width: 16px; height: 16px; margin-top: 3px" src="/download/attachments/309398329/add.png?version=1&modificationDate=1509382756808&api=v2"></span></div>
<div style="background: #e2e2e2;">
<div id="hiddenDiv5" style="visibility:hidden;height: 0px; line-height: 30px; padding-left: 5px; background: #e2e2e2;font-weight:normal">
<strong>Descrição:</strong> É o resultado da consulta SQL em um conjunto de tabelas em Memória.<br>
<strong>Tipo:</strong> DataSet (Conjunto de Tabelas em Memória)<br>
<strong>Como Usar:</strong> Esse parâmetro é do tipo <strong>Conjunto de Tabelas em Memória</strong>, ou seja, deve-se utilizar um conjunto de tabelas em memória contendo o resultado da consulta SQL proveniente da Atividade "Executar Consulta SQL" vinculada.<br>
<strong>Valor Utilizado na Requisição:</strong> Activity=rmsConsSQLActivity1, Path=DataSet
</div>
</div>
<div style="width:100%;height: 30px;padding-top:5px"><span style="float:left;margin-top: 4px;font-weight:normal !important"><img style="width: 16px; height: 16px; margin-top:3px" src="/download/attachments/309398329/cube.png?version=1&modificationDate=1509370590936&api=v2" /></span>
           <span style="float:left;font-size:inherit;padding-left:5px;margin-top: 4px;font-weight:normal !important">Linha Para Atualização <b>(Obrigatório)</b></span><span style="float:right;margin-top: 4px;padding-right:5px;cursor:pointer" onclick="Show('hiddenDiv18', 'img18');"><img id="img18" name="img18" style="width: 16px; height: 16px; margin-top: 3px" src="/download/attachments/309398329/add.png?version=1&modificationDate=1509382756808&api=v2"></span></div>
<div style="background: #e2e2e2;">
<div id="hiddenDiv18" style="visibility:hidden;height: 0px; line-height: 30px; padding-left: 5px; background: #e2e2e2;font-weight:normal">
<strong>Descrição:</strong> Linha da tabela que será chave da pesquisa.<br>
<strong>Tipo:</strong> DataRow (Linha de uma Tabela em Memória)<br>
<strong>Como Usar:</strong> Esse parâmetro é do tipo <strong>Linha de uma Tabela em Memória</strong>, ou seja, deve-se utilizar uma linha de uma tabela em memória que represente a linha da tabela que será <strong>chave da pesquisa</strong>.<br>
<strong>Valor Utilizado na Requisição:</strong> Activity=rmsConsSQLActivity1, Path=Tables[0].Row
</div>
</div>
</div>
</div>
<div style="padding:7px"></div>
<div style="border: 1px solid #aab8c6">      
       <div style="background:#f7f7f7;width:calc(100% - 10px);height:30px;color: #000;font-weight:bold;font-size: 16px;padding:5px;border-bottom: 0px;">
           <span style="float:left;margin-top: 4px"><img style="width: 16px; height: 16px; margin-top:3px" src="/download/attachments/309398329/preference.png?version=1&modificationDate=1509369965368&api=v2" /></span>
           <span style="float:left;font-size:inherit;padding-left:5px;margin-top: 3px">Retorno da Atividade</span>
      </div>
<div style="background:#f0f0f0;width:calc(100% - 10px);height:auto;min-height:30px;color: #000;font-weight:bold;font-size: 16px;padding:5px;border-bottom: 0px;">
           <div><span style="float:left;margin-top: 4px;font-weight:normal !important"><img style="width: 16px; height: 16px; margin-top:3px" src="/download/attachments/309398329/cube.png?version=1&modificationDate=1509370590936&api=v2" /></span>
           <span style="float:left;font-size:inherit;padding-left:5px;margin-top: 4px;font-weight:normal !important">Valor Retornado <strong>(Opcional)</strong></span><span style="float:right;margin-top: 4px;padding-right:5px;cursor:pointer" onclick="Show('hiddenDiv6', 'img6');"><img id="img6" name="img6" style="width: 16px; height: 16px; margin-top: 3px" src="/download/attachments/309398329/add.png?version=1&modificationDate=1509382756808&api=v2"></span></div>
      </div>
<div style="background: #e2e2e2;">
<div id="hiddenDiv6" class="HiddenDiv" style="visibility:hidden;height: 0px; line-height: 30px; padding-left: 5px; background: #e2e2e2;">
<strong>Descrição:</strong> Valor retornado pela pesquisa dos registros.<br>
<strong>Tipo:</strong> Objeto (Object)
</div>
</div>
</div>
</div>