Bij het registreren van webhooks vanuit xxdru_maintain_trickle_loading
komen honderden foutmelding retour, 1 per administratie:
itgeneor135
Invalid: Post to callback URL endpoint returns 500 A task was canceled.
The remote server returned an error: (500) Internal Server Error.
Kan Webhookabonnement niet registreren voor onderwerp ‘PurchaseOrders’ op divisie ‘2790386’ en overeenkomst ‘L519352667’.
Division = 2782168, Topic = PurchaseOrders, CallbackURL = https://eolhookreceiver.invantive.com/api/eol/v1?datacontainerid=https%3A%2F%2Fstart.exactonline…, Description = Created by Invantive SQL version 20.2.128-PROD+1918
De call stack is:
2021-12-08 01:58:59.729 Error itgeneor135: System.Net.WebException
ValidationException
ValidationException
System.Net.WebException
ValidationException
ValidationException
at System.Net.HttpWebRequest.GetResponse()
at Invantive.Data.Providers.Http.HttpBasedProvider.DoRequest(GlobalState owner, ExecutionOptions executionOptions, HttpWebRequest request, String url, ObjectDefinition objectDefinition, QueryObject queryObject, String partitionCode, String callSafeNameOverrule, String anonymizedPostText, Boolean allowRetryOnNoConnectionMade, Boolean allowRetryOnConnectionLoss, ParameterList parameters, Guid nativeCallUid, Boolean throwExceptionOnNonSuccessfulStatusCode, Object requestBody, ExecutionStatistics& executionStatistics, ODataErrorProcessingInstructions& oDataErrorProcessingInstructions)
De gebruikte code is:
--
-- Maintain trickle loading.
--
create or replace procedure xxdru_maintain_trickle_loading
( p_license_contract_code varchar2
)
is
begin
for r_trickle in
( --
-- Activate trickle loading for all tables for which
-- trickle loading is available but not yet activated.
--
-- Selects all replicated tables that support webhooks (and
-- therefore trickle loading). Restrict
-- to those tables that have one or more table partitions
-- (such as Exact Online companies) for which trickle loading
-- is not yet activated.
--
-- Expected runtime on initial run in seconds: 5 times number of partitions (companies).
-- Expected runtime after initial runs in seconds: 1.
--
select distinct 'alter persistent cache set table '
|| tbe.tbe_full_qualified_name
|| case
when ste.data_container_alias is not null
then '@' || ste.data_container_alias
end
|| ' approach trickle'
stmt
from dc_tables@datacache tbe
join dc_table_partitions@DataCache tpn
on tpn.tbe_id = tbe.tbe_id
and tpn.tpt_seeding_approach_used_code = 'C' /* Complete. */
join SYSTEMTABLES@DataDictionary ste
on ste.full_qualified_name = tbe.tbe_full_qualified_name
and ste.webhook_topic is not null
--
-- Skip all XML tables, since none of them
-- has webhooks anyway.
--
where tbe.tbe_full_qualified_name like '%REST%'
)
loop
execute immediate r_trickle.stmt || ' license contract code ''' || p_license_contract_code || '''';
end loop;
end;