<list>
  <ProcessDefinition>
    <processDefinitionPK>
      <companyId>1</companyId>
      <processId>Recrutamento e seleção</processId>
    </processDefinitionPK>
    <processDescription>Recrutamento e seleção</processDescription>
    <instruction>Este flow permite abertura de solicitação de contratação automatizadas, informando qual a função e direcionado para as aprovações corretas.</instruction>
    <active>true</active>
    <publicProcess>false</publicProcess>
    <volumeId>Default</volumeId>
    <categoryId>Recrutamento e Seleção</categoryId>
    <managerEngineAllocationId>Grupo</managerEngineAllocationId>
    <managerEngineAllocationConfiguration>&lt;AssignmentController&gt;&lt;Group&gt;Recrutamento&lt;/Group&gt;&lt;/AssignmentController&gt;</managerEngineAllocationConfiguration>
    <snapshotFrequency>0</snapshotFrequency>
    <baseDay>0</baseDay>
    <baseMonth>0</baseMonth>
    <periodId>Expediente BackOffice, Logística e Motorista</periodId>
    <uniqueCardVersion>false</uniqueCardVersion>
    <keyWord></keyWord>
    <complementsLevel>1</complementsLevel>
    <notifyRequisitionerComplements>true</notifyRequisitionerComplements>
    <notifyManagerComplements>false</notifyManagerComplements>
    <deadlineTime>2160000</deadlineTime>
    <warningDeadlineTime>0</warningDeadlineTime>
    <notifyAuthorityComplements>true</notifyAuthorityComplements>
  </ProcessDefinition>
  <ProcessDefinitionVersion>
    <processDefinitionVersionPK>
      <companyId>1</companyId>
      <processId>Recrutamento e seleção</processId>
      <version>34</version>
    </processDefinitionVersionPK>
    <versionDescription></versionDescription>
    <formId>823</formId>
    <editionMode>true</editionMode>
    <updateAttachmentsVersion>false</updateAttachmentsVersion>
    <controlsAttachmentsSecurity>false</controlsAttachmentsSecurity>
    <active>true</active>
    <blockedVersion>false</blockedVersion>
    <counterSign>false</counterSign>
    <openInstances>0</openInstances>
    <bpmnVersion>2</bpmnVersion>
    <processStates/>
    <favorito>false</favorito>
    <inheritFormSecurity>false</inheritFormSecurity>
    <mobileReady>true</mobileReady>
  </ProcessDefinitionVersion>
  <list>
    <ProcessState>
      <processStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>1</sequence>
      </processStatePK>
      <stateName>Solicitar colaborador</stateName>
      <stateDescription>Solicitar colaborador</stateDescription>
      <instruction></instruction>
      <deadlineTime>0</deadlineTime>
      <joint>false</joint>
      <agreementPercentage>0</agreementPercentage>
      <engineAllocationId></engineAllocationId>
      <engineAllocationConfiguration></engineAllocationConfiguration>
      <selectColleague>1</selectColleague>
      <initialState>true</initialState>
      <notifyAuthorityDelay>false</notifyAuthorityDelay>
      <notifyRequisitionerDelay>false</notifyRequisitionerDelay>
      <allowanceAuthorityTime>0</allowanceAuthorityTime>
      <frequenceAuthorityTime>0</frequenceAuthorityTime>
      <allowanceRequisitionerTime>0</allowanceRequisitionerTime>
      <frequenceRequisitionerTime>0</frequenceRequisitionerTime>
      <transferAttachments>false</transferAttachments>
      <subProcessId></subProcessId>
      <formFolder>0</formFolder>
      <notifyAuthorityFollowUp>true</notifyAuthorityFollowUp>
      <notifyRequisitionerFollowUp>true</notifyRequisitionerFollowUp>
      <automatic>false</automatic>
      <positionX>100</positionX>
      <positionY>83</positionY>
      <forecastedEffortType>0</forecastedEffortType>
      <forecastedEffort>0</forecastedEffort>
      <notifyManagerFollowUp>true</notifyManagerFollowUp>
      <notifyManagerDelay>false</notifyManagerDelay>
      <allowanceManagerTime>0</allowanceManagerTime>
      <frequenceManagerTime>0</frequenceManagerTime>
      <inhibitTransfer>false</inhibitTransfer>
      <periodId></periodId>
      <stateType>0</stateType>
      <bpmnType>10</bpmnType>
      <signalId>0</signalId>
      <counterSign>false</counterSign>
      <openInstances>0</openInstances>
      <noticeExpirationAuthorityTime>0</noticeExpirationAuthorityTime>
      <noticeExpirationRequisitionerTime>0</noticeExpirationRequisitionerTime>
      <noticeExpirationManagerTime>0</noticeExpirationManagerTime>
      <destinationStates/>
      <digitalSignature>false</digitalSignature>
    </ProcessState>
    <ProcessState>
      <processStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>4</sequence>
      </processStatePK>
      <stateName>Analisando necessidade</stateName>
      <stateDescription>Analisando necessidade</stateDescription>
      <instruction></instruction>
      <deadlineTime>259200</deadlineTime>
      <deadlineFieldName></deadlineFieldName>
      <joint>false</joint>
      <agreementPercentage>0</agreementPercentage>
      <engineAllocationId></engineAllocationId>
      <selectColleague>1</selectColleague>
      <initialState>false</initialState>
      <notifyAuthorityDelay>false</notifyAuthorityDelay>
      <notifyRequisitionerDelay>false</notifyRequisitionerDelay>
      <allowanceAuthorityTime>0</allowanceAuthorityTime>
      <frequenceAuthorityTime>0</frequenceAuthorityTime>
      <allowanceRequisitionerTime>0</allowanceRequisitionerTime>
      <frequenceRequisitionerTime>0</frequenceRequisitionerTime>
      <transferAttachments>false</transferAttachments>
      <subProcessId></subProcessId>
      <formFolder>0</formFolder>
      <notifyAuthorityFollowUp>true</notifyAuthorityFollowUp>
      <notifyRequisitionerFollowUp>true</notifyRequisitionerFollowUp>
      <automatic>false</automatic>
      <positionX>490</positionX>
      <positionY>210</positionY>
      <forecastedEffortType>0</forecastedEffortType>
      <forecastedEffort>0</forecastedEffort>
      <notifyManagerFollowUp>false</notifyManagerFollowUp>
      <notifyManagerDelay>false</notifyManagerDelay>
      <allowanceManagerTime>0</allowanceManagerTime>
      <frequenceManagerTime>0</frequenceManagerTime>
      <inhibitTransfer>false</inhibitTransfer>
      <periodId></periodId>
      <stateType>0</stateType>
      <bpmnType>80</bpmnType>
      <signalId>0</signalId>
      <counterSign>false</counterSign>
      <openInstances>0</openInstances>
      <noticeExpirationAuthorityTime>0</noticeExpirationAuthorityTime>
      <noticeExpirationRequisitionerTime>0</noticeExpirationRequisitionerTime>
      <noticeExpirationManagerTime>0</noticeExpirationManagerTime>
      <destinationStates/>
      <digitalSignature>false</digitalSignature>
      <executionType>0</executionType>
    </ProcessState>
    <ProcessState>
      <processStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>6</sequence>
      </processStatePK>
      <stateName>Selecionando candidatos</stateName>
      <stateDescription>Selecionando candidatos</stateDescription>
      <instruction></instruction>
      <deadlineTime>345600</deadlineTime>
      <deadlineFieldName></deadlineFieldName>
      <joint>false</joint>
      <agreementPercentage>0</agreementPercentage>
      <engineAllocationId>Pool Grupo</engineAllocationId>
      <engineAllocationConfiguration>&lt;AssignmentController&gt;&lt;Group&gt;Recrutamento&lt;/Group&gt;&lt;/AssignmentController&gt;</engineAllocationConfiguration>
      <selectColleague>1</selectColleague>
      <initialState>false</initialState>
      <notifyAuthorityDelay>false</notifyAuthorityDelay>
      <notifyRequisitionerDelay>false</notifyRequisitionerDelay>
      <allowanceAuthorityTime>0</allowanceAuthorityTime>
      <frequenceAuthorityTime>0</frequenceAuthorityTime>
      <allowanceRequisitionerTime>0</allowanceRequisitionerTime>
      <frequenceRequisitionerTime>0</frequenceRequisitionerTime>
      <transferAttachments>false</transferAttachments>
      <subProcessId></subProcessId>
      <formFolder>0</formFolder>
      <notifyAuthorityFollowUp>true</notifyAuthorityFollowUp>
      <notifyRequisitionerFollowUp>true</notifyRequisitionerFollowUp>
      <automatic>false</automatic>
      <positionX>490</positionX>
      <positionY>410</positionY>
      <forecastedEffortType>0</forecastedEffortType>
      <forecastedEffort>0</forecastedEffort>
      <notifyManagerFollowUp>false</notifyManagerFollowUp>
      <notifyManagerDelay>false</notifyManagerDelay>
      <allowanceManagerTime>0</allowanceManagerTime>
      <frequenceManagerTime>0</frequenceManagerTime>
      <inhibitTransfer>false</inhibitTransfer>
      <periodId></periodId>
      <stateType>0</stateType>
      <bpmnType>80</bpmnType>
      <signalId>0</signalId>
      <counterSign>false</counterSign>
      <openInstances>0</openInstances>
      <noticeExpirationAuthorityTime>0</noticeExpirationAuthorityTime>
      <noticeExpirationRequisitionerTime>0</noticeExpirationRequisitionerTime>
      <noticeExpirationManagerTime>0</noticeExpirationManagerTime>
      <destinationStates/>
      <digitalSignature>false</digitalSignature>
      <executionType>0</executionType>
    </ProcessState>
    <ProcessState>
      <processStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>18</sequence>
      </processStatePK>
      <stateName>Aguardando novo colaborador</stateName>
      <stateDescription>Aguardando novo colaborador</stateDescription>
      <instruction></instruction>
      <deadlineTime>259200</deadlineTime>
      <deadlineFieldName></deadlineFieldName>
      <joint>false</joint>
      <agreementPercentage>0</agreementPercentage>
      <engineAllocationId>Executor Atividade</engineAllocationId>
      <engineAllocationConfiguration>&lt;AssignmentController&gt;&lt;BaseActivity&gt;1&lt;/BaseActivity&gt;&lt;Returns&gt;Last&lt;/Returns&gt;&lt;/AssignmentController&gt;</engineAllocationConfiguration>
      <selectColleague>1</selectColleague>
      <initialState>false</initialState>
      <notifyAuthorityDelay>false</notifyAuthorityDelay>
      <notifyRequisitionerDelay>false</notifyRequisitionerDelay>
      <allowanceAuthorityTime>0</allowanceAuthorityTime>
      <frequenceAuthorityTime>0</frequenceAuthorityTime>
      <allowanceRequisitionerTime>0</allowanceRequisitionerTime>
      <frequenceRequisitionerTime>0</frequenceRequisitionerTime>
      <transferAttachments>false</transferAttachments>
      <subProcessId></subProcessId>
      <formFolder>0</formFolder>
      <notifyAuthorityFollowUp>true</notifyAuthorityFollowUp>
      <notifyRequisitionerFollowUp>true</notifyRequisitionerFollowUp>
      <automatic>false</automatic>
      <positionX>1240</positionX>
      <positionY>80</positionY>
      <forecastedEffortType>0</forecastedEffortType>
      <forecastedEffort>0</forecastedEffort>
      <notifyManagerFollowUp>false</notifyManagerFollowUp>
      <notifyManagerDelay>false</notifyManagerDelay>
      <allowanceManagerTime>0</allowanceManagerTime>
      <frequenceManagerTime>0</frequenceManagerTime>
      <inhibitTransfer>false</inhibitTransfer>
      <periodId></periodId>
      <stateType>0</stateType>
      <bpmnType>80</bpmnType>
      <signalId>0</signalId>
      <counterSign>false</counterSign>
      <openInstances>0</openInstances>
      <noticeExpirationAuthorityTime>0</noticeExpirationAuthorityTime>
      <noticeExpirationRequisitionerTime>0</noticeExpirationRequisitionerTime>
      <noticeExpirationManagerTime>0</noticeExpirationManagerTime>
      <destinationStates/>
      <digitalSignature>false</digitalSignature>
      <executionType>0</executionType>
    </ProcessState>
    <ProcessState>
      <processStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>24</sequence>
      </processStatePK>
      <stateName>Entregando equipamentos</stateName>
      <stateDescription>Entregando equipamentos</stateDescription>
      <instruction></instruction>
      <deadlineTime>345600</deadlineTime>
      <deadlineFieldName></deadlineFieldName>
      <joint>false</joint>
      <agreementPercentage>0</agreementPercentage>
      <engineAllocationId></engineAllocationId>
      <selectColleague>1</selectColleague>
      <initialState>false</initialState>
      <notifyAuthorityDelay>false</notifyAuthorityDelay>
      <notifyRequisitionerDelay>false</notifyRequisitionerDelay>
      <allowanceAuthorityTime>0</allowanceAuthorityTime>
      <frequenceAuthorityTime>0</frequenceAuthorityTime>
      <allowanceRequisitionerTime>0</allowanceRequisitionerTime>
      <frequenceRequisitionerTime>0</frequenceRequisitionerTime>
      <transferAttachments>false</transferAttachments>
      <subProcessId></subProcessId>
      <formFolder>0</formFolder>
      <notifyAuthorityFollowUp>true</notifyAuthorityFollowUp>
      <notifyRequisitionerFollowUp>true</notifyRequisitionerFollowUp>
      <automatic>false</automatic>
      <positionX>1240</positionX>
      <positionY>580</positionY>
      <forecastedEffortType>0</forecastedEffortType>
      <forecastedEffort>0</forecastedEffort>
      <notifyManagerFollowUp>false</notifyManagerFollowUp>
      <notifyManagerDelay>false</notifyManagerDelay>
      <allowanceManagerTime>0</allowanceManagerTime>
      <frequenceManagerTime>0</frequenceManagerTime>
      <inhibitTransfer>false</inhibitTransfer>
      <periodId></periodId>
      <stateType>0</stateType>
      <bpmnType>80</bpmnType>
      <signalId>0</signalId>
      <counterSign>false</counterSign>
      <openInstances>0</openInstances>
      <noticeExpirationAuthorityTime>0</noticeExpirationAuthorityTime>
      <noticeExpirationRequisitionerTime>0</noticeExpirationRequisitionerTime>
      <noticeExpirationManagerTime>0</noticeExpirationManagerTime>
      <destinationStates/>
      <digitalSignature>false</digitalSignature>
      <executionType>0</executionType>
    </ProcessState>
    <ProcessState>
      <processStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>57</sequence>
      </processStatePK>
      <stateName>Feedback do gestor</stateName>
      <stateDescription>Feedback do gestor</stateDescription>
      <instruction></instruction>
      <deadlineTime>259200</deadlineTime>
      <deadlineFieldName></deadlineFieldName>
      <joint>false</joint>
      <agreementPercentage>0</agreementPercentage>
      <engineAllocationId>Campo Formulário</engineAllocationId>
      <engineAllocationConfiguration>&lt;AssignmentController&gt;&lt;FormField&gt;gestor_cc&lt;/FormField&gt;&lt;/AssignmentController&gt;</engineAllocationConfiguration>
      <selectColleague>1</selectColleague>
      <initialState>false</initialState>
      <notifyAuthorityDelay>true</notifyAuthorityDelay>
      <notifyRequisitionerDelay>false</notifyRequisitionerDelay>
      <allowanceAuthorityTime>3600</allowanceAuthorityTime>
      <frequenceAuthorityTime>3600</frequenceAuthorityTime>
      <allowanceRequisitionerTime>0</allowanceRequisitionerTime>
      <frequenceRequisitionerTime>0</frequenceRequisitionerTime>
      <transferAttachments>false</transferAttachments>
      <subProcessId></subProcessId>
      <formFolder>0</formFolder>
      <notifyAuthorityFollowUp>true</notifyAuthorityFollowUp>
      <notifyRequisitionerFollowUp>false</notifyRequisitionerFollowUp>
      <automatic>false</automatic>
      <positionX>1800</positionX>
      <positionY>250</positionY>
      <forecastedEffortType>0</forecastedEffortType>
      <forecastedEffort>0</forecastedEffort>
      <notifyManagerFollowUp>false</notifyManagerFollowUp>
      <notifyManagerDelay>false</notifyManagerDelay>
      <allowanceManagerTime>0</allowanceManagerTime>
      <frequenceManagerTime>0</frequenceManagerTime>
      <inhibitTransfer>false</inhibitTransfer>
      <periodId></periodId>
      <stateType>0</stateType>
      <bpmnType>80</bpmnType>
      <signalId>0</signalId>
      <counterSign>false</counterSign>
      <openInstances>0</openInstances>
      <noticeExpirationAuthorityTime>0</noticeExpirationAuthorityTime>
      <noticeExpirationRequisitionerTime>0</noticeExpirationRequisitionerTime>
      <noticeExpirationManagerTime>0</noticeExpirationManagerTime>
      <destinationStates/>
      <digitalSignature>false</digitalSignature>
      <executionType>0</executionType>
    </ProcessState>
    <ProcessState>
      <processStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>114</sequence>
      </processStatePK>
      <stateName>Corrigindo materiais</stateName>
      <stateDescription>Corrigindo materiais</stateDescription>
      <instruction></instruction>
      <deadlineTime>259200</deadlineTime>
      <deadlineFieldName></deadlineFieldName>
      <joint>false</joint>
      <agreementPercentage>0</agreementPercentage>
      <engineAllocationId></engineAllocationId>
      <selectColleague>1</selectColleague>
      <initialState>false</initialState>
      <notifyAuthorityDelay>true</notifyAuthorityDelay>
      <notifyRequisitionerDelay>false</notifyRequisitionerDelay>
      <allowanceAuthorityTime>3600</allowanceAuthorityTime>
      <frequenceAuthorityTime>3600</frequenceAuthorityTime>
      <allowanceRequisitionerTime>0</allowanceRequisitionerTime>
      <frequenceRequisitionerTime>0</frequenceRequisitionerTime>
      <transferAttachments>false</transferAttachments>
      <subProcessId></subProcessId>
      <formFolder>0</formFolder>
      <notifyAuthorityFollowUp>true</notifyAuthorityFollowUp>
      <notifyRequisitionerFollowUp>false</notifyRequisitionerFollowUp>
      <automatic>false</automatic>
      <positionX>1440</positionX>
      <positionY>400</positionY>
      <forecastedEffortType>0</forecastedEffortType>
      <forecastedEffort>0</forecastedEffort>
      <notifyManagerFollowUp>false</notifyManagerFollowUp>
      <notifyManagerDelay>false</notifyManagerDelay>
      <allowanceManagerTime>0</allowanceManagerTime>
      <frequenceManagerTime>0</frequenceManagerTime>
      <inhibitTransfer>false</inhibitTransfer>
      <periodId></periodId>
      <stateType>0</stateType>
      <bpmnType>80</bpmnType>
      <signalId>0</signalId>
      <counterSign>false</counterSign>
      <openInstances>0</openInstances>
      <noticeExpirationAuthorityTime>0</noticeExpirationAuthorityTime>
      <noticeExpirationRequisitionerTime>0</noticeExpirationRequisitionerTime>
      <noticeExpirationManagerTime>0</noticeExpirationManagerTime>
      <destinationStates/>
      <digitalSignature>false</digitalSignature>
      <executionType>0</executionType>
    </ProcessState>
    <ProcessState>
      <processStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>2</sequence>
      </processStatePK>
      <stateName>Validar Gestor</stateName>
      <stateDescription>Validar Gestor</stateDescription>
      <joint>false</joint>
      <initialState>false</initialState>
      <transferAttachments>false</transferAttachments>
      <subProcessId></subProcessId>
      <formFolder>0</formFolder>
      <automatic>true</automatic>
      <positionX>250</positionX>
      <positionY>47</positionY>
      <inhibitTransfer>false</inhibitTransfer>
      <stateType>1</stateType>
      <bpmnType>120</bpmnType>
      <signalId>0</signalId>
      <openInstances>0</openInstances>
      <destinationStates/>
      <digitalSignature>false</digitalSignature>
    </ProcessState>
    <ProcessState>
      <processStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>46</sequence>
      </processStatePK>
      <stateName>ValidarEquipamentos</stateName>
      <stateDescription>ValidarEquipamentos</stateDescription>
      <joint>false</joint>
      <initialState>false</initialState>
      <transferAttachments>false</transferAttachments>
      <subProcessId></subProcessId>
      <formFolder>0</formFolder>
      <automatic>true</automatic>
      <positionX>1060</positionX>
      <positionY>380</positionY>
      <inhibitTransfer>false</inhibitTransfer>
      <stateType>1</stateType>
      <bpmnType>120</bpmnType>
      <signalId>0</signalId>
      <openInstances>0</openInstances>
      <destinationStates/>
      <digitalSignature>false</digitalSignature>
    </ProcessState>
    <ProcessState>
      <processStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>95</sequence>
      </processStatePK>
      <stateName>Validar início</stateName>
      <stateDescription>Validar início</stateDescription>
      <joint>false</joint>
      <initialState>false</initialState>
      <transferAttachments>false</transferAttachments>
      <subProcessId></subProcessId>
      <formFolder>0</formFolder>
      <automatic>true</automatic>
      <positionX>1710</positionX>
      <positionY>70</positionY>
      <inhibitTransfer>false</inhibitTransfer>
      <stateType>1</stateType>
      <bpmnType>120</bpmnType>
      <signalId>0</signalId>
      <openInstances>0</openInstances>
      <destinationStates/>
      <digitalSignature>false</digitalSignature>
    </ProcessState>
    <ProcessState>
      <processStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>39</sequence>
      </processStatePK>
      <stateName>Cancelado</stateName>
      <stateDescription>Cancelado</stateDescription>
      <instruction>Atividade final do processo</instruction>
      <deadlineTime>0</deadlineTime>
      <joint>false</joint>
      <agreementPercentage>0</agreementPercentage>
      <engineAllocationId></engineAllocationId>
      <engineAllocationConfiguration></engineAllocationConfiguration>
      <selectColleague>0</selectColleague>
      <initialState>false</initialState>
      <notifyAuthorityDelay>true</notifyAuthorityDelay>
      <notifyRequisitionerDelay>false</notifyRequisitionerDelay>
      <allowanceAuthorityTime>0</allowanceAuthorityTime>
      <frequenceAuthorityTime>1</frequenceAuthorityTime>
      <allowanceRequisitionerTime>0</allowanceRequisitionerTime>
      <frequenceRequisitionerTime>0</frequenceRequisitionerTime>
      <transferAttachments>false</transferAttachments>
      <subProcessId></subProcessId>
      <formFolder>0</formFolder>
      <notifyAuthorityFollowUp>false</notifyAuthorityFollowUp>
      <notifyRequisitionerFollowUp>true</notifyRequisitionerFollowUp>
      <automatic>false</automatic>
      <positionX>680</positionX>
      <positionY>230</positionY>
      <forecastedEffortType>0</forecastedEffortType>
      <forecastedEffort>0</forecastedEffort>
      <notifyManagerFollowUp>false</notifyManagerFollowUp>
      <notifyManagerDelay>false</notifyManagerDelay>
      <allowanceManagerTime>0</allowanceManagerTime>
      <frequenceManagerTime>0</frequenceManagerTime>
      <inhibitTransfer>false</inhibitTransfer>
      <periodId></periodId>
      <stateType>6</stateType>
      <bpmnType>65</bpmnType>
      <signalId>0</signalId>
      <counterSign>false</counterSign>
      <openInstances>0</openInstances>
      <destinationStates/>
      <digitalSignature>false</digitalSignature>
    </ProcessState>
    <ProcessState>
      <processStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>55</sequence>
      </processStatePK>
      <stateName>Cancelado</stateName>
      <stateDescription>Cancelado</stateDescription>
      <instruction>Atividade final do processo</instruction>
      <deadlineTime>0</deadlineTime>
      <joint>false</joint>
      <agreementPercentage>0</agreementPercentage>
      <engineAllocationId></engineAllocationId>
      <engineAllocationConfiguration></engineAllocationConfiguration>
      <selectColleague>0</selectColleague>
      <initialState>false</initialState>
      <notifyAuthorityDelay>true</notifyAuthorityDelay>
      <notifyRequisitionerDelay>false</notifyRequisitionerDelay>
      <allowanceAuthorityTime>0</allowanceAuthorityTime>
      <frequenceAuthorityTime>1</frequenceAuthorityTime>
      <allowanceRequisitionerTime>0</allowanceRequisitionerTime>
      <frequenceRequisitionerTime>0</frequenceRequisitionerTime>
      <transferAttachments>false</transferAttachments>
      <subProcessId></subProcessId>
      <formFolder>0</formFolder>
      <notifyAuthorityFollowUp>false</notifyAuthorityFollowUp>
      <notifyRequisitionerFollowUp>true</notifyRequisitionerFollowUp>
      <automatic>false</automatic>
      <positionX>670</positionX>
      <positionY>490</positionY>
      <forecastedEffortType>0</forecastedEffortType>
      <forecastedEffort>0</forecastedEffort>
      <notifyManagerFollowUp>false</notifyManagerFollowUp>
      <notifyManagerDelay>false</notifyManagerDelay>
      <allowanceManagerTime>0</allowanceManagerTime>
      <frequenceManagerTime>0</frequenceManagerTime>
      <inhibitTransfer>false</inhibitTransfer>
      <periodId></periodId>
      <stateType>6</stateType>
      <bpmnType>65</bpmnType>
      <signalId>0</signalId>
      <counterSign>false</counterSign>
      <openInstances>0</openInstances>
      <destinationStates/>
      <digitalSignature>false</digitalSignature>
    </ProcessState>
    <ProcessState>
      <processStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>97</sequence>
      </processStatePK>
      <stateName>Fim</stateName>
      <stateDescription>Fim</stateDescription>
      <instruction>Atividade final do processo</instruction>
      <deadlineTime>0</deadlineTime>
      <joint>false</joint>
      <agreementPercentage>0</agreementPercentage>
      <engineAllocationId></engineAllocationId>
      <engineAllocationConfiguration></engineAllocationConfiguration>
      <selectColleague>0</selectColleague>
      <initialState>false</initialState>
      <notifyAuthorityDelay>true</notifyAuthorityDelay>
      <notifyRequisitionerDelay>false</notifyRequisitionerDelay>
      <allowanceAuthorityTime>0</allowanceAuthorityTime>
      <frequenceAuthorityTime>1</frequenceAuthorityTime>
      <allowanceRequisitionerTime>0</allowanceRequisitionerTime>
      <frequenceRequisitionerTime>0</frequenceRequisitionerTime>
      <transferAttachments>false</transferAttachments>
      <subProcessId></subProcessId>
      <formFolder>0</formFolder>
      <notifyAuthorityFollowUp>false</notifyAuthorityFollowUp>
      <notifyRequisitionerFollowUp>false</notifyRequisitionerFollowUp>
      <automatic>false</automatic>
      <positionX>1940</positionX>
      <positionY>100</positionY>
      <forecastedEffortType>0</forecastedEffortType>
      <forecastedEffort>0</forecastedEffort>
      <notifyManagerFollowUp>false</notifyManagerFollowUp>
      <notifyManagerDelay>false</notifyManagerDelay>
      <allowanceManagerTime>0</allowanceManagerTime>
      <frequenceManagerTime>0</frequenceManagerTime>
      <inhibitTransfer>false</inhibitTransfer>
      <periodId></periodId>
      <stateType>6</stateType>
      <bpmnType>60</bpmnType>
      <signalId>0</signalId>
      <counterSign>false</counterSign>
      <openInstances>0</openInstances>
      <destinationStates/>
      <digitalSignature>false</digitalSignature>
    </ProcessState>
  </list>
  <list>
    <ConditionProcessState>
      <conditionProcessStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <expressionOrder>1</expressionOrder>
        <version>34</version>
        <sequence>2</sequence>
      </conditionProcessStatePK>
      <condition>hAPI.getCardValue(&quot;centroCusto&quot;) == &quot;&quot;</condition>
      <destinationSequenceId>6</destinationSequenceId>
      <engineAllocationConfiguration>&lt;AssignmentController&gt;&lt;Group&gt;Recrutamento&lt;/Group&gt;&lt;/AssignmentController&gt;</engineAllocationConfiguration>
      <engineAllocationId>Pool Grupo</engineAllocationId>
      <conditionType>0</conditionType>
    </ConditionProcessState>
    <ConditionProcessState>
      <conditionProcessStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <expressionOrder>2</expressionOrder>
        <version>34</version>
        <sequence>2</sequence>
      </conditionProcessStatePK>
      <condition>true</condition>
      <destinationSequenceId>4</destinationSequenceId>
      <engineAllocationConfiguration>&lt;AssignmentController&gt;&lt;FormField&gt;gestor_cc&lt;/FormField&gt;&lt;/AssignmentController&gt;</engineAllocationConfiguration>
      <engineAllocationId>Campo Formulário</engineAllocationId>
      <conditionType>0</conditionType>
    </ConditionProcessState>
    <ConditionProcessState>
      <conditionProcessStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <expressionOrder>1</expressionOrder>
        <version>34</version>
        <sequence>46</sequence>
      </conditionProcessStatePK>
      <condition>hAPI.getCardValue(&quot;validarMotivo&quot;) == &quot;substituicao&quot;</condition>
      <destinationSequenceId>18</destinationSequenceId>
      <engineAllocationConfiguration>&lt;AssignmentController&gt;&lt;FormField&gt;gestor_cc&lt;/FormField&gt;&lt;/AssignmentController&gt;</engineAllocationConfiguration>
      <engineAllocationId>Campo Formulário</engineAllocationId>
      <conditionType>0</conditionType>
    </ConditionProcessState>
    <ConditionProcessState>
      <conditionProcessStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <expressionOrder>2</expressionOrder>
        <version>34</version>
        <sequence>46</sequence>
      </conditionProcessStatePK>
      <condition>hAPI.getCardValue(&quot;validarMotivo&quot;) == &quot;temporario&quot;</condition>
      <destinationSequenceId>18</destinationSequenceId>
      <engineAllocationConfiguration>&lt;AssignmentController&gt;&lt;FormField&gt;gestor_cc&lt;/FormField&gt;&lt;/AssignmentController&gt;</engineAllocationConfiguration>
      <engineAllocationId>Campo Formulário</engineAllocationId>
      <conditionType>0</conditionType>
    </ConditionProcessState>
    <ConditionProcessState>
      <conditionProcessStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <expressionOrder>3</expressionOrder>
        <version>34</version>
        <sequence>46</sequence>
      </conditionProcessStatePK>
      <condition>hAPI.getCardValue(&quot;validarMotivo&quot;) == &quot;aumento&quot;</condition>
      <destinationSequenceId>24</destinationSequenceId>
      <engineAllocationConfiguration>&lt;AssignmentController&gt;&lt;Group&gt;TIC&lt;/Group&gt;&lt;/AssignmentController&gt;</engineAllocationConfiguration>
      <engineAllocationId>Pool Grupo</engineAllocationId>
      <conditionType>0</conditionType>
    </ConditionProcessState>
    <ConditionProcessState>
      <conditionProcessStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <expressionOrder>1</expressionOrder>
        <version>34</version>
        <sequence>95</sequence>
      </conditionProcessStatePK>
      <condition>hAPI.getCardValue(&quot;validacaoFunc&quot;) == &quot;entregue&quot;</condition>
      <destinationSequenceId>57</destinationSequenceId>
      <engineAllocationConfiguration>&lt;AssignmentController&gt;&lt;FormField&gt;gestor_cc&lt;/FormField&gt;&lt;/AssignmentController&gt;</engineAllocationConfiguration>
      <engineAllocationId>Campo Formulário</engineAllocationId>
      <conditionType>0</conditionType>
    </ConditionProcessState>
    <ConditionProcessState>
      <conditionProcessStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <expressionOrder>2</expressionOrder>
        <version>34</version>
        <sequence>95</sequence>
      </conditionProcessStatePK>
      <condition>hAPI.getCardValue(&quot;validacaoFunc&quot;) == &quot;naoEntregue&quot;</condition>
      <destinationSequenceId>114</destinationSequenceId>
      <engineAllocationConfiguration>&lt;AssignmentController&gt;&lt;Group&gt;TIC&lt;/Group&gt;&lt;/AssignmentController&gt;</engineAllocationConfiguration>
      <engineAllocationId>Pool Grupo</engineAllocationId>
      <conditionType>0</conditionType>
    </ConditionProcessState>
    <ConditionProcessState>
      <conditionProcessStatePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <expressionOrder>3</expressionOrder>
        <version>34</version>
        <sequence>95</sequence>
      </conditionProcessStatePK>
      <condition>hAPI.getCardValue(&quot;validacaoFunc&quot;) == &quot;incorreto&quot;</condition>
      <destinationSequenceId>114</destinationSequenceId>
      <engineAllocationConfiguration>&lt;AssignmentController&gt;&lt;Group&gt;Recrutamento&lt;/Group&gt;&lt;/AssignmentController&gt;</engineAllocationConfiguration>
      <engineAllocationId>Pool Grupo</engineAllocationId>
      <conditionType>0</conditionType>
    </ConditionProcessState>
  </list>
  <list>
    <ProcessLink>
      <processLinkPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <linkSequence>3</linkSequence>
      </processLinkPK>
      <actionLabel></actionLabel>
      <returnPermited>false</returnPermited>
      <initialStateSequence>1</initialStateSequence>
      <finalStateSequence>2</finalStateSequence>
      <returnLabel></returnLabel>
      <name></name>
      <automaticLink>false</automaticLink>
      <defaultLink>false</defaultLink>
      <type>0</type>
    </ProcessLink>
    <ProcessLink>
      <processLinkPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <linkSequence>5</linkSequence>
      </processLinkPK>
      <actionLabel></actionLabel>
      <returnPermited>false</returnPermited>
      <initialStateSequence>2</initialStateSequence>
      <finalStateSequence>4</finalStateSequence>
      <returnLabel></returnLabel>
      <name>Gestor Identificado</name>
      <automaticLink>false</automaticLink>
      <defaultLink>false</defaultLink>
      <type>0</type>
      <movementTitle></movementTitle>
      <movementDescription></movementDescription>
      <movementAccessLinkDescription></movementAccessLinkDescription>
    </ProcessLink>
    <ProcessLink>
      <processLinkPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <linkSequence>7</linkSequence>
      </processLinkPK>
      <actionLabel></actionLabel>
      <returnPermited>false</returnPermited>
      <initialStateSequence>2</initialStateSequence>
      <finalStateSequence>6</finalStateSequence>
      <returnLabel></returnLabel>
      <name>Sem Gestor</name>
      <automaticLink>false</automaticLink>
      <defaultLink>false</defaultLink>
      <type>0</type>
    </ProcessLink>
    <ProcessLink>
      <processLinkPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <linkSequence>41</linkSequence>
      </processLinkPK>
      <actionLabel>Aprovar</actionLabel>
      <returnPermited>false</returnPermited>
      <initialStateSequence>4</initialStateSequence>
      <finalStateSequence>6</finalStateSequence>
      <returnLabel></returnLabel>
      <name>Aprovar</name>
      <automaticLink>false</automaticLink>
      <defaultLink>false</defaultLink>
      <type>0</type>
    </ProcessLink>
    <ProcessLink>
      <processLinkPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <linkSequence>53</linkSequence>
      </processLinkPK>
      <actionLabel>Reprovar</actionLabel>
      <returnPermited>false</returnPermited>
      <initialStateSequence>4</initialStateSequence>
      <finalStateSequence>39</finalStateSequence>
      <returnLabel></returnLabel>
      <name>Reprovar</name>
      <automaticLink>false</automaticLink>
      <defaultLink>false</defaultLink>
      <type>0</type>
    </ProcessLink>
    <ProcessLink>
      <processLinkPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <linkSequence>96</linkSequence>
      </processLinkPK>
      <actionLabel></actionLabel>
      <returnPermited>false</returnPermited>
      <initialStateSequence>18</initialStateSequence>
      <finalStateSequence>95</finalStateSequence>
      <returnLabel></returnLabel>
      <name></name>
      <automaticLink>false</automaticLink>
      <defaultLink>false</defaultLink>
      <type>0</type>
    </ProcessLink>
    <ProcessLink>
      <processLinkPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <linkSequence>110</linkSequence>
      </processLinkPK>
      <actionLabel></actionLabel>
      <returnPermited>false</returnPermited>
      <initialStateSequence>46</initialStateSequence>
      <finalStateSequence>24</finalStateSequence>
      <returnLabel></returnLabel>
      <name></name>
      <automaticLink>false</automaticLink>
      <defaultLink>false</defaultLink>
      <type>0</type>
    </ProcessLink>
    <ProcessLink>
      <processLinkPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <linkSequence>115</linkSequence>
      </processLinkPK>
      <actionLabel></actionLabel>
      <returnPermited>false</returnPermited>
      <initialStateSequence>95</initialStateSequence>
      <finalStateSequence>114</finalStateSequence>
      <returnLabel></returnLabel>
      <name></name>
      <automaticLink>false</automaticLink>
      <defaultLink>false</defaultLink>
      <type>0</type>
    </ProcessLink>
    <ProcessLink>
      <processLinkPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <linkSequence>116</linkSequence>
      </processLinkPK>
      <actionLabel>Prosseguir</actionLabel>
      <returnPermited>false</returnPermited>
      <initialStateSequence>114</initialStateSequence>
      <finalStateSequence>18</finalStateSequence>
      <returnLabel></returnLabel>
      <name>Material enviado</name>
      <automaticLink>false</automaticLink>
      <defaultLink>false</defaultLink>
      <type>0</type>
    </ProcessLink>
    <ProcessLink>
      <processLinkPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <linkSequence>117</linkSequence>
      </processLinkPK>
      <actionLabel>Cancelar seleção</actionLabel>
      <returnPermited>false</returnPermited>
      <initialStateSequence>6</initialStateSequence>
      <finalStateSequence>55</finalStateSequence>
      <returnLabel></returnLabel>
      <name>Cancelar</name>
      <automaticLink>false</automaticLink>
      <defaultLink>false</defaultLink>
      <type>0</type>
    </ProcessLink>
    <ProcessLink>
      <processLinkPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <linkSequence>118</linkSequence>
      </processLinkPK>
      <actionLabel></actionLabel>
      <returnPermited>false</returnPermited>
      <initialStateSequence>95</initialStateSequence>
      <finalStateSequence>57</finalStateSequence>
      <returnLabel></returnLabel>
      <name></name>
      <automaticLink>false</automaticLink>
      <defaultLink>false</defaultLink>
      <type>0</type>
    </ProcessLink>
    <ProcessLink>
      <processLinkPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <linkSequence>119</linkSequence>
      </processLinkPK>
      <actionLabel></actionLabel>
      <returnPermited>false</returnPermited>
      <initialStateSequence>57</initialStateSequence>
      <finalStateSequence>97</finalStateSequence>
      <returnLabel></returnLabel>
      <name></name>
      <automaticLink>false</automaticLink>
      <defaultLink>false</defaultLink>
      <type>0</type>
    </ProcessLink>
    <ProcessLink>
      <processLinkPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <linkSequence>120</linkSequence>
      </processLinkPK>
      <actionLabel></actionLabel>
      <returnPermited>false</returnPermited>
      <initialStateSequence>46</initialStateSequence>
      <finalStateSequence>18</finalStateSequence>
      <returnLabel></returnLabel>
      <name></name>
      <automaticLink>false</automaticLink>
      <defaultLink>false</defaultLink>
      <type>0</type>
    </ProcessLink>
    <ProcessLink>
      <processLinkPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <linkSequence>121</linkSequence>
      </processLinkPK>
      <actionLabel></actionLabel>
      <returnPermited>false</returnPermited>
      <initialStateSequence>24</initialStateSequence>
      <finalStateSequence>18</finalStateSequence>
      <returnLabel></returnLabel>
      <name></name>
      <automaticLink>false</automaticLink>
      <defaultLink>false</defaultLink>
      <type>0</type>
    </ProcessLink>
    <ProcessLink>
      <processLinkPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <linkSequence>122</linkSequence>
      </processLinkPK>
      <actionLabel></actionLabel>
      <returnPermited>false</returnPermited>
      <initialStateSequence>6</initialStateSequence>
      <finalStateSequence>46</finalStateSequence>
      <returnLabel></returnLabel>
      <name></name>
      <automaticLink>false</automaticLink>
      <defaultLink>false</defaultLink>
      <type>0</type>
    </ProcessLink>
  </list>
  <list/>
  <list>
    <WorkflowProcessEvent>
      <workflowProcessEventPK>
        <companyId>1</companyId>
        <eventId>beforeTaskSave</eventId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
      </workflowProcessEventPK>
      <eventDescription>function beforeTaskSave(colleagueId, nextSequenceId, userList) {
    try {
        var currentState = parseInt(String(getValue(&quot;WKNumState&quot;) || &quot;0&quot;), 10);
        var nextState = parseInt(String(nextSequenceId || &quot;0&quot;), 10);
        var completeTask = String(getValue(&quot;WKCompletTask&quot;) || &quot;false&quot;);
        log.info(&quot;[Recrutamento.beforeTaskSave] currentState=&quot; + currentState + &quot;, nextState=&quot; + nextState + &quot;, completeTask=&quot; + completeTask);

        if (completeTask !== &quot;true&quot;) return;

        // Disparo do e-mail inicial da solicitação (atividade inicial = 1).
        if (currentState === 1) {
            enviarNotificacaoSolicitacao();
            return;
        }

        // Disparo quando a seleção define o início do colaborador.
        if (currentState === 6 &amp;&amp; nextState === 46) {
            enviarNotificacaoInicioColaborador();
        }
    } catch (e) {
        log.error(&quot;[Recrutamento.beforeTaskSave] Erro ao disparar notificação: &quot; + e);
    }
}

