1568 lines
61 KiB
XML
1568 lines
61 KiB
XML
<list>
|
|
<ProcessDefinition>
|
|
<processDefinitionPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
</processDefinitionPK>
|
|
<processDescription>Solicitação de compra - Ginseng</processDescription>
|
|
<instruction>Este flow permite abertura de solicitação de compras automatizadas, informando qual item será comprado e direcionado para as aprovações corretas.</instruction>
|
|
<active>true</active>
|
|
<publicProcess>false</publicProcess>
|
|
<volumeId>Default</volumeId>
|
|
<categoryId>Compras - Testes</categoryId>
|
|
<managerEngineAllocationId></managerEngineAllocationId>
|
|
<managerEngineAllocationConfiguration><AssignmentController><Group>TIC</Group></AssignmentController></managerEngineAllocationConfiguration>
|
|
<snapshotFrequency>0</snapshotFrequency>
|
|
<baseDay>0</baseDay>
|
|
<baseMonth>0</baseMonth>
|
|
<periodId>Default</periodId>
|
|
<uniqueCardVersion>false</uniqueCardVersion>
|
|
<keyWord></keyWord>
|
|
<complementsLevel>1</complementsLevel>
|
|
<notifyRequisitionerComplements>true</notifyRequisitionerComplements>
|
|
<notifyManagerComplements>false</notifyManagerComplements>
|
|
<deadlineTime>0</deadlineTime>
|
|
<warningDeadlineTime>0</warningDeadlineTime>
|
|
<notifyAuthorityComplements>true</notifyAuthorityComplements>
|
|
</ProcessDefinition>
|
|
<ProcessDefinitionVersion>
|
|
<processDefinitionVersionPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compra - Ginseng</processId>
|
|
<version>89</version>
|
|
</processDefinitionVersionPK>
|
|
<versionDescription></versionDescription>
|
|
<formId>9305</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>false</mobileReady>
|
|
</ProcessDefinitionVersion>
|
|
<list>
|
|
<ProcessState>
|
|
<processStatePK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>1</sequence>
|
|
</processStatePK>
|
|
<stateName>Solicitar compra</stateName>
|
|
<stateDescription>Solicitar compra</stateDescription>
|
|
<instruction>Inicio da atividade</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>30</positionY>
|
|
<forecastedEffortType>0</forecastedEffortType>
|
|
<forecastedEffort>0</forecastedEffort>
|
|
<notifyManagerFollowUp>false</notifyManagerFollowUp>
|
|
<notifyManagerDelay>false</notifyManagerDelay>
|
|
<allowanceManagerTime>0</allowanceManagerTime>
|
|
<frequenceManagerTime>0</frequenceManagerTime>
|
|
<inhibitTransfer>false</inhibitTransfer>
|
|
<periodId>Default</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>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>18</sequence>
|
|
</processStatePK>
|
|
<stateName>Receber o produto/serviço</stateName>
|
|
<stateDescription>Receber o produto/serviço</stateDescription>
|
|
<instruction></instruction>
|
|
<deadlineTime>604800</deadlineTime>
|
|
<deadlineFieldName></deadlineFieldName>
|
|
<joint>false</joint>
|
|
<agreementPercentage>0</agreementPercentage>
|
|
<engineAllocationId>Executor Atividade</engineAllocationId>
|
|
<engineAllocationConfiguration><AssignmentController><BaseActivity>1</BaseActivity><Returns>Last</Returns></AssignmentController></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>1440</positionX>
|
|
<positionY>13</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>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>24</sequence>
|
|
</processStatePK>
|
|
<stateName>Verificar problema</stateName>
|
|
<stateDescription>Verificar problema</stateDescription>
|
|
<instruction></instruction>
|
|
<deadlineTime>172800</deadlineTime>
|
|
<deadlineFieldName></deadlineFieldName>
|
|
<joint>false</joint>
|
|
<agreementPercentage>0</agreementPercentage>
|
|
<engineAllocationId>Pool Grupo</engineAllocationId>
|
|
<engineAllocationConfiguration><AssignmentController><Group>ComprasIndiretos</Group></AssignmentController></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>1560</positionX>
|
|
<positionY>330</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>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>73</sequence>
|
|
</processStatePK>
|
|
<stateName>Tratar erro</stateName>
|
|
<stateDescription>Tratar erro</stateDescription>
|
|
<instruction></instruction>
|
|
<deadlineTime>0</deadlineTime>
|
|
<deadlineFieldName></deadlineFieldName>
|
|
<joint>false</joint>
|
|
<agreementPercentage>0</agreementPercentage>
|
|
<engineAllocationId>Pool Grupo</engineAllocationId>
|
|
<engineAllocationConfiguration><AssignmentController><Group>TIC</Group></AssignmentController></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>970</positionX>
|
|
<positionY>640</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>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>82</sequence>
|
|
</processStatePK>
|
|
<stateName>Enviar SC</stateName>
|
|
<stateDescription>Enviar SC</stateDescription>
|
|
<instruction></instruction>
|
|
<deadlineTime>0</deadlineTime>
|
|
<deadlineFieldName></deadlineFieldName>
|
|
<joint>false</joint>
|
|
<agreementPercentage>0</agreementPercentage>
|
|
<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>false</notifyRequisitionerFollowUp>
|
|
<automatic>false</automatic>
|
|
<positionX>560</positionX>
|
|
<positionY>632</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>82</bpmnType>
|
|
<signalId>0</signalId>
|
|
<counterSign>false</counterSign>
|
|
<openInstances>0</openInstances>
|
|
<noticeExpirationAuthorityTime>0</noticeExpirationAuthorityTime>
|
|
<noticeExpirationRequisitionerTime>0</noticeExpirationRequisitionerTime>
|
|
<noticeExpirationManagerTime>0</noticeExpirationManagerTime>
|
|
<destinationStates/>
|
|
<digitalSignature>false</digitalSignature>
|
|
<executionType>1</executionType>
|
|
</ProcessState>
|
|
<ProcessState>
|
|
<processStatePK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>114</sequence>
|
|
</processStatePK>
|
|
<stateName>Integrador Cotação</stateName>
|
|
<stateDescription>Integrador Cotação</stateDescription>
|
|
<instruction></instruction>
|
|
<deadlineTime>0</deadlineTime>
|
|
<deadlineFieldName></deadlineFieldName>
|
|
<joint>false</joint>
|
|
<agreementPercentage>0</agreementPercentage>
|
|
<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>false</notifyRequisitionerFollowUp>
|
|
<automatic>false</automatic>
|
|
<positionX>560</positionX>
|
|
<positionY>225</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>82</bpmnType>
|
|
<signalId>0</signalId>
|
|
<counterSign>false</counterSign>
|
|
<openInstances>0</openInstances>
|
|
<noticeExpirationAuthorityTime>0</noticeExpirationAuthorityTime>
|
|
<noticeExpirationRequisitionerTime>0</noticeExpirationRequisitionerTime>
|
|
<noticeExpirationManagerTime>0</noticeExpirationManagerTime>
|
|
<destinationStates/>
|
|
<digitalSignature>false</digitalSignature>
|
|
<executionType>1</executionType>
|
|
</ProcessState>
|
|
<ProcessState>
|
|
<processStatePK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>118</sequence>
|
|
</processStatePK>
|
|
<stateName>Cotação fora do prazo</stateName>
|
|
<stateDescription>Cotação fora do prazo</stateDescription>
|
|
<instruction></instruction>
|
|
<deadlineTime>0</deadlineTime>
|
|
<deadlineFieldName></deadlineFieldName>
|
|
<joint>false</joint>
|
|
<agreementPercentage>0</agreementPercentage>
|
|
<engineAllocationId>Pool Grupo</engineAllocationId>
|
|
<engineAllocationConfiguration><AssignmentController><Group>ComprasIndiretos</Group></AssignmentController></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>640</positionX>
|
|
<positionY>327</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>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>121</sequence>
|
|
</processStatePK>
|
|
<stateName>Analisar necessidade de compra</stateName>
|
|
<stateDescription>Analisar necessidade de compra</stateDescription>
|
|
<instruction></instruction>
|
|
<deadlineTime>0</deadlineTime>
|
|
<deadlineFieldName></deadlineFieldName>
|
|
<joint>false</joint>
|
|
<agreementPercentage>0</agreementPercentage>
|
|
<engineAllocationId>Campo Formulário</engineAllocationId>
|
|
<engineAllocationConfiguration><AssignmentController><FormField>gestor_cc</FormField></AssignmentController></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>460</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>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>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>85</sequence>
|
|
</processStatePK>
|
|
<stateName>Intermediário</stateName>
|
|
<stateDescription>Intermediário</stateDescription>
|
|
<instruction>Evento intermediário 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>1</allowanceAuthorityTime>
|
|
<frequenceAuthorityTime>1</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>630</positionX>
|
|
<positionY>662</positionY>
|
|
<forecastedEffortType>0</forecastedEffortType>
|
|
<forecastedEffort>0</forecastedEffort>
|
|
<notifyManagerFollowUp>false</notifyManagerFollowUp>
|
|
<notifyManagerDelay>false</notifyManagerDelay>
|
|
<frequenceManagerTime>0</frequenceManagerTime>
|
|
<inhibitTransfer>false</inhibitTransfer>
|
|
<periodId></periodId>
|
|
<stateType>0</stateType>
|
|
<bpmnType>43</bpmnType>
|
|
<signalId>0</signalId>
|
|
<counterSign>false</counterSign>
|
|
<openInstances>0</openInstances>
|
|
<destinationStates/>
|
|
<digitalSignature>false</digitalSignature>
|
|
<parentSequence>82</parentSequence>
|
|
</ProcessState>
|
|
<ProcessState>
|
|
<processStatePK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>117</sequence>
|
|
</processStatePK>
|
|
<stateName>Intermediário</stateName>
|
|
<stateDescription>Intermediário</stateDescription>
|
|
<instruction>Evento intermediário 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>1</allowanceAuthorityTime>
|
|
<frequenceAuthorityTime>1</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>630</positionX>
|
|
<positionY>265</positionY>
|
|
<forecastedEffortType>0</forecastedEffortType>
|
|
<forecastedEffort>0</forecastedEffort>
|
|
<notifyManagerFollowUp>false</notifyManagerFollowUp>
|
|
<notifyManagerDelay>false</notifyManagerDelay>
|
|
<frequenceManagerTime>0</frequenceManagerTime>
|
|
<inhibitTransfer>false</inhibitTransfer>
|
|
<periodId></periodId>
|
|
<stateType>0</stateType>
|
|
<bpmnType>43</bpmnType>
|
|
<signalId>0</signalId>
|
|
<counterSign>false</counterSign>
|
|
<openInstances>0</openInstances>
|
|
<destinationStates/>
|
|
<digitalSignature>false</digitalSignature>
|
|
<parentSequence>114</parentSequence>
|
|
</ProcessState>
|
|
<ProcessState>
|
|
<processStatePK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>46</sequence>
|
|
</processStatePK>
|
|
<stateName>Validar compra</stateName>
|
|
<stateDescription>Validar compra</stateDescription>
|
|
<joint>false</joint>
|
|
<initialState>false</initialState>
|
|
<transferAttachments>false</transferAttachments>
|
|
<subProcessId></subProcessId>
|
|
<formFolder>0</formFolder>
|
|
<automatic>true</automatic>
|
|
<positionX>1580</positionX>
|
|
<positionY>5</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>Solicitação de compras </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>360</positionX>
|
|
<positionY>126</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>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>52</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>1670</positionX>
|
|
<positionY>41</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>Solicitação de compras </processId>
|
|
<expressionOrder>1</expressionOrder>
|
|
<version>89</version>
|
|
<sequence>46</sequence>
|
|
</conditionProcessStatePK>
|
|
<condition>hAPI.getCardValue("validacaoItens") == "entregue"</condition>
|
|
<destinationSequenceId>52</destinationSequenceId>
|
|
<conditionType>0</conditionType>
|
|
</ConditionProcessState>
|
|
<ConditionProcessState>
|
|
<conditionProcessStatePK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<expressionOrder>2</expressionOrder>
|
|
<version>89</version>
|
|
<sequence>46</sequence>
|
|
</conditionProcessStatePK>
|
|
<condition>true</condition>
|
|
<destinationSequenceId>24</destinationSequenceId>
|
|
<conditionType>0</conditionType>
|
|
</ConditionProcessState>
|
|
</list>
|
|
<list>
|
|
<ProcessLink>
|
|
<processLinkPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<linkSequence>26</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>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<linkSequence>47</linkSequence>
|
|
</processLinkPK>
|
|
<actionLabel></actionLabel>
|
|
<returnPermited>false</returnPermited>
|
|
<initialStateSequence>18</initialStateSequence>
|
|
<finalStateSequence>46</finalStateSequence>
|
|
<returnLabel></returnLabel>
|
|
<name></name>
|
|
<automaticLink>false</automaticLink>
|
|
<defaultLink>false</defaultLink>
|
|
<type>0</type>
|
|
</ProcessLink>
|
|
<ProcessLink>
|
|
<processLinkPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<linkSequence>48</linkSequence>
|
|
</processLinkPK>
|
|
<actionLabel></actionLabel>
|
|
<returnPermited>false</returnPermited>
|
|
<initialStateSequence>46</initialStateSequence>
|
|
<finalStateSequence>24</finalStateSequence>
|
|
<returnLabel></returnLabel>
|
|
<name>Reprovar</name>
|
|
<automaticLink>false</automaticLink>
|
|
<defaultLink>false</defaultLink>
|
|
<type>0</type>
|
|
</ProcessLink>
|
|
<ProcessLink>
|
|
<processLinkPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<linkSequence>78</linkSequence>
|
|
</processLinkPK>
|
|
<actionLabel></actionLabel>
|
|
<returnPermited>false</returnPermited>
|
|
<initialStateSequence>46</initialStateSequence>
|
|
<finalStateSequence>52</finalStateSequence>
|
|
<returnLabel></returnLabel>
|
|
<name></name>
|
|
<automaticLink>false</automaticLink>
|
|
<defaultLink>false</defaultLink>
|
|
<type>0</type>
|
|
</ProcessLink>
|
|
<ProcessLink>
|
|
<processLinkPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<linkSequence>86</linkSequence>
|
|
</processLinkPK>
|
|
<actionLabel></actionLabel>
|
|
<returnPermited>false</returnPermited>
|
|
<initialStateSequence>85</initialStateSequence>
|
|
<finalStateSequence>73</finalStateSequence>
|
|
<returnLabel></returnLabel>
|
|
<name></name>
|
|
<automaticLink>false</automaticLink>
|
|
<defaultLink>false</defaultLink>
|
|
<type>0</type>
|
|
</ProcessLink>
|
|
<ProcessLink>
|
|
<processLinkPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<linkSequence>88</linkSequence>
|
|
</processLinkPK>
|
|
<actionLabel></actionLabel>
|
|
<returnPermited>false</returnPermited>
|
|
<initialStateSequence>73</initialStateSequence>
|
|
<finalStateSequence>82</finalStateSequence>
|
|
<returnLabel></returnLabel>
|
|
<name></name>
|
|
<automaticLink>false</automaticLink>
|
|
<defaultLink>false</defaultLink>
|
|
<type>0</type>
|
|
</ProcessLink>
|
|
<ProcessLink>
|
|
<processLinkPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<linkSequence>97</linkSequence>
|
|
</processLinkPK>
|
|
<actionLabel></actionLabel>
|
|
<returnPermited>false</returnPermited>
|
|
<finalStateSequence>73</finalStateSequence>
|
|
<returnLabel></returnLabel>
|
|
<name></name>
|
|
<automaticLink>false</automaticLink>
|
|
<defaultLink>false</defaultLink>
|
|
<type>0</type>
|
|
</ProcessLink>
|
|
<ProcessLink>
|
|
<processLinkPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<linkSequence>119</linkSequence>
|
|
</processLinkPK>
|
|
<actionLabel></actionLabel>
|
|
<returnPermited>false</returnPermited>
|
|
<initialStateSequence>117</initialStateSequence>
|
|
<finalStateSequence>118</finalStateSequence>
|
|
<returnLabel></returnLabel>
|
|
<name></name>
|
|
<automaticLink>false</automaticLink>
|
|
<defaultLink>false</defaultLink>
|
|
<type>0</type>
|
|
</ProcessLink>
|
|
<ProcessLink>
|
|
<processLinkPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<linkSequence>120</linkSequence>
|
|
</processLinkPK>
|
|
<actionLabel></actionLabel>
|
|
<returnPermited>false</returnPermited>
|
|
<initialStateSequence>118</initialStateSequence>
|
|
<finalStateSequence>114</finalStateSequence>
|
|
<returnLabel></returnLabel>
|
|
<name></name>
|
|
<automaticLink>false</automaticLink>
|
|
<defaultLink>false</defaultLink>
|
|
<type>0</type>
|
|
</ProcessLink>
|
|
<ProcessLink>
|
|
<processLinkPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<linkSequence>124</linkSequence>
|
|
</processLinkPK>
|
|
<actionLabel>Rejeitar</actionLabel>
|
|
<returnPermited>false</returnPermited>
|
|
<initialStateSequence>121</initialStateSequence>
|
|
<finalStateSequence>39</finalStateSequence>
|
|
<returnLabel></returnLabel>
|
|
<name></name>
|
|
<automaticLink>false</automaticLink>
|
|
<defaultLink>false</defaultLink>
|
|
<type>0</type>
|
|
</ProcessLink>
|
|
<ProcessLink>
|
|
<processLinkPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<linkSequence>125</linkSequence>
|
|
</processLinkPK>
|
|
<actionLabel></actionLabel>
|
|
<returnPermited>false</returnPermited>
|
|
<initialStateSequence>1</initialStateSequence>
|
|
<finalStateSequence>121</finalStateSequence>
|
|
<returnLabel></returnLabel>
|
|
<name></name>
|
|
<automaticLink>false</automaticLink>
|
|
<defaultLink>false</defaultLink>
|
|
<type>0</type>
|
|
</ProcessLink>
|
|
<ProcessLink>
|
|
<processLinkPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<linkSequence>126</linkSequence>
|
|
</processLinkPK>
|
|
<actionLabel>Aprovar</actionLabel>
|
|
<returnPermited>false</returnPermited>
|
|
<initialStateSequence>121</initialStateSequence>
|
|
<finalStateSequence>82</finalStateSequence>
|
|
<returnLabel></returnLabel>
|
|
<name></name>
|
|
<automaticLink>false</automaticLink>
|
|
<defaultLink>false</defaultLink>
|
|
<type>0</type>
|
|
</ProcessLink>
|
|
<ProcessLink>
|
|
<processLinkPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<linkSequence>127</linkSequence>
|
|
</processLinkPK>
|
|
<actionLabel></actionLabel>
|
|
<returnPermited>false</returnPermited>
|
|
<initialStateSequence>82</initialStateSequence>
|
|
<finalStateSequence>114</finalStateSequence>
|
|
<returnLabel></returnLabel>
|
|
<name></name>
|
|
<automaticLink>false</automaticLink>
|
|
<defaultLink>false</defaultLink>
|
|
<type>0</type>
|
|
</ProcessLink>
|
|
<ProcessLink>
|
|
<processLinkPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<linkSequence>161</linkSequence>
|
|
</processLinkPK>
|
|
<actionLabel>Ajustar Solicitação</actionLabel>
|
|
<returnPermited>false</returnPermited>
|
|
<initialStateSequence>121</initialStateSequence>
|
|
<finalStateSequence>1</finalStateSequence>
|
|
<returnLabel></returnLabel>
|
|
<name></name>
|
|
<automaticLink>false</automaticLink>
|
|
<defaultLink>false</defaultLink>
|
|
<type>0</type>
|
|
</ProcessLink>
|
|
<ProcessLink>
|
|
<processLinkPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<linkSequence>162</linkSequence>
|
|
</processLinkPK>
|
|
<actionLabel></actionLabel>
|
|
<returnPermited>false</returnPermited>
|
|
<initialStateSequence>114</initialStateSequence>
|
|
<finalStateSequence>18</finalStateSequence>
|
|
<returnLabel></returnLabel>
|
|
<name></name>
|
|
<automaticLink>false</automaticLink>
|
|
<defaultLink>false</defaultLink>
|
|
<type>0</type>
|
|
</ProcessLink>
|
|
</list>
|
|
<list/>
|
|
<list>
|
|
<WorkflowProcessEvent>
|
|
<workflowProcessEventPK>
|
|
<companyId>1</companyId>
|
|
<eventId>servicetask82</eventId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
</workflowProcessEventPK>
|
|
<eventDescription>function toProtheusDate(d) {
|
|
if (!d) return "";
|
|
if (d.indexOf("/") > -1) {
|
|
var parts = d.split("/");
|
|
return parts[2] + parts[1] + parts[0]; // dd/MM/yyyy -> yyyyMMdd
|
|
}
|
|
if (d.indexOf("-") > -1) {
|
|
return d.replace(/-/g, ""); // yyyy-MM-dd -> yyyyMMdd
|
|
}
|
|
return d; // já está no formato certo
|
|
}
|
|

