<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:modeler="http://camunda.org/schema/modeler/1.0" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Web Modeler" exporterVersion="ffe380b" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.9.0">
  <bpmn:collaboration id="Collaboration_0fsh8hc" name="Realizar envio de dados cadastrais ao eSocial">
    <bpmn:participant id="Participant_0qvlcl3" name="Realizar envio de dados cadastrais ao eSocial" processRef="Process_1w6a3jz" />
  </bpmn:collaboration>
  <bpmn:process id="Process_1w6a3jz" name="Realizar Envio de Eventos ao eSocial" isExecutable="true">
    <bpmn:laneSet id="LaneSet_1r8fdgg">
      <bpmn:lane id="Lane_0c8t3ds" name="SEA">
        <bpmn:flowNodeRef>StartEvent_1</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_1gd0ll8</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_1h42xdr</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Event_1bl2gtu</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_0oaf9ii</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_1jzoz1r</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_13692xn</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gateway_0xft6ai</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_14dzcrr</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_01thje5</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Event_0or1etp</bpmn:flowNodeRef>
        <bpmn:childLaneSet id="LaneSet_0yrcwaw">
          <bpmn:lane id="Lane_1dicsqe" name="Órgão Setorial">
            <bpmn:flowNodeRef>StartEvent_1</bpmn:flowNodeRef>
            <bpmn:flowNodeRef>Activity_1gd0ll8</bpmn:flowNodeRef>
            <bpmn:flowNodeRef>Activity_1h42xdr</bpmn:flowNodeRef>
            <bpmn:flowNodeRef>Event_1bl2gtu</bpmn:flowNodeRef>
            <bpmn:flowNodeRef>Activity_0oaf9ii</bpmn:flowNodeRef>
            <bpmn:flowNodeRef>Activity_1jzoz1r</bpmn:flowNodeRef>
            <bpmn:flowNodeRef>Activity_13692xn</bpmn:flowNodeRef>
            <bpmn:flowNodeRef>Gateway_0xft6ai</bpmn:flowNodeRef>
            <bpmn:flowNodeRef>Activity_14dzcrr</bpmn:flowNodeRef>
            <bpmn:flowNodeRef>Activity_01thje5</bpmn:flowNodeRef>
            <bpmn:flowNodeRef>Event_0or1etp</bpmn:flowNodeRef>
          </bpmn:lane>
        </bpmn:childLaneSet>
      </bpmn:lane>
    </bpmn:laneSet>
    <bpmn:startEvent id="StartEvent_1" name="Diariamente">
      <bpmn:outgoing>Flow_0u9cg8v</bpmn:outgoing>
      <bpmn:timerEventDefinition id="TimerEventDefinition_10ux785" />
    </bpmn:startEvent>
    <bpmn:task id="Activity_1gd0ll8" name="Realizar apuração de dados cadastrais">
      <bpmn:documentation>Módulo eSocial &gt; Submódulo Administração &gt; Manter tarefas do eSocial Administração &gt; Incluir tarefas: apuração geral de ativos e apuração de geral de inativos.</bpmn:documentation>
      <bpmn:incoming>Flow_0u9cg8v</bpmn:incoming>
      <bpmn:outgoing>Flow_1po3h5e</bpmn:outgoing>
    </bpmn:task>
    <bpmn:task id="Activity_1h42xdr" name="Validar dados cadastrais do trabalhador">
      <bpmn:incoming>Flow_0767dg3</bpmn:incoming>
      <bpmn:incoming>Flow_1po3h5e</bpmn:incoming>
      <bpmn:outgoing>Flow_0ih391e</bpmn:outgoing>
    </bpmn:task>
    <bpmn:intermediateCatchEvent id="Event_1bl2gtu" name="Retorno do eSocial recebido">
      <bpmn:incoming>Flow_1522730</bpmn:incoming>
      <bpmn:outgoing>Flow_0xx8kxl</bpmn:outgoing>
      <bpmn:conditionalEventDefinition id="ConditionalEventDefinition_1h6waf9">
        <bpmn:condition xsi:type="bpmn:tFormalExpression" />
      </bpmn:conditionalEventDefinition>
    </bpmn:intermediateCatchEvent>
    <bpmn:task id="Activity_0oaf9ii" name="Preparar dados no SIGRH (módulo eSocial)">
      <bpmn:incoming>Flow_0ih391e</bpmn:incoming>
      <bpmn:outgoing>Flow_0xlq7cz</bpmn:outgoing>
    </bpmn:task>
    <bpmn:task id="Activity_1jzoz1r" name="Gerar arquivos XML no SIGRH">
      <bpmn:incoming>Flow_0xlq7cz</bpmn:incoming>
      <bpmn:outgoing>Flow_0iwkqzo</bpmn:outgoing>
    </bpmn:task>
    <bpmn:task id="Activity_13692xn" name="Realizar envio ao eSocial">
      <bpmn:incoming>Flow_0iwkqzo</bpmn:incoming>
      <bpmn:outgoing>Flow_1522730</bpmn:outgoing>
    </bpmn:task>
    <bpmn:exclusiveGateway id="Gateway_0xft6ai" default="Flow_0vdvsgj">
      <bpmn:incoming>Flow_19u5kdn</bpmn:incoming>
      <bpmn:outgoing>Flow_0vdvsgj</bpmn:outgoing>
      <bpmn:outgoing>Flow_14toy7p</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:task id="Activity_14dzcrr" name="Realizar ajuste cadastral">
      <bpmn:documentation>Nesta etapa, são corrigidas todas as inconsistências identificadas na validação cadastral. O processo pode entrar em ciclo (loop), pois após cada correção é necessário revalidar os dados. Caso ainda existam inconsistências, o fluxo retorna para nova correção. Quando os dados estiverem totalmente consistentes, o processo segue para geração das informações no sistema. Essa atividade garante a integridade das informações enviadas.