function enviarNotificacaoSolicitacao() {
    var envio = montarContextoEnvio();
    if (!envio.ok) return;

    var params = new java.util.HashMap();
    params.put(&quot;WKNumProces&quot;, envio.processNumber);
    params.put(&quot;linkSolicitacao&quot;, envio.processLink);
    params.put(&quot;link&quot;, envio.processLink);
    params.put(&quot;requesterName&quot;, valueOrDefault(hAPI.getCardValue(&quot;requesterName&quot;)));
    params.put(&quot;gestorNome&quot;, valueOrDefault(hAPI.getCardValue(&quot;gestorNome&quot;)));
    params.put(&quot;dataAbertura&quot;, valueOrDefault(hAPI.getCardValue(&quot;dataAbertura&quot;)));
    params.put(&quot;cargo&quot;, valueOrDefault(hAPI.getCardValue(&quot;funcao&quot;)));
    params.put(&quot;kitUtilizado&quot;, getKitDescricao(hAPI.getCardValue(&quot;itensinicio&quot;)));
    params.put(&quot;motivoSolicitacao&quot;, getMotivoDescricao(hAPI.getCardValue(&quot;validarMotivo&quot;)));
    params.put(&quot;justificativa&quot;, valueOrDefault(hAPI.getCardValue(&quot;justificativa&quot;)));

    notifier.notify(&quot;admin&quot;, &quot;tpl_recrutamento_realizada_dia&quot;, params, envio.destinatarios, &quot;text/html&quot;);
    log.info(&quot;[Recrutamento.beforeTaskSave] tpl_recrutamento_realizada_dia enviado. processo=&quot; + envio.processNumber + &quot;, destinos=&quot; + envio.destinosLog);
}