|
|
function hojeProtheus() {
|
|
var d = new Date();
|
|
var yyyy = d.getFullYear();
|
|
var mm = d.getMonth() + 1;
|
|
var dd = d.getDate();
|
|
if (mm < 10) mm = "0" + mm;
|
|
if (dd < 10) dd = "0" + dd;
|
|
return "" + yyyy + mm + dd; // yyyyMMdd
|
|
}
|
|

|
|
function servicetask82(attempt, message) {
|
|
log.info("🚀 Iniciando servicetask82");
|
|

|
|
var qtdItens = hAPI.getChildrenIndexes("tbItens");
|
|
log.info("📦 Total de itens na tabela: " + qtdItens.length);
|
|

|
|
var itens = [];
|
|
for (var i = 0; i < qtdItens.length; i++) {
|
|
var index = qtdItens[i];
|
|
var item = {
|
|
"C1_PRODUTO": String(hAPI.getCardValue("Codproduto___" + index)),
|
|
"C1_QUANT": Number(hAPI.getCardValue("qtd___" + index)),
|
|
"C1_DATPRF": toProtheusDate(String(hAPI.getCardValue("dataNec___" + index)))
|
|
};
|
|
itens.push(item);
|
|
log.info("📌 Item adicionado: " + JSON.stringify(item));
|
|
}
|
|

|
|
var filial = String(
|
|
hAPI.getCardValue("filialprotheus") ||
|
|
hAPI.getCardValue("filialProtheus") ||
|
|
hAPI.getCardValue("codigocentroCusto") ||
|
|
""
|
|
).trim();
|
|
if (!filial) {
|
|
throw "Campo PROTHEUS da filial não preenchido no formulário (filialprotheus).";
|
|
}
|
|
log.info("🏬 Filial PROTHEUS enviada no C1_FILENT: " + filial);
|
|

|
|
var payload = {
|
|
"C1_SOLICIT": String(hAPI.getCardValue("usuarioSolicitante")),
|
|
"C1_EMISSAO": hojeProtheus(),
|
|
"C1_FILENT": filial,
|
|
"C1_OBS": String(hAPI.getCardValue("observacoes")),
|
|
"itens": itens
|
|
};
|
|

|
|
log.info("📦 Payload montado:");
|
|
log.info(JSON.stringify(payload));
|
|

|
|
var data1 = {
|
|
companyId: '1',
|
|
serviceCode: 'Postprod',
|
|
endpoint: '/UF_MATA110',
|
|
method: 'post',
|
|
timeoutService: '60000',
|
|
params: payload, // objeto puro
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
}
|
|
};
|
|

