Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

Visão Geral do Programa

O objetivo deste ProcessServer é possibilitar a geração de movimento por competência via WebService para os contratos . Os movimentos gerados poderão ser consultados no módulo TOTVS Gestão de Estoque, Compras e Faturamento.

...

Este é o método publicado no WebService (wsProcess) para que seja consumido o serviço de geração do movimento por competência (EduNFECompetenciaSliceableData)

Utilização do WebService

Para realizar  a geração de movimento por competência , deve ser utilizado a operação de ExecuteWithXmlParams.

...

Dica
titleAcessar XML no RM

Dica:

Para conhecer melhor o XML e suas informações é possível acessar no RM o XML de processos que foram executados.

Por exemplo, podemos executar o processo de geração de movimento em um base de dados de homologação e observar no XML gerado as informações preenchidas.

Para isso acesse o menu “Executar” digite “XML” e clique em “XML de parâmetros de JOB”  na tela apresentada crie um filtro para que seja carregados os JOB do processo em questão.


Exemplo do XML completo pronto para ser consumido via o WebService responsável em executar o processo de geração de movimento por competência.

Bloco de código
languagexml
titleGeração do movimento
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tot="http://www.totvs.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <tot:ExecuteWithXmlParams>
         <!--Optional:-->
         <tot:ProcessServerName>EduNFEData</tot:ProcessServerName>
         <!--Optional:-->
         <tot:strXmlParams><![CDATA[<?xml version="1.0" encoding="utf-16"?>
<EduNFEParamsProc z:Id="i1" xmlns="http://www.totvs.com.br/RM/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
  <ActionModule xmlns="http://www.totvs.com/">S</ActionModule>
  <ActionName xmlns="http://www.totvs.com/">EduNFEAction</ActionName>
  <CanParallelize xmlns="http://www.totvs.com/">true</CanParallelize>
  <CanSendMail xmlns="http://www.totvs.com/">false</CanSendMail>
  <CanWaitSchedule xmlns="http://www.totvs.com/">false</CanWaitSchedule>
  <CodUsuario xmlns="http://www.totvs.com/">mestre</CodUsuario>
  <ConnectionId i:nil="true" xmlns="http://www.totvs.com/" />
  <ConnectionString i:nil="true" xmlns="http://www.totvs.com/" />
  <Context z:Id="i2" xmlns="http://www.totvs.com/" xmlns:a="http://www.totvs.com.br/RM/">
    <a:_params xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$EXERCICIOFISCAL</b:Key>
        <b:Value i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">22</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODLOCPRT</b:Key>
        <b:Value i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">12</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODTIPOCURSO</b:Key>
        <b:Value i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">1</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$EDUTIPOUSR</b:Key>
        <b:Value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">A</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODUNIDADEBIB</b:Key>
        <b:Value i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">5</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODCOLIGADA</b:Key>
        <b:Value i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">1</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$RHTIPOUSR</b:Key>
        <b:Value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">01</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODIGOEXTERNO</b:Key>
        <b:Value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">-1</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODSISTEMA</b:Key>
        <b:Value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">S</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODUSUARIOSERVICO</b:Key>
        <b:Value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema" />
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODUSUARIO</b:Key>
        <b:Value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">mestre</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$IDPRJ</b:Key>
        <b:Value i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">2</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CHAPAFUNCIONARIO</b:Key>
        <b:Value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">00001</b:Value>
      </b:KeyValueOfanyTypeanyType>
      <b:KeyValueOfanyTypeanyType>
        <b:Key i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">$CODFILIAL</b:Key>
        <b:Value i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">1</b:Value>
      </b:KeyValueOfanyTypeanyType>
    </a:_params>
    <a:Environment>DotNet</a:Environment>
  </Context>
  <CustomData i:nil="true" xmlns="http://www.totvs.com/" />
  <DisableIsolateProcess xmlns="http://www.totvs.com/">false</DisableIsolateProcess>
  <DriverType i:nil="true" xmlns="http://www.totvs.com/" />
  <ExecutionId xmlns="http://www.totvs.com/">9fc5097e-1b73-450e-a39a-10bebbd5cccd</ExecutionId>
  <FailureMessage xmlns="http://www.totvs.com/">Falha na execução do processo</FailureMessage>
  <FriendlyLogs i:nil="true" xmlns="http://www.totvs.com/" />
  <HideProgressDialog xmlns="http://www.totvs.com/">false</HideProgressDialog>
  <HostName xmlns="http://www.totvs.com/">BHN050102875</HostName>
  <Initialized xmlns="http://www.totvs.com/">true</Initialized>
  <Ip xmlns="http://www.totvs.com/">10.31.8.119</Ip>
  <IsolateProcess xmlns="http://www.totvs.com/">false</IsolateProcess>
  <JobID xmlns="http://www.totvs.com/">
    <Children />
    <ExecID>1</ExecID>
    <ID>123023</ID>
    <IsPriorityJob>false</IsPriorityJob>
  </JobID>
  <JobServerHostName xmlns="http://www.totvs.com/">BHN050102875</JobServerHostName>
  <MasterActionName i:nil="true" xmlns="http://www.totvs.com/" />
  <MaximumQuantityOfPrimaryKeysPerProcess xmlns="http://www.totvs.com/">1000</MaximumQuantityOfPrimaryKeysPerProcess>
  <MinimumQuantityOfPrimaryKeysPerProcess xmlns="http://www.totvs.com/">1</MinimumQuantityOfPrimaryKeysPerProcess>
  <NetworkUser i:nil="true" xmlns="http://www.totvs.com/" />
  <NotifyEmail xmlns="http://www.totvs.com/">false</NotifyEmail>
  <NotifyEmailList i:nil="true" xmlns="http://www.totvs.com/" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
  <NotifyFluig xmlns="http://www.totvs.com/">false</NotifyFluig>
  <OnlineMode xmlns="http://www.totvs.com/">false</OnlineMode>
  <PrimaryKeyList xmlns="http://www.totvs.com/" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
  <PrimaryKeyNames i:nil="true" xmlns="http://www.totvs.com/" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
  <PrimaryKeyTableName i:nil="true" xmlns="http://www.totvs.com/" />
  <ProcessName xmlns="http://www.totvs.com/">Geração de movimentos</ProcessName>
  <QuantityOfSplits xmlns="http://www.totvs.com/">0</QuantityOfSplits>
  <SaveLogInDatabase xmlns="http://www.totvs.com/">true</SaveLogInDatabase>
  <SaveParamsExecution xmlns="http://www.totvs.com/">false</SaveParamsExecution>
  <ScheduleDateTime xmlns="http://www.totvs.com/">2019-01-22T11:09:11.1681506-02:00</ScheduleDateTime>
  <Scheduler xmlns="http://www.totvs.com/">JobMonitor</Scheduler>
  <SendMail xmlns="http://www.totvs.com/">false</SendMail>
  <ServerName xmlns="http://www.totvs.com/">EduNFEData</ServerName>
  <ServiceInterface i:type="b:RuntimeType" z:FactoryType="c:UnitySerializationHolder" xmlns="http://www.totvs.com/" xmlns:a="http://schemas.datacontract.org/2004/07/System" xmlns:b="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.RuntimeType" xmlns:c="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.UnitySerializationHolder">
    <Data i:type="d:string" xmlns="" xmlns:d="http://www.w3.org/2001/XMLSchema">RM.Edu.Interfaces.IEduNFE</Data>
    <UnityType i:type="d:int" xmlns="" xmlns:d="http://www.w3.org/2001/XMLSchema">4</UnityType>
    <AssemblyName i:type="d:string" xmlns="" xmlns:d="http://www.w3.org/2001/XMLSchema">RM.Edu.Interfaces.Intf, Version=12.1.19.405, Culture=neutral, PublicKeyToken=null</AssemblyName>
  </ServiceInterface>
  <ShouldParallelize xmlns="http://www.totvs.com/">false</ShouldParallelize>
  <StatusMessage i:nil="true" xmlns="http://www.totvs.com/" />
  <SuccessMessage xmlns="http://www.totvs.com/">Processo executado com sucesso</SuccessMessage>
  <SyncExecution xmlns="http://www.totvs.com/">false</SyncExecution>
  <UseJobMonitor xmlns="http://www.totvs.com/">true</UseJobMonitor>
  <UserName xmlns="http://www.totvs.com/">mestre</UserName>
  <WaitSchedule xmlns="http://www.totvs.com/">false</WaitSchedule>
  <Boletos xmlns:a="http://www.totvs.com/" />
  <FiltroBoleto xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <a:anyType i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema">FLANBOLETO.IDBOLETO = :F1
</a:anyType>
    <a:anyType i:type="b:int" xmlns:b="http://www.w3.org/2001/XMLSchema">12043</a:anyType>
  </FiltroBoleto>
  <MesAno>0001-01-01T00:00:00</MesAno>
  <MovimentoNFEParams z:Id="i3">
    <ActionModule i:nil="true" xmlns="http://www.totvs.com/" />
    <ActionName i:nil="true" xmlns="http://www.totvs.com/" />
    <CanParallelize xmlns="http://www.totvs.com/">false</CanParallelize>
    <CanSendMail xmlns="http://www.totvs.com/">false</CanSendMail>
    <CanWaitSchedule xmlns="http://www.totvs.com/">false</CanWaitSchedule>
    <CodUsuario i:nil="true" xmlns="http://www.totvs.com/" />
    <ConnectionId i:nil="true" xmlns="http://www.totvs.com/" />
    <ConnectionString i:nil="true" xmlns="http://www.totvs.com/" />
    <Context i:nil="true" xmlns="http://www.totvs.com/" xmlns:a="http://www.totvs.com.br/RM/" />
    <CustomData i:nil="true" xmlns="http://www.totvs.com/" />
    <DisableIsolateProcess xmlns="http://www.totvs.com/">false</DisableIsolateProcess>
    <DriverType i:nil="true" xmlns="http://www.totvs.com/" />
    <ExecutionId xmlns="http://www.totvs.com/">598a25e7-6fdd-4f47-adc0-fdc9a0aebbcc</ExecutionId>
    <FailureMessage xmlns="http://www.totvs.com/">Falha na execução do processo</FailureMessage>
    <FriendlyLogs i:nil="true" xmlns="http://www.totvs.com/" />
    <HideProgressDialog xmlns="http://www.totvs.com/">false</HideProgressDialog>
    <HostName i:nil="true" xmlns="http://www.totvs.com/" />
    <Initialized xmlns="http://www.totvs.com/">false</Initialized>
    <Ip i:nil="true" xmlns="http://www.totvs.com/" />
    <IsolateProcess xmlns="http://www.totvs.com/">false</IsolateProcess>
    <JobID xmlns="http://www.totvs.com/">
      <Children />
      <ExecID>-1</ExecID>
      <ID>-1</ID>
      <IsPriorityJob>false</IsPriorityJob>
    </JobID>
    <JobServerHostName i:nil="true" xmlns="http://www.totvs.com/" />
    <MasterActionName i:nil="true" xmlns="http://www.totvs.com/" />
    <MaximumQuantityOfPrimaryKeysPerProcess xmlns="http://www.totvs.com/">1000</MaximumQuantityOfPrimaryKeysPerProcess>
    <MinimumQuantityOfPrimaryKeysPerProcess xmlns="http://www.totvs.com/">1</MinimumQuantityOfPrimaryKeysPerProcess>
    <NetworkUser i:nil="true" xmlns="http://www.totvs.com/" />
    <NotifyEmail xmlns="http://www.totvs.com/">false</NotifyEmail>
    <NotifyEmailList i:nil="true" xmlns="http://www.totvs.com/" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
    <NotifyFluig xmlns="http://www.totvs.com/">false</NotifyFluig>
    <OnlineMode xmlns="http://www.totvs.com/">false</OnlineMode>
    <PrimaryKeyList xmlns="http://www.totvs.com/" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
    <PrimaryKeyNames i:nil="true" xmlns="http://www.totvs.com/" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
    <PrimaryKeyTableName i:nil="true" xmlns="http://www.totvs.com/" />
    <ProcessName i:nil="true" xmlns="http://www.totvs.com/" />
    <QuantityOfSplits xmlns="http://www.totvs.com/">0</QuantityOfSplits>
    <SaveLogInDatabase xmlns="http://www.totvs.com/">true</SaveLogInDatabase>
    <SaveParamsExecution xmlns="http://www.totvs.com/">false</SaveParamsExecution>
    <ScheduleDateTime xmlns="http://www.totvs.com/">2019-01-22T11:09:11.1681506-02:00</ScheduleDateTime>
    <Scheduler xmlns="http://www.totvs.com/">JobMonitor</Scheduler>
    <SendMail xmlns="http://www.totvs.com/">false</SendMail>
    <ServerName i:nil="true" xmlns="http://www.totvs.com/" />
    <ServiceInterface i:nil="true" xmlns="http://www.totvs.com/" xmlns:a="http://schemas.datacontract.org/2004/07/System" />
    <ShouldParallelize xmlns="http://www.totvs.com/">false</ShouldParallelize>
    <StatusMessage i:nil="true" xmlns="http://www.totvs.com/" />
    <SuccessMessage xmlns="http://www.totvs.com/">Processo executado com sucesso</SuccessMessage>
    <SyncExecution xmlns="http://www.totvs.com/">false</SyncExecution>
    <UseJobMonitor xmlns="http://www.totvs.com/">true</UseJobMonitor>
    <UserName i:nil="true" xmlns="http://www.totvs.com/" />
    <WaitSchedule xmlns="http://www.totvs.com/">false</WaitSchedule>
    <CodColigada>1</CodColigada>
    <CodFilial>1</CodFilial>
    <CodServico i:nil="true" />
    <CodSistemaLogado>S</CodSistemaLogado>
    <CodTMv>2.2.10</CodTMv>
    <CodTipoCurso>1</CodTipoCurso>
    <CodUsuarioLogado>mestre</CodUsuarioLogado>
    <DataComp i:nil="true" />
    <DataEmissaoFinal>2018-12-31T00:00:00</DataEmissaoFinal>
    <DataEmissaoInicial>2018-01-01T00:00:00</DataEmissaoInicial>
    <DataVencFinal i:nil="true" />
    <DataVencInicial i:nil="true" />
    <DesconsideraBolsaCredito>false</DesconsideraBolsaCredito>
    <DiaFixo />
    <Filtro i:nil="true" />
    <LogEventoAtivado>false</LogEventoAtivado>
    <OrigemDataEmissao>DataEmissaoLan</OrigemDataEmissao>
    <PermiteMovValorLiquidoZero>false</PermiteMovValorLiquidoZero>
    <PermiteRegerarMov>true</PermiteRegerarMov>
    <TipoRespFinanceiro>RespFinanceiroAluno</TipoRespFinanceiro>
    <TipoTarefaMovimento>GeracaoRegeracaoMov</TipoTarefaMovimento>
  </MovimentoNFEParams>
  <StatusLanc>Todos</StatusLanc>
  <TipoTarefa>GeracaoRegeracaoMov</TipoTarefa>
</EduNFEParamsProc>]]></tot:strXmlParams>
      </tot:ExecuteWithXmlParams>
   </soapenv:Body>
</soapenv:Envelope>

Exemplo do retorno da execução

O ExecuteWithXmlParamsResult = 1 indica que o processo foi executado com sucesso.

...