Nome, CPF, data de nascimento ou qualquer outra informação que não esteja de acordo com a Receita Federal. Erros cadastrais mais complexos devem ser corrigidos pelo Setorial de Gestão de Pessoas do Órgão.</bpmn:documentation>
      <bpmn:incoming>Flow_14toy7p</bpmn:incoming>
      <bpmn:outgoing>Flow_0767dg3</bpmn:outgoing>
    </bpmn:task>
    <bpmn:task id="Activity_01thje5" name="Analisar retorno do eSocial">
      <bpmn:incoming>Flow_0xx8kxl</bpmn:incoming>
      <bpmn:outgoing>Flow_19u5kdn</bpmn:outgoing>
    </bpmn:task>
    <bpmn:endEvent id="Event_0or1etp" name="Dados cadastrais enviados ao eSocial">
      <bpmn:incoming>Flow_0vdvsgj</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_0u9cg8v" sourceRef="StartEvent_1" targetRef="Activity_1gd0ll8" />
    <bpmn:sequenceFlow id="Flow_1po3h5e" sourceRef="Activity_1gd0ll8" targetRef="Activity_1h42xdr" />
    <bpmn:sequenceFlow id="Flow_0767dg3" sourceRef="Activity_14dzcrr" targetRef="Activity_1h42xdr" />
    <bpmn:sequenceFlow id="Flow_0ih391e" sourceRef="Activity_1h42xdr" targetRef="Activity_0oaf9ii" />
    <bpmn:sequenceFlow id="Flow_1522730" sourceRef="Activity_13692xn" targetRef="Event_1bl2gtu" />
    <bpmn:sequenceFlow id="Flow_0xx8kxl" sourceRef="Event_1bl2gtu" targetRef="Activity_01thje5" />
    <bpmn:sequenceFlow id="Flow_0xlq7cz" sourceRef="Activity_0oaf9ii" targetRef="Activity_1jzoz1r" />
    <bpmn:sequenceFlow id="Flow_0iwkqzo" sourceRef="Activity_1jzoz1r" targetRef="Activity_13692xn" />
    <bpmn:sequenceFlow id="Flow_19u5kdn" sourceRef="Activity_01thje5" targetRef="Gateway_0xft6ai" />
    <bpmn:sequenceFlow id="Flow_0vdvsgj" name="Não há inconsistências" sourceRef="Gateway_0xft6ai" targetRef="Event_0or1etp" />
    <bpmn:sequenceFlow id="Flow_14toy7p" name="Há inconsistências" sourceRef="Gateway_0xft6ai" targetRef="Activity_14dzcrr" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_0fsh8hc">
      <bpmndi:BPMNShape id="Participant_0qvlcl3_di" bpmnElement="Participant_0qvlcl3" isHorizontal="true">
        <dc:Bounds x="160" y="80" width="1790" height="400" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_0c8t3ds_di" bpmnElement="Lane_0c8t3ds" isHorizontal="true">
        <dc:Bounds x="190" y="80" width="1760" height="400" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_1dicsqe_di" bpmnElement="Lane_1dicsqe" isHorizontal="true">
        <dc:Bounds x="220" y="80" width="1730" height="400" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_09fimq8_di" bpmnElement="StartEvent_1">
        <dc:Bounds x="272" y="232" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="260" y="275" width="60" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_1gd0ll8_di" bpmnElement="Activity_1gd0ll8">
        <dc:Bounds x="370" y="210" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_1h42xdr_di" bpmnElement="Activity_1h42xdr">
        <dc:Bounds x="570" y="210" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1kdgw0v_di" bpmnElement="Event_1bl2gtu">
        <dc:Bounds x="1362" y="232" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1339" y="275" width="82" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_1831g7x" bpmnElement="Activity_0oaf9ii">
        <dc:Bounds x="770" y="210" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_0tq4eus" bpmnElement="Activity_1jzoz1r">
        <dc:Bounds x="980" y="210" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_13692xn_di" bpmnElement="Activity_13692xn">
        <dc:Bounds x="1170" y="210" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_0xft6ai_di" bpmnElement="Gateway_0xft6ai" isMarkerVisible="true">
        <dc:Bounds x="1645" y="225" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_14dzcrr_di" bpmnElement="Activity_14dzcrr">
        <dc:Bounds x="1780" y="320" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_18xxa24" bpmnElement="Activity_01thje5">
        <dc:Bounds x="1470" y="210" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_0or1etp_di" bpmnElement="Event_0or1etp">
        <dc:Bounds x="1812" y="232" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1788" y="275" width="85" height="40" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_0u9cg8v_di" bpmnElement="Flow_0u9cg8v">
        <di:waypoint x="308" y="250" />
        <di:waypoint x="370" y="250" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1po3h5e_di" bpmnElement="Flow_1po3h5e">
        <di:waypoint x="470" y="250" />
        <di:waypoint x="570" y="250" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0767dg3_di" bpmnElement="Flow_0767dg3">
        <di:waypoint x="1830" y="400" />
        <di:waypoint x="1830" y="420" />
        <di:waypoint x="620" y="420" />
        <di:waypoint x="620" y="290" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0ih391e_di" bpmnElement="Flow_0ih391e">
        <di:waypoint x="670" y="250" />
        <di:waypoint x="770" y="250" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1522730_di" bpmnElement="Flow_1522730">
        <di:waypoint x="1270" y="250" />
        <di:waypoint x="1362" y="250" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0xx8kxl_di" bpmnElement="Flow_0xx8kxl">
        <di:waypoint x="1398" y="250" />
        <di:waypoint x="1470" y="250" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_0um9de6" bpmnElement="Flow_0xlq7cz">
        <di:waypoint x="870" y="250" />
        <di:waypoint x="980" y="250" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0iwkqzo_di" bpmnElement="Flow_0iwkqzo">
        <di:waypoint x="1080" y="250" />
        <di:waypoint x="1170" y="250" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_19u5kdn_di" bpmnElement="Flow_19u5kdn">
        <di:waypoint x="1570" y="250" />
        <di:waypoint x="1645" y="250" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0vdvsgj_di" bpmnElement="Flow_0vdvsgj">
        <di:waypoint x="1695" y="250" />
        <di:waypoint x="1812" y="250" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1710" y="216" width="75" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_14toy7p_di" bpmnElement="Flow_14toy7p">
        <di:waypoint x="1670" y="275" />
        <di:waypoint x="1670" y="360" />
        <di:waypoint x="1780" y="360" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1691" y="326" width="75" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
