CONTENTS

01. OVERVIEW
This document aims to support the configuration of requests for posting and transfer (ATFA125) via workflow in Protheus.
02. PRE-CONDITIONS
To use the approval of posting and transfer via workflow, you must first configure the server, the e-mail tool and a web service of the environment for the workflow.
You do not need to access Protheus for approvals, because after the required settings, an e-mail is sent to the approver, who then responds by notifying whether the request has been approved or not.
If you need help with the local server and the e-mail tool, the document below shows how to set up the account for sending the workflow account by Gmail.
Or you can also follow the settings in the SIGAPCO workflow documentation
Configuration of contingency approval via workflow - SIGAPCO - P12
https://centraldeatendimento.totvs.com/hc/pt-br/articles/360039344333-MP-SIGAATF-SOLICITA%C3%87%C3%83O-DE-BAIXA-OU-TRANSFERENCIA-ATFA125-ATFA126
Web service configurations in appserver.ini used in the example in the image below:

Ideally, the PATH must point to the folder Protheus_data, so you can find the workflow files without problems |
03. WORKFLOW SETTINGS
To make the following configurations, access the configurator menu.
Through the configurator (SIGACFG), access: Environment > Workflow > E-mail Accounts
Mailbox Enter the mailbox data. Remember to enter the e-mail address the sender will use for contingency approvals in the address. We use the following e-mail address in our example: [email protected] 
Receive Messages Enter the POP3 server and the port, as well as the e-mail accounts and their respective passwords, to be used for receiving messages 
Send Messages Enter the SMTP port and server, as well as the account to be used for sending the contingency approvals.

|
In the configurator menu, access: Environment > Workflow > Workflow Processes
Add a workflow process.

|
In the configurator menu, access: Environment > Workflow > Workflow Status Add a workflow status, linking the process added in the previous step

|
In the configurator menu, access: Environment > Workflow > Workflow Parameters Postal Service
Select the options in accordance with your preferences. Our contingency approval example displays them as follows:
 Processes

Notification

Messenger
| It is important to enter the workflow's web service address in the field Server. |

|
In the configurator menu, access:
Environment > E-mail/Proxy > Settings Enter the e-mail server data




Configuring the web service: Access the SRVWIZARD: 
Select the folder Web Modules and click Add Fill out the fields on the screen as shown: 
Link the address of your host (web service) with the code of the branch you will use: [HTTP] ENABLE=1 PORT=83 Enter the localhost address + the port found in the HTTP key in the .INI of the server. 
Configure the minimum and the maximum number of users that will access the web service and click Confirm:

|
- INSTALLING AND CONFIGURING THE E-MAIL SERVER
This tool functions as a local e-mail server with SMTP and POP. We can download this tool for free via developers portal http://www.hmailserver.com Configuring Mozilla Thunderbird: The Thunderbird e-mail tool is free and can be downloaded directly from the Mozilla developers web site: https://www.mozilla.org/pt-BR/thunderbird The documentation attached below contains the settings for this server: CONFIGURING THE E-MAIL SERVER.docx If you need help with the local server and the e-mail tool, the document below shows how to set up the account for sending the workflow account by Gmail.
|
The system parameters below are required for using the workflow in request approvals.
MV_ATFSOLD - Enter whether the process for requesting Postings/Transfers is active 
MV_PRELAN - Generate pre-entry in accounting

MV_ALTLCTO - Allow changes to the accounting entry of integration

MV_ATFHTTP - HTTP server directory

MV_ATFWBX - Activate sending of workflow in posting/transfer request

MV_ATFWFM - Enter whether WF should be generated for requests 
MV_ATFASTR - HTML file of template for request approval

MV_ATFASBX - HTML file of template for posting approval 
MV_ATFAAPS - HTML file of template for asset transfer request

MV_ATFURL - URL of HTTP service

MV_ATFRESP - Enter the code of user responsible for Asset 
|
No menu do configurador, acesse:
Usuário > Senhas > Usuários
Inclua ou altere um usuário informando o e-mail de aprovador no campo e-mail

|
|
04. UTILIZAÇÃO DA SOLICITAÇÃO DE TRANSFERÊNCIA VIA WORKFLOW
No menu do módulo Ativo Fixo (SIGAATF), acesse:
Atualizações > Cadastro> Cadastro de Pessoas
Preencher com o email no cadastro de pessoas

Acesse a rotina de Responsáveis X Bens:
Atualizações > Cadastros >Responsáveis X Bens
Efetuar o vinculo do cadastro do bem com o cadastro de pessoa

Acesse a rotina de Solicitação de Baixa e Transferência:
Atualizações > Movimentos>Solicitação de Baixa e Transferência
No exemplo, utilizaremos a solicitação de transferência
Clique no botão Outras Ações -> Solicitação de Transferência

Solicitação efetuada- código 000070

Para enviar os e-mails, acesse o SIGACFG:
Ambientes / workflow / Contas de e-mail
Clique no botão Outras Ações -> Enviar:

Confirme a operação

Referente à solicitação 000070 recebido corretamente caixa de email:

Escolher o usuário para aprovar a solicitação
Acessando o link o sistema redireciona para a página de aprovação:

Após aprovar a solicitação

Acesse a rotina de Solicitação de Baixa e Transferência:
Atualizações > Movimentos>Solicitação de Baixa e Transferência
A solicitação foi aprovada corretamente

Os arquivos .htm podem ser encontrados no TFS na pasta rdmake padrão e deverão ser copiados para o local informado (dentro da pasta onde foi configurado o workflow) $/Protheus_Padrao/Fontes_Doc/Master/Fontes/Rdmake Padrao/MODELOS/Administrativos

Evidencia no link abaixo, de como fazer a configuração passo a passo: Configuração_Worflow_ATFA125.docx |