<?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:di="http://www.omg.org/spec/DD/20100524/DI"
                  id="Definitions_10"
                  targetNamespace="http://forven.com.br/bpmn">

  <bpmn:collaboration id="Collaboration_10">
    <bpmn:participant id="Participant_10" name="Recebimento de NF-e" processRef="Process_10" />
  </bpmn:collaboration>

  <bpmn:process id="Process_10" isExecutable="false">

    <bpmn:laneSet id="LaneSet_10">
      <bpmn:lane id="Lane_Geral" name="Recebimento">
        <bpmn:flowNodeRef>StartEvent_1</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_ImportaNFe</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_NotaGerenciarNFe</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gateway_TipoFluxo</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_Comercio" name="Fluxo Comércio">
        <bpmn:flowNodeRef>Task_VinculaItem</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_EstoqueAutomatico</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_Industria" name="Fluxo Indústria">
        <bpmn:flowNodeRef>Task_SinalizaRecebimento</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_EscolheDeposito</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_LancaEstoque</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_Final" name="Etiquetas">
        <bpmn:flowNodeRef>Task_ImprimirEtiquetas</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>EndEvent_1</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>

    <bpmn:startEvent id="StartEvent_1" name="Início">
      <bpmn:outgoing>Flow_S1</bpmn:outgoing>
    </bpmn:startEvent>

    <bpmn:task id="Task_ImportaNFe" name="Importa a NF-e&#10;XML ou chave de acesso">
      <bpmn:incoming>Flow_S1</bpmn:incoming>
      <bpmn:outgoing>Flow_1</bpmn:outgoing>
    </bpmn:task>

    <bpmn:task id="Task_NotaGerenciarNFe" name="Nota aparece em Gerenciar NF-e&#10;status Pendente">
      <bpmn:incoming>Flow_1</bpmn:incoming>
      <bpmn:outgoing>Flow_2</bpmn:outgoing>
    </bpmn:task>

    <bpmn:exclusiveGateway id="Gateway_TipoFluxo" name="Comércio ou Indústria?">
      <bpmn:incoming>Flow_2</bpmn:incoming>
      <bpmn:outgoing>Flow_3</bpmn:outgoing>
      <bpmn:outgoing>Flow_4</bpmn:outgoing>
    </bpmn:exclusiveGateway>

    <bpmn:task id="Task_VinculaItem" name="Vincula cada item a um produto&#10;ou cadastra na hora">
      <bpmn:incoming>Flow_3</bpmn:incoming>
      <bpmn:outgoing>Flow_5</bpmn:outgoing>
    </bpmn:task>

    <bpmn:task id="Task_EstoqueAutomatico" name="Estoque entra automaticamente&#10;no instante do vínculo">
      <bpmn:incoming>Flow_5</bpmn:incoming>
      <bpmn:outgoing>Flow_8</bpmn:outgoing>
    </bpmn:task>

    <bpmn:task id="Task_SinalizaRecebimento" name="Sinaliza o Recebimento&#10;confere a quantidade física do item">
      <bpmn:incoming>Flow_4</bpmn:incoming>
      <bpmn:outgoing>Flow_6</bpmn:outgoing>
    </bpmn:task>

    <bpmn:task id="Task_EscolheDeposito" name="Escolhe Depósito, Corredor,&#10;Coluna, Prateleira e Lote">
      <bpmn:incoming>Flow_6</bpmn:incoming>
      <bpmn:outgoing>Flow_7</bpmn:outgoing>
    </bpmn:task>

    <bpmn:task id="Task_LancaEstoque" name="Lança no Estoque">
      <bpmn:incoming>Flow_7</bpmn:incoming>
      <bpmn:outgoing>Flow_9</bpmn:outgoing>
    </bpmn:task>

    <bpmn:task id="Task_ImprimirEtiquetas" name="Imprimir Etiquetas&#10;libera após o estoque lançado">
      <bpmn:incoming>Flow_8</bpmn:incoming>
      <bpmn:incoming>Flow_9</bpmn:incoming>
      <bpmn:outgoing>Flow_10</bpmn:outgoing>
    </bpmn:task>

    <bpmn:endEvent id="EndEvent_1" name="Fim">
      <bpmn:incoming>Flow_10</bpmn:incoming>
    </bpmn:endEvent>

    <bpmn:sequenceFlow id="Flow_S1" sourceRef="StartEvent_1" targetRef="Task_ImportaNFe" />
    <bpmn:sequenceFlow id="Flow_1" sourceRef="Task_ImportaNFe" targetRef="Task_NotaGerenciarNFe" />
    <bpmn:sequenceFlow id="Flow_2" sourceRef="Task_NotaGerenciarNFe" targetRef="Gateway_TipoFluxo" />
    <bpmn:sequenceFlow id="Flow_3" name="Comércio" sourceRef="Gateway_TipoFluxo" targetRef="Task_VinculaItem" />
    <bpmn:sequenceFlow id="Flow_4" name="Indústria" sourceRef="Gateway_TipoFluxo" targetRef="Task_SinalizaRecebimento" />
    <bpmn:sequenceFlow id="Flow_5" sourceRef="Task_VinculaItem" targetRef="Task_EstoqueAutomatico" />
    <bpmn:sequenceFlow id="Flow_6" sourceRef="Task_SinalizaRecebimento" targetRef="Task_EscolheDeposito" />
    <bpmn:sequenceFlow id="Flow_7" sourceRef="Task_EscolheDeposito" targetRef="Task_LancaEstoque" />
    <bpmn:sequenceFlow id="Flow_8" sourceRef="Task_EstoqueAutomatico" targetRef="Task_ImprimirEtiquetas" />
    <bpmn:sequenceFlow id="Flow_9" sourceRef="Task_LancaEstoque" targetRef="Task_ImprimirEtiquetas" />
    <bpmn:sequenceFlow id="Flow_10" sourceRef="Task_ImprimirEtiquetas" targetRef="EndEvent_1" />

  </bpmn:process>

  <bpmndi:BPMNDiagram id="BPMNDiagram_10">
    <bpmndi:BPMNPlane id="BPMNPlane_10" bpmnElement="Collaboration_10">

      <bpmndi:BPMNShape id="Participant_10_di" bpmnElement="Participant_10" isHorizontal="true">
        <dc:Bounds x="0" y="0" width="830" height="1350" />
      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Lane_Geral_di" bpmnElement="Lane_Geral" isHorizontal="true">
        <dc:Bounds x="40" y="0" width="750" height="500" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_Comercio_di" bpmnElement="Lane_Comercio" isHorizontal="true">
        <dc:Bounds x="40" y="500" width="750" height="300" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_Industria_di" bpmnElement="Lane_Industria" isHorizontal="true">
        <dc:Bounds x="40" y="800" width="750" height="350" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_Final_di" bpmnElement="Lane_Final" isHorizontal="true">
        <dc:Bounds x="40" y="1150" width="750" height="200" />
      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartEvent_1">
        <dc:Bounds x="392" y="20" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_ImportaNFe_di" bpmnElement="Task_ImportaNFe">
        <dc:Bounds x="300" y="70" width="220" height="70" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_NotaGerenciarNFe_di" bpmnElement="Task_NotaGerenciarNFe">
        <dc:Bounds x="300" y="220" width="220" height="70" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_TipoFluxo_di" bpmnElement="Gateway_TipoFluxo" isMarkerVisible="true">
        <dc:Bounds x="385" y="370" width="50" height="50" />
      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Task_VinculaItem_di" bpmnElement="Task_VinculaItem">
        <dc:Bounds x="140" y="540" width="220" height="70" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_EstoqueAutomatico_di" bpmnElement="Task_EstoqueAutomatico">
        <dc:Bounds x="140" y="680" width="220" height="70" />
      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Task_SinalizaRecebimento_di" bpmnElement="Task_SinalizaRecebimento">
        <dc:Bounds x="490" y="830" width="220" height="70" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_EscolheDeposito_di" bpmnElement="Task_EscolheDeposito">
        <dc:Bounds x="490" y="950" width="220" height="70" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_LancaEstoque_di" bpmnElement="Task_LancaEstoque">
        <dc:Bounds x="510" y="1060" width="180" height="60" />
      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Task_ImprimirEtiquetas_di" bpmnElement="Task_ImprimirEtiquetas">
        <dc:Bounds x="300" y="1190" width="220" height="70" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="EndEvent_1_di" bpmnElement="EndEvent_1">
        <dc:Bounds x="392" y="1290" width="36" height="36" />
      </bpmndi:BPMNShape>

      <bpmndi:BPMNEdge id="Flow_S1_di" bpmnElement="Flow_S1">
        <di:waypoint x="410" y="56" />
        <di:waypoint x="410" y="70" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1_di" bpmnElement="Flow_1">
        <di:waypoint x="410" y="140" />
        <di:waypoint x="410" y="220" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_2_di" bpmnElement="Flow_2">
        <di:waypoint x="410" y="290" />
        <di:waypoint x="410" y="370" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_3_di" bpmnElement="Flow_3">
        <di:waypoint x="385" y="395" />
        <di:waypoint x="250" y="395" />
        <di:waypoint x="250" y="540" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="280" y="460" width="60" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_4_di" bpmnElement="Flow_4">
        <di:waypoint x="435" y="395" />
        <di:waypoint x="600" y="395" />
        <di:waypoint x="600" y="830" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="500" y="600" width="60" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_5_di" bpmnElement="Flow_5">
        <di:waypoint x="250" y="610" />
        <di:waypoint x="250" y="680" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_6_di" bpmnElement="Flow_6">
        <di:waypoint x="600" y="900" />
        <di:waypoint x="600" y="950" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_7_di" bpmnElement="Flow_7">
        <di:waypoint x="600" y="1020" />
        <di:waypoint x="600" y="1060" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_8_di" bpmnElement="Flow_8">
        <di:waypoint x="250" y="750" />
        <di:waypoint x="250" y="1170" />
        <di:waypoint x="380" y="1170" />
        <di:waypoint x="380" y="1190" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_9_di" bpmnElement="Flow_9">
        <di:waypoint x="600" y="1120" />
        <di:waypoint x="600" y="1170" />
        <di:waypoint x="440" y="1170" />
        <di:waypoint x="440" y="1190" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_10_di" bpmnElement="Flow_10">
        <di:waypoint x="410" y="1260" />
        <di:waypoint x="410" y="1290" />
      </bpmndi:BPMNEdge>

    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>

</bpmn:definitions>