function enviarNotificacaoInicioColaborador() {
    var envio = montarContextoEnvio();
    if (!envio.ok) return;

    var dataInicio = safeTrim(hAPI.getCardValue(&quot;datainiciotrabalho&quot;));
    if (dataInicio === &quot;&quot;) {
        log.warn(&quot;[Recrutamento.beforeTaskSave] Data de início vazia. Notificação de início não enviada.&quot;);
        return;
    }

    var params = new java.util.HashMap();
    params.put(&quot;WKNumProces&quot;, envio.processNumber);
    params.put(&quot;linkSolicitacao&quot;, envio.processLink);
    params.put(&quot;link&quot;, envio.processLink);
    params.put(&quot;colaboradorNome&quot;, valueOrDefault(hAPI.getCardValue(&quot;nomedocandidato&quot;)));
    params.put(&quot;cargo&quot;, valueOrDefault(hAPI.getCardValue(&quot;funcao&quot;)));
    params.put(&quot;dataInicio&quot;, formatDateBr(dataInicio));
    params.put(&quot;kitUtilizado&quot;, getKitDescricao(hAPI.getCardValue(&quot;itensinicio&quot;)));

    notifier.notify(&quot;admin&quot;, &quot;tpl_recrutamento_realizada&quot;, params, envio.destinatarios, &quot;text/html&quot;);
    log.info(&quot;[Recrutamento.beforeTaskSave] tpl_recrutamento_realizada enviado. processo=&quot; + envio.processNumber + &quot;, destinos=&quot; + envio.destinosLog);
}

