att transf
This commit is contained in:
@@ -408,6 +408,155 @@
|
||||
<digitalSignature>false</digitalSignature>
|
||||
<executionType>0</executionType>
|
||||
</ProcessState>
|
||||
<ProcessState>
|
||||
<processStatePK>
|
||||
<companyId>1</companyId>
|
||||
<processId>Transferência Ginseng</processId>
|
||||
<version>1</version>
|
||||
<sequence>99</sequence>
|
||||
</processStatePK>
|
||||
<stateName>Consultar Entrada</stateName>
|
||||
<stateDescription>Consultar Entrada</stateDescription>
|
||||
<instruction></instruction>
|
||||
<deadlineTime>0</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>false</notifyRequisitionerFollowUp>
|
||||
<automatic>false</automatic>
|
||||
<positionX>1600</positionX>
|
||||
<positionY>260</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>Transferência Ginseng</processId>
|
||||
<version>1</version>
|
||||
<sequence>104</sequence>
|
||||
</processStatePK>
|
||||
<stateName>Verificar problema de lançamento</stateName>
|
||||
<stateDescription>Verificar problema de lançamento</stateDescription>
|
||||
<instruction></instruction>
|
||||
<deadlineTime>0</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>1600</positionX>
|
||||
<positionY>60</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>Transferência Ginseng</processId>
|
||||
<version>1</version>
|
||||
<sequence>103</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>1660</positionX>
|
||||
<positionY>260</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>99</parentSequence>
|
||||
</ProcessState>
|
||||
<ProcessState>
|
||||
<processStatePK>
|
||||
<companyId>1</companyId>
|
||||
@@ -505,53 +654,6 @@
|
||||
<destinationStates/>
|
||||
<digitalSignature>false</digitalSignature>
|
||||
</ProcessState>
|
||||
<ProcessState>
|
||||
<processStatePK>
|
||||
<companyId>1</companyId>
|
||||
<processId>Transferência Ginseng</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>1610</positionX>
|
||||
<positionY>284</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>
|
||||
<ProcessState>
|
||||
<processStatePK>
|
||||
<companyId>1</companyId>
|
||||
@@ -646,6 +748,53 @@
|
||||
<destinationStates/>
|
||||
<digitalSignature>false</digitalSignature>
|
||||
</ProcessState>
|
||||
<ProcessState>
|
||||
<processStatePK>
|
||||
<companyId>1</companyId>
|
||||
<processId>Transferência Ginseng</processId>
|
||||
<version>1</version>
|
||||
<sequence>101</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>1780</positionX>
|
||||
<positionY>280</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>
|
||||
@@ -684,8 +833,8 @@
|
||||
<version>46</version>
|
||||
<sequence>46</sequence>
|
||||
</conditionProcessStatePK>
|
||||
<condition>hAPI.getCardValue("validacaoItens") == "entregue"</condition>
|
||||
<destinationSequenceId>52</destinationSequenceId>
|
||||
<condition>hAPI.getCardValue("validacaoItens") == "entregue" && hAPI.getCardValue("dataEntradaNfeConsulta") != ""</condition>
|
||||
<destinationSequenceId>99</destinationSequenceId>
|
||||
<conditionType>0</conditionType>
|
||||
</ConditionProcessState>
|
||||
<ConditionProcessState>
|
||||
@@ -858,23 +1007,6 @@
|
||||
<defaultLink>false</defaultLink>
|
||||
<type>0</type>
|
||||
</ProcessLink>
|
||||
<ProcessLink>
|
||||
<processLinkPK>
|
||||
<companyId>1</companyId>
|
||||
<processId>Transferência Ginseng</processId>
|
||||
<version>1</version>
|
||||
<linkSequence>82</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>
|
||||
@@ -882,7 +1014,7 @@
|
||||
<version>1</version>
|
||||
<linkSequence>85</linkSequence>
|
||||
</processLinkPK>
|
||||
<actionLabel></actionLabel>
|
||||
<actionLabel>Produtos entregue</actionLabel>
|
||||
<returnPermited>false</returnPermited>
|
||||
<initialStateSequence>57</initialStateSequence>
|
||||
<finalStateSequence>18</finalStateSequence>
|
||||
@@ -943,9 +1075,135 @@
|
||||
<defaultLink>false</defaultLink>
|
||||
<type>0</type>
|
||||
</ProcessLink>
|
||||
<ProcessLink>
|
||||
<processLinkPK>
|
||||
<companyId>1</companyId>
|
||||
<processId>Transferência Ginseng</processId>
|
||||
<version>1</version>
|
||||
<linkSequence>100</linkSequence>
|
||||
</processLinkPK>
|
||||
<actionLabel></actionLabel>
|
||||
<returnPermited>false</returnPermited>
|
||||
<initialStateSequence>46</initialStateSequence>
|
||||
<finalStateSequence>99</finalStateSequence>
|
||||
<returnLabel></returnLabel>
|
||||
<name></name>
|
||||
<automaticLink>false</automaticLink>
|
||||
<defaultLink>false</defaultLink>
|
||||
<type>0</type>
|
||||
</ProcessLink>
|
||||
<ProcessLink>
|
||||
<processLinkPK>
|
||||
<companyId>1</companyId>
|
||||
<processId>Transferência Ginseng</processId>
|
||||
<version>1</version>
|
||||
<linkSequence>102</linkSequence>
|
||||
</processLinkPK>
|
||||
<actionLabel></actionLabel>
|
||||
<returnPermited>false</returnPermited>
|
||||
<initialStateSequence>99</initialStateSequence>
|
||||
<finalStateSequence>101</finalStateSequence>
|
||||
<returnLabel></returnLabel>
|
||||
<name></name>
|
||||
<automaticLink>false</automaticLink>
|
||||
<defaultLink>false</defaultLink>
|
||||
<type>0</type>
|
||||
</ProcessLink>
|
||||
<ProcessLink>
|
||||
<processLinkPK>
|
||||
<companyId>1</companyId>
|
||||
<processId>Transferência Ginseng</processId>
|
||||
<version>1</version>
|
||||
<linkSequence>105</linkSequence>
|
||||
</processLinkPK>
|
||||
<actionLabel></actionLabel>
|
||||
<returnPermited>false</returnPermited>
|
||||
<initialStateSequence>103</initialStateSequence>
|
||||
<finalStateSequence>104</finalStateSequence>
|
||||
<returnLabel></returnLabel>
|
||||
<name></name>
|
||||
<automaticLink>false</automaticLink>
|
||||
<defaultLink>false</defaultLink>
|
||||
<type>0</type>
|
||||
</ProcessLink>
|
||||
<ProcessLink>
|
||||
<processLinkPK>
|
||||
<companyId>1</companyId>
|
||||
<processId>Transferência Ginseng</processId>
|
||||
<version>1</version>
|
||||
<linkSequence>106</linkSequence>
|
||||
</processLinkPK>
|
||||
<actionLabel></actionLabel>
|
||||
<returnPermited>false</returnPermited>
|
||||
<initialStateSequence>104</initialStateSequence>
|
||||
<finalStateSequence>99</finalStateSequence>
|
||||
<returnLabel></returnLabel>
|
||||
<name></name>
|
||||
<automaticLink>false</automaticLink>
|
||||
<defaultLink>false</defaultLink>
|
||||
<type>0</type>
|
||||
</ProcessLink>
|
||||
</list>
|
||||
<list/>
|
||||
<list/>
|
||||
<list>
|
||||
<WorkflowProcessEvent>
|
||||
<workflowProcessEventPK>
|
||||
<companyId>1</companyId>
|
||||
<eventId>servicetask99</eventId>
|
||||
<processId>Transferência Ginseng</processId>
|
||||
<version>1</version>
|
||||
</workflowProcessEventPK>
|
||||
<eventDescription>function servicetask99(attempt, message) {
|
||||
try {
|
||||
var validacaoItens = safeTrim(hAPI.getCardValue("validacaoItens"));
|
||||
|
||||
// Só precisa consultar entrada da NFe quando o recebimento foi validado como entregue.
|
||||
if (validacaoItens !== "entregue") return;
|
||||
|
||||
var dataEntrada = safeTrim(hAPI.getCardValue("dataEntradaNfeConsulta"));
|
||||
if (dataEntrada !== "") return;
|
||||
|
||||
var chaveNfe = onlyDigits(hAPI.getCardValue("chaveNfe"));
|
||||
if (chaveNfe === "") {
|
||||
log.warn("[servicetask99] Chave NFe vazia. Nao foi possivel consultar entrada.");
|
||||
return;
|
||||
}
|
||||
|
||||
var cKey = DatasetFactory.createConstraint("key", chaveNfe, chaveNfe, ConstraintType.MUST);
|
||||
var dsNfe = DatasetFactory.getDataset("ds_fiscal_invoice_by_keys", null, [cKey], null);
|
||||
|
||||
if (!dsNfe || dsNfe.rowsCount < 1) {
|
||||
log.warn("[servicetask99] Dataset sem retorno para chave: " + chaveNfe);
|
||||
return;
|
||||
}
|
||||
|
||||
var dsSuccess = safeTrim(dsNfe.getValue(0, "success")).toLowerCase() === "true";
|
||||
var dsUpdatedAt = safeTrim(dsNfe.getValue(0, "updatedAt"));
|
||||
|
||||
if (dsSuccess && dsUpdatedAt !== "") {
|
||||
hAPI.setCardValue("dataEntradaNfeConsulta", dsUpdatedAt);
|
||||
log.info("[servicetask99] Data de entrada atualizada automaticamente: " + dsUpdatedAt);
|
||||
return;
|
||||
}
|
||||
|
||||
var dsMessage = safeTrim(dsNfe.getValue(0, "message"));
|
||||
log.warn("[servicetask99] Consulta executada sem data de entrada. message=" + dsMessage);
|
||||
} catch (e) {
|
||||
log.error("[servicetask99] Erro na consulta automatica da NFe: " + e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
function safeTrim(value) {
|
||||
return String(value == null ? "" : value).trim();
|
||||
}
|
||||
|
||||
function onlyDigits(value) {
|
||||
return String(value == null ? "" : value).replace(/\D/g, "");
|
||||
}
|
||||
</eventDescription>
|
||||
</WorkflowProcessEvent>
|
||||
</list>
|
||||
<list/>
|
||||
<list>
|
||||
<SwimLane>
|
||||
@@ -1168,7 +1426,19 @@
|
||||
<slotId>6</slotId>
|
||||
</ProcessFormField>
|
||||
</list>
|
||||
<list/>
|
||||
<list>
|
||||
<ProcessStateService>
|
||||
<companyId>1</companyId>
|
||||
<processId>Transferência Ginseng</processId>
|
||||
<version>1</version>
|
||||
<sequence>99</sequence>
|
||||
<attempts>10</attempts>
|
||||
<sucessFullMessage>Lançamento efetuado com sucesso no RGB</sucessFullMessage>
|
||||
<serviceName></serviceName>
|
||||
<frequency>1</frequency>
|
||||
<frequencyType>2</frequencyType>
|
||||
</ProcessStateService>
|
||||
</list>
|
||||
<list/>
|
||||
<list>
|
||||
<ProcessAppConfiguration>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 47 KiB |
+1
-1
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 21 KiB |
Reference in New Issue
Block a user