|
|
try {
|
|
var clientService = fluigAPI.getAuthorizeClientService();
|
|
var response = clientService.invoke(JSON.stringify(data1)); // SEMPRE stringify aqui
|
|

|
|
log.info("📬 Resposta da API Protheus:");
|
|
if (response) {
|
|
log.info("HTTP status: " + response.getHttpStatusResult());
|
|
log.info("Body: " + response.getResult());
|
|
}
|
|

|
|
if (response && response.getResult()) {
|
|
var result = JSON.parse(response.getResult());
|
|
if (result.sucesso) {
|
|
hAPI.setCardValue("numeroSCProtheus", result.C1_NUM || "");
|
|
hAPI.setCardValue("statusSCProtheus", "SC cadastrada com sucesso");
|
|
hAPI.setCardValue("statusAtendimento", "Em andamento");
|
|
hAPI.setCardValue("solicitanteSCProtheus", result.C1_SOLICIT || "");
|
|
hAPI.setCardValue("emissaoSCProtheus", result.C1_EMISSAO || "");
|
|
hAPI.setCardValue("qtdItensSCProtheus", String(result.quantidade_itens || ""));
|
|
hAPI.setCardValue("dataCadastroSCProtheus", result.data_cadastro || "");
|
|
hAPI.setCardValue("horaCadastroSCProtheus", result.hora_cadastro || "");
|
|
} else {
|
|
var erroMsg = result.erro || result.message || JSON.stringify(result);
|
|
hAPI.setCardValue("statusSCProtheus", "Erro: " + erroMsg);
|
|
hAPI.setCardValue("statusAtendimento", "Erro no envio");
|
|
throw "Erro Protheus: " + erroMsg;
|
|
}
|
|
} else {
|
|
throw "Sem resposta da API Protheus";
|
|
}
|
|
} catch (e) {
|
|
log.error("❌ Erro ao enviar SC para o Protheus: " + e);
|
|
throw e;
|
|
}
|
|