function montarContextoEnvio() {
    var destinatarios = new java.util.ArrayList();
    var jaAdicionados = {};

    addEmail(destinatarios, jaAdicionados, &quot;tic@grupoginseng.com.br&quot;);

    var requesterId = safeTrim(hAPI.getCardValue(&quot;requesterId&quot;));
    if (requesterId !== &quot;&quot;) {
        addEmail(destinatarios, jaAdicionados, resolveEmailByColleagueId(requesterId));
    }

    if (destinatarios.isEmpty()) {
        log.warn(&quot;[Recrutamento.beforeTaskSave] Nenhum e-mail válido encontrado para notificação.&quot;);
        return { ok: false };
    }

    var processNumber = safeTrim(getValue(&quot;WKNumProces&quot;));
    var processLink = buildProcessLink(processNumber);

    return {
        ok: true,
        processNumber: processNumber,
        processLink: processLink,
        destinatarios: destinatarios,
        destinosLog: String(destinatarios.toString())
    };
}

function addEmail(destinatarios, jaAdicionados, email) {
    var v = safeTrim(email).toLowerCase();
    if (!isValidEmail(v)) return;
    if (jaAdicionados[v]) return;

    destinatarios.add(v);
    jaAdicionados[v] = true;
}

function resolveEmailByColleagueId(colleagueId) {
    var id = safeTrim(colleagueId);
    if (id === &quot;&quot;) return &quot;&quot;;

    try {
        var cActive = DatasetFactory.createConstraint(&quot;active&quot;, &quot;true&quot;, &quot;true&quot;, ConstraintType.MUST);

        var cId = DatasetFactory.createConstraint(&quot;colleaguePK.colleagueId&quot;, id, id, ConstraintType.MUST);
        var byId = DatasetFactory.getDataset(&quot;colleague&quot;, null, [cId, cActive], null);
        if (byId &amp;&amp; byId.rowsCount &gt; 0) {
            return safeTrim(byId.getValue(0, &quot;mail&quot;));
        }

        var cLogin = DatasetFactory.createConstraint(&quot;login&quot;, id, id, ConstraintType.MUST);
        var byLogin = DatasetFactory.getDataset(&quot;colleague&quot;, null, [cLogin, cActive], null);
        if (byLogin &amp;&amp; byLogin.rowsCount &gt; 0) {
            return safeTrim(byLogin.getValue(0, &quot;mail&quot;));
        }
    } catch (e) {
        log.warn(&quot;[Recrutamento.beforeTaskSave] Falha ao buscar e-mail por colleagueId: &quot; + e);
    }

    return &quot;&quot;;
}

function buildProcessLink(processNumber) {
    var baseUrl = safeTrim(getValue(&quot;WKServerURL&quot;));
    var companyId = safeTrim(getValue(&quot;WKCompany&quot;));

    if (baseUrl === &quot;&quot; || processNumber === &quot;&quot;) return &quot;&quot;;
    if (baseUrl.indexOf(&quot;http://&quot;) !== 0 &amp;&amp; baseUrl.indexOf(&quot;https://&quot;) !== 0) {
        baseUrl = &quot;https://&quot; + baseUrl;
    }
    if (baseUrl.charAt(baseUrl.length - 1) === &quot;/&quot;) {
        baseUrl = baseUrl.substring(0, baseUrl.length - 1);
    }
    if (companyId === &quot;&quot;) companyId = &quot;1&quot;;

    return baseUrl + &quot;/portal/p/&quot; + companyId + &quot;/pageworkflowview?app_ecm_workflowview_detailsProcessInstanceID=&quot; + processNumber;
}

function getMotivoDescricao(motivo) {
    var v = safeTrim(motivo).toLowerCase();
    if (v === &quot;aumento&quot;) return &quot;Aumento de quadro&quot;;
    if (v === &quot;substituicao&quot;) return &quot;Substituição&quot;;
    if (v === &quot;temporario&quot;) return &quot;Temporário&quot;;
    return v === &quot;&quot; ? &quot;Não informado&quot; : v;
}

function getKitDescricao(kit) {
    var v = safeTrim(kit).toLowerCase();
    if (v === &quot;backoffice&quot;) return &quot;Kit Backoffice (Notebook, mouse, teclado e headset)&quot;;
    if (v === &quot;amg&quot;) return &quot;Kit AMG (Notebook, kit mouse e teclado, headset e telefone corporativo)&quot;;
    if (v === &quot;comercial&quot;) return &quot;Kit Comercial (Mobshop e Mobpin)&quot;;
    return v === &quot;&quot; ? &quot;Não informado&quot; : v;
}

function formatDateBr(value) {
    var v = safeTrim(value);
    if (/^\d{4}-\d{2}-\d{2}$/.test(v)) {
        return v.substring(8, 10) + &quot;/&quot; + v.substring(5, 7) + &quot;/&quot; + v.substring(0, 4);
    }
    return v;
}

function valueOrDefault(value) {
    var v = safeTrim(value);
    return v === &quot;&quot; ? &quot;Não informado&quot; : v;
}

function isValidEmail(email) {
    var v = safeTrim(email);
    if (v === &quot;&quot;) return false;
    if (/\s/.test(v)) return false;

    var at = v.indexOf(&quot;@&quot;);
    if (at &lt;= 0 || at !== v.lastIndexOf(&quot;@&quot;)) return false;

    var dot = v.lastIndexOf(&quot;.&quot;);
    return dot &gt; at + 1 &amp;&amp; dot &lt; (v.length - 1);
}

function safeTrim(value) {
    return String(value == null ? &quot;&quot; : value).trim();
}
</eventDescription>
    </WorkflowProcessEvent>
    <WorkflowProcessEvent>
      <workflowProcessEventPK>
        <companyId>1</companyId>
        <eventId>onNotify</eventId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
      </workflowProcessEventPK>
      <eventDescription>function onNotify(subject, receivers, template, params) {&#xd;
&#xd;
    log.info(&quot;===== onNotify GLOBAL ===== Template: &quot; + template);&#xd;
&#xd;
    var validos = new java.util.ArrayList();&#xd;
&#xd;
    for (var i = 0; i &lt; receivers.size(); i++) {&#xd;
&#xd;
        var email = receivers.get(i);&#xd;
&#xd;
        log.info(&quot;Receiver original: [&quot; + email + &quot;]&quot;);&#xd;
&#xd;
        if (email &amp;&amp; email.indexOf(&quot;@&quot;) &gt; 0 &amp;&amp; email.indexOf(&quot;.&quot;) &gt; 0) {&#xd;
            validos.add(email);&#xd;
        } else {&#xd;
            log.warn(&quot;REMOVIDO EMAIL INVALIDO: [&quot; + email + &quot;] TEMPLATE: &quot; + template);&#xd;
        }&#xd;
    }&#xd;
&#xd;
    receivers.clear();&#xd;
&#xd;
    for (var j = 0; j &lt; validos.size(); j++) {&#xd;
        receivers.add(validos.get(j));&#xd;
    }&#xd;
&#xd;
    log.info(&quot;TOTAL FINAL RECEIVERS: &quot; + receivers.size());&#xd;
}</eventDescription>
    </WorkflowProcessEvent>
  </list>
  <list/>
  <list>
    <SwimLane>
      <color>FFFFFF</color>
      <height>715</height>
      <width>1980</width>
      <positionX>11</positionX>
      <positionY>6</positionY>
      <stateName>Recrutamento e Seleção</stateName>
      <type>1</type>
      <parentSequence>0</parentSequence>
      <swimLanePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>1</sequence>
      </swimLanePK>
    </SwimLane>
    <SwimLane>
      <color>82b0b7</color>
      <height>178</height>
      <width>1950</width>
      <positionX>41</positionX>
      <positionY>6</positionY>
      <stateName>Gestor</stateName>
      <type>2</type>
      <parentSequence>1</parentSequence>
      <swimLanePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>2</sequence>
      </swimLanePK>
    </SwimLane>
    <SwimLane>
      <color>d0daae</color>
      <height>178</height>
      <width>1950</width>
      <positionX>41</positionX>
      <positionY>362</positionY>
      <stateName>Gente e cultura</stateName>
      <type>2</type>
      <parentSequence>1</parentSequence>
      <swimLanePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>3</sequence>
      </swimLanePK>
    </SwimLane>
    <SwimLane>
      <color>d6e0d0</color>
      <height>178</height>
      <width>1950</width>
      <positionX>41</positionX>
      <positionY>184</positionY>
      <stateName>Lider direto</stateName>
      <type>2</type>
      <parentSequence>1</parentSequence>
      <swimLanePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>4</sequence>
      </swimLanePK>
    </SwimLane>
    <SwimLane>
      <color>adc9ac</color>
      <height>181</height>
      <width>1950</width>
      <positionX>41</positionX>
      <positionY>540</positionY>
      <stateName>TI</stateName>
      <type>2</type>
      <parentSequence>1</parentSequence>
      <swimLanePK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>1</version>
        <sequence>5</sequence>
      </swimLanePK>
    </SwimLane>
  </list>
  <list/>
  <list/>
  <list>
    <ProcessLinkBend>
      <processLinkBendPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>34</version>
        <linkSequence>5</linkSequence>
        <bendSequence>1</bendSequence>
      </processLinkBendPK>
      <positionX>342</positionX>
      <positionY>100</positionY>
    </ProcessLinkBend>
    <ProcessLinkBend>
      <processLinkBendPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>34</version>
        <linkSequence>5</linkSequence>
        <bendSequence>2</bendSequence>
      </processLinkBendPK>
      <positionX>342</positionX>
      <positionY>248</positionY>
    </ProcessLinkBend>
    <ProcessLinkBend>
      <processLinkBendPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>34</version>
        <linkSequence>7</linkSequence>
        <bendSequence>1</bendSequence>
      </processLinkBendPK>
      <positionX>279</positionX>
      <positionY>448</positionY>
    </ProcessLinkBend>
    <ProcessLinkBend>
      <processLinkBendPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>34</version>
        <linkSequence>110</linkSequence>
        <bendSequence>1</bendSequence>
      </processLinkBendPK>
      <positionX>1090</positionX>
      <positionY>627</positionY>
    </ProcessLinkBend>
    <ProcessLinkBend>
      <processLinkBendPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>34</version>
        <linkSequence>115</linkSequence>
        <bendSequence>1</bendSequence>
      </processLinkBendPK>
      <positionX>1740</positionX>
      <positionY>437</positionY>
    </ProcessLinkBend>
    <ProcessLinkBend>
      <processLinkBendPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>34</version>
        <linkSequence>117</linkSequence>
        <bendSequence>1</bendSequence>
      </processLinkBendPK>
      <positionX>543</positionX>
      <positionY>507</positionY>
    </ProcessLinkBend>
    <ProcessLinkBend>
      <processLinkBendPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <version>34</version>
        <linkSequence>120</linkSequence>
        <bendSequence>1</bendSequence>
      </processLinkBendPK>
      <positionX>1090</positionX>
      <positionY>126</positionY>
    </ProcessLinkBend>
  </list>
  <list/>
  <list/>
  <list>
    <ProcessFormField>
      <processFormFieldPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <fieldId>centroCusto</fieldId>
      </processFormFieldPK>
      <fieldDescription>centroCusto</fieldDescription>
      <slotId>1</slotId>
    </ProcessFormField>
    <ProcessFormField>
      <processFormFieldPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <fieldId>consideracoesCompras</fieldId>
      </processFormFieldPK>
      <fieldDescription>consideracoesCompras</fieldDescription>
      <slotId>2</slotId>
    </ProcessFormField>
    <ProcessFormField>
      <processFormFieldPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <fieldId>dataAbertura</fieldId>
      </processFormFieldPK>
      <fieldDescription>dataAbertura</fieldDescription>
      <slotId>3</slotId>
    </ProcessFormField>
    <ProcessFormField>
      <processFormFieldPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <fieldId>requesterId</fieldId>
      </processFormFieldPK>
      <fieldDescription>requesterId</fieldDescription>
      <slotId>4</slotId>
    </ProcessFormField>
    <ProcessFormField>
      <processFormFieldPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <fieldId>requesterMail</fieldId>
      </processFormFieldPK>
      <fieldDescription>requesterMail</fieldDescription>
      <slotId>5</slotId>
    </ProcessFormField>
    <ProcessFormField>
      <processFormFieldPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <fieldId>requesterName</fieldId>
      </processFormFieldPK>
      <fieldDescription>requesterName</fieldDescription>
      <slotId>6</slotId>
    </ProcessFormField>
    <ProcessFormField>
      <processFormFieldPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <fieldId>userCotacaoGestor</fieldId>
      </processFormFieldPK>
      <fieldDescription>userCotacaoGestor</fieldDescription>
      <slotId>7</slotId>
    </ProcessFormField>
    <ProcessFormField>
      <processFormFieldPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <fieldId>userRealizacaoCompras</fieldId>
      </processFormFieldPK>
      <fieldDescription>userRealizacaoCompras</fieldDescription>
      <slotId>8</slotId>
    </ProcessFormField>
    <ProcessFormField>
      <processFormFieldPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <fieldId>userValidacaoCompras</fieldId>
      </processFormFieldPK>
      <fieldDescription>userValidacaoCompras</fieldDescription>
      <slotId>9</slotId>
    </ProcessFormField>
    <ProcessFormField>
      <processFormFieldPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <fieldId>userValidacaoGestor</fieldId>
      </processFormFieldPK>
      <fieldDescription>userValidacaoGestor</fieldDescription>
      <slotId>10</slotId>
    </ProcessFormField>
    <ProcessFormField>
      <processFormFieldPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <fieldId>userValidacaoItens</fieldId>
      </processFormFieldPK>
      <fieldDescription>userValidacaoItens</fieldDescription>
      <slotId>11</slotId>
    </ProcessFormField>
    <ProcessFormField>
      <processFormFieldPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <fieldId>validacaoItens</fieldId>
      </processFormFieldPK>
      <fieldDescription>validacaoItens</fieldDescription>
      <slotId>12</slotId>
    </ProcessFormField>
    <ProcessFormField>
      <processFormFieldPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <fieldId>valorTotalsemformat</fieldId>
      </processFormFieldPK>
      <fieldDescription>valorTotalsemformat</fieldDescription>
      <slotId>13</slotId>
    </ProcessFormField>
    <ProcessFormField>
      <processFormFieldPK>
        <companyId>1</companyId>
        <processId>Recrutamento e seleção</processId>
        <fieldId>WKNumProces</fieldId>
      </processFormFieldPK>
      <fieldDescription>WKNumProces</fieldDescription>
      <slotId>14</slotId>
    </ProcessFormField>
  </list>
  <list/>
  <list/>
  <list>
    <ProcessAppConfiguration>
      <id>0</id>
      <tenantId>0</tenantId>
      <processId>Recrutamento e seleção</processId>
      <processVersion>34</processVersion>
      <stateSequence>4</stateSequence>
      <appKey>approval</appKey>
      <appField>title</appField>
      <description>Solicitação de compra</description>
    </ProcessAppConfiguration>
    <ProcessAppConfiguration>
      <id>0</id>
      <tenantId>0</tenantId>
      <processId>Recrutamento e seleção</processId>
      <processVersion>34</processVersion>
      <stateSequence>4</stateSequence>
      <appKey>approval</appKey>
      <appField>highlight</appField>
      <description>Centro de Custo - Aprovar solicitação?</description>
    </ProcessAppConfiguration>
    <ProcessAppConfiguration>
      <id>0</id>
      <tenantId>0</tenantId>
      <processId>Recrutamento e seleção</processId>
      <processVersion>34</processVersion>
      <stateSequence>4</stateSequence>
      <appKey>approval</appKey>
      <appField>approve</appField>
      <description>6</description>
    </ProcessAppConfiguration>
    <ProcessAppConfiguration>
      <id>0</id>
      <tenantId>0</tenantId>
      <processId>Recrutamento e seleção</processId>
      <processVersion>34</processVersion>
      <stateSequence>4</stateSequence>
      <appKey>approval</appKey>
      <appField>reject</appField>
      <description>39</description>
    </ProcessAppConfiguration>
    <ProcessAppConfiguration>
      <id>0</id>
      <tenantId>0</tenantId>
      <processId>Recrutamento e seleção</processId>
      <processVersion>34</processVersion>
      <stateSequence>6</stateSequence>
      <appKey>approval</appKey>
      <appField>title</appField>
      <description>Solicitação de compra</description>
    </ProcessAppConfiguration>
    <ProcessAppConfiguration>
      <id>0</id>
      <tenantId>0</tenantId>
      <processId>Recrutamento e seleção</processId>
      <processVersion>34</processVersion>
      <stateSequence>6</stateSequence>
      <appKey>approval</appKey>
      <appField>highlight</appField>
      <description>Compras - Aprovar solicitação?</description>
    </ProcessAppConfiguration>
    <ProcessAppConfiguration>
      <id>0</id>
      <tenantId>0</tenantId>
      <processId>Recrutamento e seleção</processId>
      <processVersion>34</processVersion>
      <stateSequence>6</stateSequence>
      <appKey>approval</appKey>
      <appField>reject</appField>
      <description>55</description>
    </ProcessAppConfiguration>
  </list>
  <list/>
  <list/>
</list>