|
|

|
|

|
|
log.info("🏁 Finalização da servicetask82");
|
|
}
|
|
</eventDescription>
|
|
</WorkflowProcessEvent>
|
|
<WorkflowProcessEvent>
|
|
<workflowProcessEventPK>
|
|
<companyId>1</companyId>
|
|
<eventId>servicetask114</eventId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
</workflowProcessEventPK>
|
|
<eventDescription>function documentoValido(valor) {
|
|
var v = String(valor || "").trim().toUpperCase();
|
|
if (!v) return false;
|
|
if (v === "000000" || v === "000001") return false;
|
|
if (/^0+$/.test(v)) return false;
|
|
if (/^X+$/.test(v)) return false;
|
|
return true;
|
|
}
|
|
|
|
function consultarComFallback(clientService, endpoints, contexto) {
|
|
var ultimoErro = "";
|
|
|
|
for (var i = 0; i < endpoints.length; i++) {
|
|
try {
|
|
var req = {
|
|
companyId: "1",
|
|
serviceCode: "Postprod",
|
|
endpoint: endpoints[i],
|
|
method: "get",
|
|
timeoutService: "60000",
|
|
headers: {
|
|
"Content-Type": "application/json"
|
|
}
|
|
};
|
|
|
|
log.info("[ST114] Consulta " + contexto + " => " + endpoints[i]);
|
|
var response = clientService.invoke(JSON.stringify(req));
|
|
if (!response || !response.getResult()) {
|
|
ultimoErro = "Sem resposta";
|
|
continue;
|
|
}
|
|
|
|
var body = JSON.parse(response.getResult());
|
|
if (body && body.sucesso) {
|
|
return { sucesso: true, body: body };
|
|
}
|
|
|
|
ultimoErro = (body && (body.erro || body.message)) ? String(body.erro || body.message) : "Resposta sem sucesso";
|
|
} catch (e) {
|
|
ultimoErro = String(e);
|
|
}
|
|
}
|
|
|
|
return { sucesso: false, erro: ultimoErro || ("Falha na consulta de " + contexto) };
|
|
}
|
|
|
|
function apurarAssinaturas(pedidos) {
|
|
var resumo = {
|
|
total: 0,
|
|
aprovadas: 0,
|
|
pendentes: 0,
|
|
bloqueadas: 0,
|
|
rejeitadas: 0,
|
|
outros: 0
|
|
};
|
|
|
|
for (var i = 0; i < pedidos.length; i++) {
|
|
var alcadas = (pedidos[i] && pedidos[i].ALCADAS) ? pedidos[i].ALCADAS : [];
|
|
for (var j = 0; j < alcadas.length; j++) {
|
|
var status = String((alcadas[j] && alcadas[j].CR_STATUS) || "").trim();
|
|
if (!status) continue;
|
|
|
|
resumo.total++;
|
|
if (status === "03") {
|
|
resumo.aprovadas++;
|
|
} else if (status === "01" || status === "02") {
|
|
resumo.pendentes++;
|
|
} else if (status === "04") {
|
|
resumo.bloqueadas++;
|
|
} else if (status === "06" || status === "07") {
|
|
resumo.rejeitadas++;
|
|
} else {
|
|
resumo.outros++;
|
|
}
|
|
}
|
|
}
|
|
|
|
return resumo;
|
|
}
|
|
|
|
function servicetask114(attempt, message) {
|
|
log.info("[ST114] Inicio - valida cotacao, pedido e assinaturas");
|
|
|
|
var numSC = String(hAPI.getCardValue("numeroSCProtheus") || "").trim();
|
|
var numCotForm = String(hAPI.getCardValue("cotacaoSCProtheus") || "").trim();
|
|
var numPedForm = String(hAPI.getCardValue("pedidoSCProtheus") || "").trim();
|
|
|
|
if (!numSC) {
|
|
throw "Numero da SC nao informado no formulario.";
|
|
}
|
|
|
|
var clientService = fluigAPI.getAuthorizeClientService();
|
|
|
|
var consultaSC = consultarComFallback(clientService, [
|
|
"/UF_MATA110/" + numSC,
|
|
"/rest/UF_MATA110/" + numSC,
|
|
"/rest/uf_mata110/" + numSC
|
|
], "SC " + numSC);
|
|
|
|
if (!consultaSC.sucesso) {
|
|
throw "Nao foi possivel consultar a SC " + numSC + ": " + consultaSC.erro;
|
|
}
|
|
|
|
var solicitacoes = (consultaSC.body && consultaSC.body.solicitacoes) ? consultaSC.body.solicitacoes : [];
|
|
if (!solicitacoes.length) {
|
|
throw "SC " + numSC + " sem retorno de dados no Protheus.";
|
|
}
|
|
|
|
var sc = solicitacoes[0] || {};
|
|
var numCot = documentoValido(sc.C1_COTACAO) ? String(sc.C1_COTACAO).trim() : numCotForm;
|
|
var numPed = documentoValido(sc.C1_PEDIDO) ? String(sc.C1_PEDIDO).trim() : numPedForm;
|
|
|
|
if (!documentoValido(numCot)) {
|
|
hAPI.setCardValue("statusAtendimento", "Aguardando cotacao");
|
|
throw "Cotacao ainda nao disponivel para a SC " + numSC + ".";
|
|
}
|
|
hAPI.setCardValue("cotacaoSCProtheus", numCot);
|
|
|
|
if (!documentoValido(numPed)) {
|
|
hAPI.setCardValue("statusAtendimento", "Aguardando pedido");
|
|
throw "Pedido ainda nao gerado para a SC " + numSC + ".";
|
|
}
|
|
hAPI.setCardValue("pedidoSCProtheus", numPed);
|
|
|
|
var consultaPedido = consultarComFallback(clientService, [
|
|
"/UF_MATA120/" + numPed,
|
|
"/rest/UF_MATA120/" + numPed,
|
|
"/rest/uf_mata120/" + numPed
|
|
], "Pedido " + numPed);
|
|
|
|
if (!consultaPedido.sucesso) {
|
|
throw "Nao foi possivel consultar o pedido " + numPed + ": " + consultaPedido.erro;
|
|
}
|
|
|
|
var pedidos = (consultaPedido.body && consultaPedido.body.pedidos) ? consultaPedido.body.pedidos : [];
|
|
var assinatura = apurarAssinaturas(pedidos);
|
|
|
|
if (assinatura.total === 0) {
|
|
hAPI.setCardValue("statusAtendimento", "Pedido sem alcadas");
|
|
throw "Pedido " + numPed + " sem alcadas de assinatura retornadas.";
|
|
}
|
|
|
|
if (assinatura.bloqueadas > 0 || assinatura.rejeitadas > 0) {
|
|
hAPI.setCardValue("statusAtendimento", "Pedido bloqueado/rejeitado");
|
|
throw "Pedido " + numPed + " bloqueado/rejeitado. Nao pode seguir para recebimento.";
|
|
}
|
|
|
|
if (assinatura.aprovadas < assinatura.total) {
|
|
hAPI.setCardValue("statusAtendimento", "Pedido pendente de assinatura");
|
|
throw "Pedido " + numPed + " ainda nao esta 100% assinado (" + assinatura.aprovadas + "/" + assinatura.total + ").";
|
|
}
|
|
|
|
hAPI.setCardValue("statusAtendimento", "Pedido 100% assinado");
|
|
log.info("[ST114] Pedido " + numPed + " 100% assinado. Fluxo liberado para receber produto/servico.");
|
|
}
|
|
</eventDescription>
|
|
</WorkflowProcessEvent>
|
|
</list>
|
|
<list/>
|
|
<list>
|
|
<SwimLane>
|
|
<color>FFFFFF</color>
|
|
<height>715</height>
|
|
<width>1710</width>
|
|
<positionX>11</positionX>
|
|
<positionY>6</positionY>
|
|
<stateName>Solicitação de compras</stateName>
|
|
<type>1</type>
|
|
<parentSequence>0</parentSequence>
|
|
<swimLanePK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>1</sequence>
|
|
</swimLanePK>
|
|
</SwimLane>
|
|
<SwimLane>
|
|
<color>82b0b7</color>
|
|
<height>102</height>
|
|
<width>1680</width>
|
|
<positionX>41</positionX>
|
|
<positionY>6</positionY>
|
|
<stateName>Solicitante</stateName>
|
|
<type>2</type>
|
|
<parentSequence>1</parentSequence>
|
|
<swimLanePK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>2</sequence>
|
|
</swimLanePK>
|
|
</SwimLane>
|
|
<SwimLane>
|
|
<color>d0daae</color>
|
|
<height>102</height>
|
|
<width>1680</width>
|
|
<positionX>41</positionX>
|
|
<positionY>210</positionY>
|
|
<stateName>Compras</stateName>
|
|
<type>2</type>
|
|
<parentSequence>1</parentSequence>
|
|
<swimLanePK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>3</sequence>
|
|
</swimLanePK>
|
|
</SwimLane>
|
|
<SwimLane>
|
|
<color>d6e0d0</color>
|
|
<height>102</height>
|
|
<width>1680</width>
|
|
<positionX>41</positionX>
|
|
<positionY>108</positionY>
|
|
<stateName>Gestor CC</stateName>
|
|
<type>2</type>
|
|
<parentSequence>1</parentSequence>
|
|
<swimLanePK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>4</sequence>
|
|
</swimLanePK>
|
|
</SwimLane>
|
|
<SwimLane>
|
|
<color>adc9ac</color>
|
|
<height>103</height>
|
|
<width>1680</width>
|
|
<positionX>41</positionX>
|
|
<positionY>618</positionY>
|
|
<stateName>TI</stateName>
|
|
<type>2</type>
|
|
<parentSequence>1</parentSequence>
|
|
<swimLanePK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>5</sequence>
|
|
</swimLanePK>
|
|
</SwimLane>
|
|
<SwimLane>
|
|
<color>C0C0C0</color>
|
|
<height>102</height>
|
|
<width>1680</width>
|
|
<positionX>41</positionX>
|
|
<positionY>312</positionY>
|
|
<stateName>Compras</stateName>
|
|
<type>2</type>
|
|
<parentSequence>1</parentSequence>
|
|
<swimLanePK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>6</sequence>
|
|
</swimLanePK>
|
|
</SwimLane>
|
|
<SwimLane>
|
|
<color>c9c3ac</color>
|
|
<height>102</height>
|
|
<width>1680</width>
|
|
<positionX>41</positionX>
|
|
<positionY>414</positionY>
|
|
<stateName>GERF</stateName>
|
|
<type>2</type>
|
|
<parentSequence>1</parentSequence>
|
|
<swimLanePK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>7</sequence>
|
|
</swimLanePK>
|
|
</SwimLane>
|
|
<SwimLane>
|
|
<color>9fc1c6</color>
|
|
<height>102</height>
|
|
<width>1680</width>
|
|
<positionX>41</positionX>
|
|
<positionY>516</positionY>
|
|
<stateName>CEO</stateName>
|
|
<type>2</type>
|
|
<parentSequence>1</parentSequence>
|
|
<swimLanePK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>8</sequence>
|
|
</swimLanePK>
|
|
</SwimLane>
|
|
</list>
|
|
<list/>
|
|
<list/>
|
|
<list>
|
|
<ProcessLinkBend>
|
|
<processLinkBendPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>89</version>
|
|
<linkSequence>26</linkSequence>
|
|
<bendSequence>1</bendSequence>
|
|
</processLinkBendPK>
|
|
<positionX>1492</positionX>
|
|
<positionY>368</positionY>
|
|
</ProcessLinkBend>
|
|
<ProcessLinkBend>
|
|
<processLinkBendPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>89</version>
|
|
<linkSequence>125</linkSequence>
|
|
<bendSequence>1</bendSequence>
|
|
</processLinkBendPK>
|
|
<positionX>512</positionX>
|
|
<positionY>47</positionY>
|
|
</ProcessLinkBend>
|
|
<ProcessLinkBend>
|
|
<processLinkBendPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>89</version>
|
|
<linkSequence>126</linkSequence>
|
|
<bendSequence>1</bendSequence>
|
|
</processLinkBendPK>
|
|
<positionX>513</positionX>
|
|
<positionY>662</positionY>
|
|
</ProcessLinkBend>
|
|
<ProcessLinkBend>
|
|
<processLinkBendPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>89</version>
|
|
<linkSequence>127</linkSequence>
|
|
<bendSequence>1</bendSequence>
|
|
</processLinkBendPK>
|
|
<positionX>612</positionX>
|
|
<positionY>498</positionY>
|
|
</ProcessLinkBend>
|
|
<ProcessLinkBend>
|
|
<processLinkBendPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>89</version>
|
|
<linkSequence>161</linkSequence>
|
|
<bendSequence>1</bendSequence>
|
|
</processLinkBendPK>
|
|
<positionX>511</positionX>
|
|
<positionY>47</positionY>
|
|
</ProcessLinkBend>
|
|
<ProcessLinkBend>
|
|
<processLinkBendPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>89</version>
|
|
<linkSequence>162</linkSequence>
|
|
<bendSequence>1</bendSequence>
|
|
</processLinkBendPK>
|
|
<positionX>613</positionX>
|
|
<positionY>55</positionY>
|
|
</ProcessLinkBend>
|
|
</list>
|
|
<list/>
|
|
<list/>
|
|
<list>
|
|
<ProcessFormField>
|
|
<processFormFieldPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<fieldId>descProduto</fieldId>
|
|
</processFormFieldPK>
|
|
<fieldDescription>descProduto</fieldDescription>
|
|
<slotId>1</slotId>
|
|
</ProcessFormField>
|
|
<ProcessFormField>
|
|
<processFormFieldPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<fieldId>empresa</fieldId>
|
|
</processFormFieldPK>
|
|
<fieldDescription>empresa</fieldDescription>
|
|
<slotId>2</slotId>
|
|
</ProcessFormField>
|
|
<ProcessFormField>
|
|
<processFormFieldPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<fieldId>estabelecimento</fieldId>
|
|
</processFormFieldPK>
|
|
<fieldDescription>estabelecimento</fieldDescription>
|
|
<slotId>3</slotId>
|
|
</ProcessFormField>
|
|
<ProcessFormField>
|
|
<processFormFieldPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<fieldId>filialdest</fieldId>
|
|
</processFormFieldPK>
|
|
<fieldDescription>filialdest</fieldDescription>
|
|
<slotId>4</slotId>
|
|
</ProcessFormField>
|
|
<ProcessFormField>
|
|
<processFormFieldPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<fieldId>numeroSCProtheus</fieldId>
|
|
</processFormFieldPK>
|
|
<fieldDescription>numeroSCProtheus</fieldDescription>
|
|
<slotId>5</slotId>
|
|
</ProcessFormField>
|
|
<ProcessFormField>
|
|
<processFormFieldPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<fieldId>pedidoSCProtheus</fieldId>
|
|
</processFormFieldPK>
|
|
<fieldDescription>pedidoSCProtheus</fieldDescription>
|
|
<slotId>6</slotId>
|
|
</ProcessFormField>
|
|
<ProcessFormField>
|
|
<processFormFieldPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<fieldId>quantidade</fieldId>
|
|
</processFormFieldPK>
|
|
<fieldDescription>quantidade</fieldDescription>
|
|
<slotId>7</slotId>
|
|
</ProcessFormField>
|
|
<ProcessFormField>
|
|
<processFormFieldPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<fieldId>solicitanteSCProtheus</fieldId>
|
|
</processFormFieldPK>
|
|
<fieldDescription>solicitanteSCProtheus</fieldDescription>
|
|
<slotId>8</slotId>
|
|
</ProcessFormField>
|
|
<ProcessFormField>
|
|
<processFormFieldPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<fieldId>urgencia</fieldId>
|
|
</processFormFieldPK>
|
|
<fieldDescription>urgencia</fieldDescription>
|
|
<slotId>9</slotId>
|
|
</ProcessFormField>
|
|
<ProcessFormField>
|
|
<processFormFieldPK>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<fieldId>valorTotalCotacao</fieldId>
|
|
</processFormFieldPK>
|
|
<fieldDescription>valorTotalCotacao</fieldDescription>
|
|
<slotId>10</slotId>
|
|
</ProcessFormField>
|
|
</list>
|
|
<list>
|
|
<ProcessStateService>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>82</sequence>
|
|
<attempts>5</attempts>
|
|
<sucessFullMessage>Solicitação enviada com sucesso</sucessFullMessage>
|
|
<serviceName></serviceName>
|
|
<frequency>1</frequency>
|
|
<frequencyType>0</frequencyType>
|
|
</ProcessStateService>
|
|
<ProcessStateService>
|
|
<companyId>1</companyId>
|
|
<processId>Solicitação de compras </processId>
|
|
<version>1</version>
|
|
<sequence>114</sequence>
|
|
<attempts>5</attempts>
|
|
<sucessFullMessage>Integração executada com sucesso</sucessFullMessage>
|
|
<serviceName></serviceName>
|
|
<frequency>6</frequency>
|
|
<frequencyType>0</frequencyType>
|
|
</ProcessStateService>
|
|
</list>
|
|
<list/>
|
|
<list/>
|
|
<list/>
|
|
<list/>
|
|
</list> |