timestamp,message 1634055732727," entity_hrid, title, error, id" 1634055732727, ) AS records_actions 1634055732727,ORDER BY %I %s 1634055732727,"LIMIT %s OFFSET %s;'," 1634055732727," jobExecutionId, jobExecutionId, jobExecutionId, jobExecutionId, sortingField, sortingDir, limitVal, offsetVal);" 1634055732727,END; 1634055732727,$$ LANGUAGE plpgsql; 1634055732728,"16:22:12.728 [vert.x-eventloop-thread-1] INFO PostgresClient [1606965eqId] Successfully executed CREATE OR REPLACE FUNCTION get_job_log_entries(jobExecutionId uuid, sortingField text, sortingDir text, limitVal bigint, offsetVal bigint) RETURNS TABLE(job_execution_id uuid, source_id uuid, source_record_order integer, invoiceline_number text, title text, source_record_action_status text, instance_action_status text, holdings_action_status text, item_action_status text, order_action_status text, invoice_action_status text, error text, total_count bigint, invoice_line_journal_record_id uuid) AS $$" 1634055732728,BEGIN 1634055732728, RETURN QUERY EXECUTE format(' 1634055732728,"SELECT records_actions.job_execution_id, records_actions.source_id, records_actions.source_record_order, '''' as invoiceline_number," 1634055732728," rec_titles.title," 1634055732728, CASE 1634055732728," WHEN marc_errors_number != 0 OR marc_actions[array_length(marc_actions, 1)] = ''NON_MATCH'' THEN ''DISCARDED''" 1634055732728," WHEN marc_actions[array_length(marc_actions, 1)] = ''CREATE'' THEN ''CREATED''" 1634055732728," WHEN marc_actions[array_length(marc_actions, 1)] IN (''UPDATE'', ''MODIFY'') THEN ''UPDATED''" 1634055732728," END AS source_record_action_status," 1634055732728," get_entity_status(instance_actions, instance_errors_number) AS instance_action_status," 1634055732728," get_entity_status(holdings_actions, holdings_errors_number) AS holdings_action_status," 1634055732728," get_entity_status(item_actions, item_errors_number) AS item_action_status," 1634055732728," get_entity_status(order_actions, order_errors_number) AS order_action_status," 1634055732728," null AS invoice_action_status, rec_errors.error, records_actions.total_count," 1634055732728, null AS invoiceLineJournalRecordId 1634055732728,FROM ( 1634055732728," SELECT journal_records.source_id, journal_records.source_record_order, journal_records.job_execution_id," 1634055732728," array_agg(action_type ORDER BY action_date ASC) FILTER (WHERE entity_type IN (''MARC_BIBLIOGRAPHIC'', ''MARC_HOLDINGS'', ''MARC_AUTHORITY'')) AS marc_actions," 1634055732728," count(journal_records.source_id) FILTER (WHERE (entity_type = ''MARC_BIBLIOGRAPHIC'' OR entity_type = ''MARC_HOLDINGS'' OR entity_type = ''MARC_AUTHORITY'') AND journal_records.error != '''') AS marc_errors_number," 1634055732728," array_agg(action_type) FILTER (WHERE entity_type = ''INSTANCE'') AS instance_actions," 1634055732728," count(journal_records.source_id) FILTER (WHERE entity_type = ''INSTANCE'' AND journal_records.error != '''') AS instance_errors_number," 1634055732728," array_agg(action_type) FILTER (WHERE entity_type = ''HOLDINGS'') AS holdings_actions," 1634055732728," count(journal_records.source_id) FILTER (WHERE entity_type = ''HOLDINGS'' AND journal_records.error != '''') AS holdings_errors_number," 1634055732728," array_agg(action_type) FILTER (WHERE entity_type = ''ITEM'') AS item_actions," 1634055732728," count(journal_records.source_id) FILTER (WHERE entity_type = ''ITEM'' AND journal_records.error != '''') AS item_errors_number," 1634055732728," array_agg(action_type) FILTER (WHERE entity_type = ''ORDER'') AS order_actions," 1634055732728," count(journal_records.source_id) FILTER (WHERE entity_type = ''ORDER'' AND journal_records.error != '''') AS order_errors_number," 1634055732728, count(journal_records.source_id) OVER () AS total_count 1634055732728, FROM journal_records 1634055732728, WHERE journal_records.job_execution_id = ''%s'' and 1634055732728," entity_type in (''MARC_BIBLIOGRAPHIC'', ''MARC_HOLDINGS'', ''MARC_AUTHORITY'', ''INSTANCE'', ''HOLDINGS'', ''ITEM'', ''ORDER'')" 1634055732728," GROUP BY journal_records.source_id, journal_records.source_record_order, journal_records.job_execution_id" 1634055732728, ) AS records_actions 1634055732728," LEFT JOIN (SELECT journal_records.source_id, journal_records.error" 1634055732728, FROM journal_records 1634055732728, WHERE journal_records.job_execution_id = ''%s'') AS rec_errors 1634055732728, ON rec_errors.source_id = records_actions.source_id AND rec_errors.error != '''' 1634055732728," LEFT JOIN (SELECT journal_records.source_id, journal_records.title" 1634055732728, FROM journal_records 1634055732728, WHERE journal_records.job_execution_id = ''%s'') AS rec_titles 1634055732728, ON rec_titles.source_id = records_actions.source_id AND rec_titles.title IS NOT NULL 1634055732728,UNION 1634055732728,"SELECT records_actions.job_execution_id, records_actions.source_id, source_record_order, entity_hrid as invoiceline_number, title," 1634055732728, CASE 1634055732728," WHEN marc_errors_number != 0 OR marc_actions[array_length(marc_actions, 1)] = ''NON_MATCH'' THEN ''DISCARDED''" 1634055732728," WHEN marc_actions[array_length(marc_actions, 1)] = ''CREATE'' THEN ''CREATED''" 1634055732728," WHEN marc_actions[array_length(marc_actions, 1)] IN (''UPDATE'', ''MODIFY'') THEN ''UPDATED''" 1634055732728," END AS source_record_action_status," 1634055732728," null AS instance_action_status," 1634055732728," null AS holdings_action_status," 1634055732728," null AS item_action_status," 1634055732728," null AS order_action_status," 1634055732728," get_entity_status(invoice_actions, invoice_errors_number) AS invoice_action_status," 1634055732728," error, records_actions.total_count, invoiceLineJournalRecordId" 1634055732728,FROM ( 1634055732728," SELECT journal_records.source_id, journal_records.job_execution_id, source_record_order, entity_hrid, title, error," 1634055732728," array[]::varchar[] AS marc_actions," 1634055732728," cast(0 as integer) AS marc_errors_number," 1634055732728," array_agg(action_type) FILTER (WHERE entity_type = ''INVOICE'') AS invoice_actions," 1634055732728," count(journal_records.source_id) FILTER (WHERE entity_type = ''INVOICE'' AND journal_records.error != '''') AS invoice_errors_number," 1634055732728," count(journal_records.source_id) OVER () AS total_count," 1634055732728, id AS invoiceLineJournalRecordId 1634055732728, FROM journal_records 1634055732728, WHERE journal_records.job_execution_id = ''%s'' and entity_type = ''INVOICE'' and title != ''INVOICE'' 1634055732728," GROUP BY journal_records.source_id, journal_records.source_record_order, journal_records.job_execution_id," 1634055732728," entity_hrid, title, error, id" 1634055732728, ) AS records_actions 1634055732728,ORDER BY %I %s 1634055732728,"LIMIT %s OFFSET %s;'," 1634055732728," jobExecutionId, jobExecutionId, jobExecutionId, jobExecutionId, sortingField, sortingDir, limitVal, offsetVal);" 1634055732728,END; 1634055732728,$$ LANGUAGE plpgsql; 1634055732728,"16:22:12.728 [vert.x-eventloop-thread-1] INFO PostgresClient [1606965eqId] trying to execute: {} DROP FUNCTION IF EXISTS get_record_processing_log(uuid, uuid);" 1634055732729,"16:22:12.729 [vert.x-eventloop-thread-1] INFO PostgresClient [1606966eqId] Successfully executed DROP FUNCTION IF EXISTS get_record_processing_log(uuid, uuid);" 1634055732729,"16:22:12.729 [vert.x-eventloop-thread-1] INFO PostgresClient [1606966eqId] trying to execute: {} CREATE OR REPLACE FUNCTION get_record_processing_log(jobExecutionId uuid, recordId uuid) RETURNS TABLE(job_execution_id uuid, source_id uuid, source_record_order integer, title text, source_record_action_status text, source_entity_error text, instance_action_status text, instance_entity_id text[], instance_entity_hrid text[], instance_entity_error text, holdings_action_status text, holdings_entity_id text[], holdings_entity_hrid text[], holdings_entity_error text, item_action_status text, item_entity_id text[], item_entity_hrid text[], item_entity_error text, order_action_status text, order_entity_id text[], order_entity_hrid text[], order_entity_error text, invoice_action_status text, invoice_entity_id text[], invoice_entity_hrid text[], invoice_entity_error text, invoice_line_action_status text, invoice_line_entity_id text, invoice_line_entity_hrid text, invoice_line_entity_error text) AS $$" 1634055732729,BEGIN 1634055732729, RETURN QUERY 1634055732729," SELECT records_actions.job_execution_id," 1634055732729," records_actions.source_id," 1634055732729," records_actions.source_record_order," 1634055732729," rec_titles.title," 1634055732729," CASE WHEN marc_errors_number != 0 OR marc_actions[array_length(marc_actions, 1)] = 'NON_MATCH'" 1634055732729, THEN 'DISCARDED' 1634055732729," WHEN marc_actions[array_length(marc_actions, 1)] = 'CREATE'" 1634055732729, THEN 'CREATED' 1634055732729," WHEN marc_actions[array_length(marc_actions, 1)] IN ('UPDATE', 'MODIFY')" 1634055732729, THEN 'UPDATED' 1634055732729," END AS source_record_action_status," 1634055732729," records_actions.source_entity_error[1]," 1634055732729," get_entity_status(instance_actions, instance_errors_number) AS instance_action_status," 1634055732729," records_actions.instance_entity_id," 1634055732729," records_actions.instance_entity_hrid," 1634055732729," records_actions.instance_entity_error[1]," 1634055732729," get_entity_status(holdings_actions, holdings_errors_number) AS holdings_action_status," 1634055732729," records_actions.holdings_entity_id," 1634055732729," records_actions.holdings_entity_hrid," 1634055732729," records_actions.holdings_entity_error[1]," 1634055732729," get_entity_status(item_actions, item_errors_number) AS item_action_status," 1634055732729," records_actions.item_entity_id," 1634055732729," records_actions.item_entity_hrid," 1634055732729," records_actions.item_entity_error[1]," 1634055732729," get_entity_status(order_actions, order_errors_number) AS order_action_status," 1634055732729," records_actions.order_entity_id," 1634055732729," records_actions.order_entity_hrid," 1634055732729," records_actions.order_entity_error[1]," 1634055732729," null AS invoice_action_status," 1634055732729," null AS invoice_entity_id," 1634055732729," null AS invoice_entity_hrid," 1634055732729," null AS invoice_entity_error," 1634055732729," null AS invoice_line_action_status," 1634055732729," null AS invoice_line_entity_id," 1634055732729," null AS invoice_line_entity_hrid," 1634055732729, null AS invoice_line_entity_error 1634055732729, FROM ( 1634055732729," SELECT journal_records.source_id," 1634055732729," journal_records.source_record_order," 1634055732729," journal_records.job_execution_id," 1634055732729," array_agg(action_type ORDER BY action_date ASC) FILTER (WHERE entity_type = 'MARC_BIBLIOGRAPHIC' OR entity_type = 'MARC_HOLDINGS' OR entity_type = 'MARC_AUTHORITY') AS marc_actions," 1634055732729," count(journal_records.source_id) FILTER (WHERE (entity_type = 'MARC_BIBLIOGRAPHIC' OR entity_type = 'MARC_HOLDINGS' OR entity_type = 'MARC_AUTHORITY') AND journal_records.error != '') AS marc_errors_number," 1634055732729," array_agg(error) FILTER (WHERE entity_type = 'MARC_BIBLIOGRAPHIC' OR entity_type = 'MARC_HOLDINGS' OR entity_type = 'MARC_AUTHORITY') AS source_entity_error," 1634055732729," array_agg(action_type) FILTER (WHERE entity_type = 'INSTANCE') AS instance_actions," 1634055732729," count(journal_records.source_id) FILTER (WHERE entity_type = 'INSTANCE' AND journal_records.error != '') AS instance_errors_number," 1634055732730," array_agg(entity_hrid) FILTER (WHERE entity_type = 'INSTANCE') AS instance_entity_hrid," 1634055732730," array_agg(entity_id) FILTER (WHERE entity_type = 'INSTANCE') AS instance_entity_id," 1634055732730," array_agg(error) FILTER (WHERE entity_type = 'INSTANCE') AS instance_entity_error," 1634055732730," array_agg(action_type) FILTER (WHERE entity_type = 'HOLDINGS') AS holdings_actions," 1634055732730," count(journal_records.source_id) FILTER (WHERE entity_type = 'HOLDINGS' AND journal_records.error != '') AS holdings_errors_number," 1634055732730," array_agg(entity_hrid) FILTER (WHERE entity_type = 'HOLDINGS') AS holdings_entity_hrid," 1634055732730," array_agg(entity_id) FILTER (WHERE entity_type = 'HOLDINGS') AS holdings_entity_id," 1634055732730," array_agg(error) FILTER (WHERE entity_type = 'HOLDINGS') AS holdings_entity_error," 1634055732730," array_agg(action_type) FILTER (WHERE entity_type = 'ITEM') AS item_actions," 1634055732730," count(journal_records.source_id) FILTER (WHERE entity_type = 'ITEM' AND journal_records.error != '') AS item_errors_number," 1634055732730," array_agg(entity_hrid) FILTER (WHERE entity_type = 'ITEM') AS item_entity_hrid," 1634055732730," array_agg(entity_id) FILTER (WHERE entity_type = 'ITEM') AS item_entity_id," 1634055732730," array_agg(error) FILTER (WHERE entity_type = 'ITEM') AS item_entity_error," 1634055732730," array_agg(action_type) FILTER (WHERE entity_type = 'ORDER') AS order_actions," 1634055732730," count(journal_records.source_id) FILTER (WHERE entity_type = 'ORDER' AND journal_records.error != '') AS order_errors_number," 1634055732730," array_agg(entity_hrid) FILTER (WHERE entity_type = 'ORDER') AS order_entity_hrid," 1634055732730," array_agg(entity_id) FILTER (WHERE entity_type = 'ORDER') AS order_entity_id," 1634055732730, array_agg(error) FILTER (WHERE entity_type = 'ORDER') AS order_entity_error 1634055732730, FROM journal_records 1634055732730," WHERE journal_records.job_execution_id = jobExecutionId AND journal_records.source_id = recordId AND journal_records.entity_type NOT IN ('EDIFACT', 'INVOICE')" 1634055732730," GROUP BY journal_records.source_id, journal_records.source_record_order, journal_records.job_execution_id)" 1634055732730, AS records_actions 1634055732730, LEFT JOIN ( 1634055732730," SELECT journal_records.source_id, journal_records.title FROM journal_records" 1634055732730, WHERE journal_records.job_execution_id = jobExecutionId AND journal_records.source_id = recordId 1634055732730, ) AS rec_titles ON rec_titles.source_id = records_actions.source_id AND rec_titles.title IS NOT NULL 1634055732730, UNION 1634055732730," SELECT invoice_line_info.job_execution_id," 1634055732730," invoice_line_info.source_id," 1634055732730," records_actions.source_record_order," 1634055732730," invoice_line_info.title," 1634055732730, CASE WHEN edifact_errors_number != 0 THEN 'DISCARDED' 1634055732730," WHEN edifact_actions[array_length(edifact_actions, 1)] = 'CREATE' THEN 'CREATED'" 1634055732730," END AS source_record_action_status," 1634055732730," records_actions.source_record_error[1]," 1634055732730," null AS instance_action_status," 1634055732730," null AS instance_entity_id," 1634055732730," null AS instance_entity_hrid," 1634055732730," null AS instance_entity_error," 1634055732730," null AS holdings_action_status," 1634055732730," null AS holdings_entity_id," 1634055732730," null AS holdings_entity_hrid," 1634055732730," null AS holdings_entity_error," 1634055732730," null AS item_action_status," 1634055732730," null AS item_entity_id," 1634055732730," null AS item_entity_hrid," 1634055732730," null AS item_entity_error," 1634055732730," null AS order_action_status," 1634055732730," null AS order_entity_id," 1634055732730," null AS order_entity_hrid," 1634055732730," null AS order_entity_error," 1634055732730," get_entity_status(records_actions.invoice_actions, records_actions.invoice_errors_number) AS invoice_action_status," 1634055732730," records_actions.invoice_entity_id," 1634055732730," records_actions.invoice_entity_hrid," 1634055732730," records_actions.invoice_entity_error[1]," 1634055732730, CASE WHEN action_status = 'ERROR' THEN 'DISCARDED' 1634055732730, WHEN inv_line_actions = 'CREATE' THEN 'CREATED' 1634055732730," END AS invoice_line_action_status," 1634055732730," invoice_line_info.invoice_line_entity_id," 1634055732730," invoice_line_info.invoice_line_entity_hrid," 1634055732730, invoice_line_info.invoice_line_entity_error 1634055732730, FROM ( 1634055732730," SELECT journal_records.source_id," 1634055732730," journal_records.job_execution_id," 1634055732730," journal_records.title," 1634055732730," journal_records.action_type AS inv_line_actions," 1634055732730," action_status," 1634055732730," entity_hrid AS invoice_line_entity_hrid," 1634055732730," entity_id AS invoice_line_entity_id," 1634055732730, error AS invoice_line_entity_error 1634055732730, FROM journal_records 1634055732730, WHERE journal_records.id = recordId AND journal_records.entity_type = 'INVOICE' AND journal_records.title != 'INVOICE' 1634055732730, ) AS invoice_line_info 1634055732730, LEFT JOIN ( 1634055732730," SELECT journal_records.source_id," 1634055732730," journal_records.source_record_order," 1634055732730," array_agg(action_type) FILTER (WHERE entity_type = 'EDIFACT') AS edifact_actions," 1634055732730," count(journal_records.source_id) FILTER (WHERE entity_type = 'EDIFACT' AND journal_records.error != '') AS edifact_errors_number," 1634055732730," array_agg(error) FILTER (WHERE entity_type = 'EDIFACT') AS source_record_error," 1634055732730," array_agg(action_type) FILTER (WHERE entity_type = 'INVOICE' AND journal_records.title = 'INVOICE') AS invoice_actions," 1634055732730," count(journal_records.source_id) FILTER (WHERE entity_type = 'INVOICE' AND journal_records.title = 'INVOICE' AND journal_records.error != '') AS invoice_errors_number," 1634055732730," array_agg(entity_hrid) FILTER (WHERE entity_type = 'INVOICE' AND journal_records.title = 'INVOICE') AS invoice_entity_hrid," 1634055732730," array_agg(entity_id) FILTER (WHERE entity_type = 'INVOICE' AND journal_records.title = 'INVOICE') AS invoice_entity_id," 1634055732730, array_agg(error) FILTER (WHERE entity_type = 'INVOICE' AND journal_records.title = 'INVOICE') AS invoice_entity_error 1634055732730, FROM journal_records 1634055732730, WHERE journal_records.job_execution_id = jobExecutionId and entity_type = 'EDIFACT' OR journal_records.title = 'INVOICE' 1634055732730," GROUP BY journal_records.source_id, journal_records.job_execution_id, journal_records.source_record_order" 1634055732730, ) AS records_actions ON records_actions.source_id = invoice_line_info.source_id; 1634055732730,END; 1634055732730,$$ LANGUAGE plpgsql; 1634055732732,"16:22:12.732 [vert.x-eventloop-thread-1] INFO PostgresClient [1606969eqId] Successfully executed CREATE OR REPLACE FUNCTION get_record_processing_log(jobExecutionId uuid, recordId uuid) RETURNS TABLE(job_execution_id uuid, source_id uuid, source_record_order integer, title text, source_record_action_status text, source_entity_error text, instance_action_status text, instance_entity_id text[], instance_entity_hrid text[], instance_entity_error text, holdings_action_status text, holdings_entity_id text[], holdings_entity_hrid text[], holdings_entity_error text, item_action_status text, item_entity_id text[], item_entity_hrid text[], item_entity_error text, order_action_status text, order_entity_id text[], order_entity_hrid text[], order_entity_error text, invoice_action_status text, invoice_entity_id text[], invoice_entity_hrid text[], invoice_entity_error text, invoice_line_action_status text, invoice_line_entity_id text, invoice_line_entity_hrid text, invoice_line_entity_error text) AS $$" 1634055732732,BEGIN 1634055732732, RETURN QUERY 1634055732732," SELECT records_actions.job_execution_id," 1634055732732," records_actions.source_id," 1634055732732," records_actions.source_record_order," 1634055732732," rec_titles.title," 1634055732732," CASE WHEN marc_errors_number != 0 OR marc_actions[array_length(marc_actions, 1)] = 'NON_MATCH'" 1634055732732, THEN 'DISCARDED' 1634055732732," WHEN marc_actions[array_length(marc_actions, 1)] = 'CREATE'" 1634055732732, THEN 'CREATED' 1634055732732," WHEN marc_actions[array_length(marc_actions, 1)] IN ('UPDATE', 'MODIFY')" 1634055732732, THEN 'UPDATED' 1634055732732," END AS source_record_action_status," 1634055732732," records_actions.source_entity_error[1]," 1634055732732," get_entity_status(instance_actions, instance_errors_number) AS instance_action_status," 1634055732732," records_actions.instance_entity_id," 1634055732732," records_actions.instance_entity_hrid," 1634055732732," records_actions.instance_entity_error[1]," 1634055732732," get_entity_status(holdings_actions, holdings_errors_number) AS holdings_action_status," 1634055732732," records_actions.holdings_entity_id," 1634055732732," records_actions.holdings_entity_hrid," 1634055732732," records_actions.holdings_entity_error[1]," 1634055732732," get_entity_status(item_actions, item_errors_number) AS item_action_status," 1634055732732," records_actions.item_entity_id," 1634055732732," records_actions.item_entity_hrid," 1634055732732," records_actions.item_entity_error[1]," 1634055732732," get_entity_status(order_actions, order_errors_number) AS order_action_status," 1634055732732," records_actions.order_entity_id," 1634055732732," records_actions.order_entity_hrid," 1634055732732," records_actions.order_entity_error[1]," 1634055732732," null AS invoice_action_status," 1634055732732," null AS invoice_entity_id," 1634055732732," null AS invoice_entity_hrid," 1634055732732," null AS invoice_entity_error," 1634055732732," null AS invoice_line_action_status," 1634055732732," null AS invoice_line_entity_id," 1634055732732," null AS invoice_line_entity_hrid," 1634055732732, null AS invoice_line_entity_error 1634055732732, FROM ( 1634055732732," SELECT journal_records.source_id," 1634055732732," journal_records.source_record_order," 1634055732732," journal_records.job_execution_id," 1634055732732," array_agg(action_type ORDER BY action_date ASC) FILTER (WHERE entity_type = 'MARC_BIBLIOGRAPHIC' OR entity_type = 'MARC_HOLDINGS' OR entity_type = 'MARC_AUTHORITY') AS marc_actions," 1634055732732," count(journal_records.source_id) FILTER (WHERE (entity_type = 'MARC_BIBLIOGRAPHIC' OR entity_type = 'MARC_HOLDINGS' OR entity_type = 'MARC_AUTHORITY') AND journal_records.error != '') AS marc_errors_number," 1634055732732," array_agg(error) FILTER (WHERE entity_type = 'MARC_BIBLIOGRAPHIC' OR entity_type = 'MARC_HOLDINGS' OR entity_type = 'MARC_AUTHORITY') AS source_entity_error," 1634055732732," array_agg(action_type) FILTER (WHERE entity_type = 'INSTANCE') AS instance_actions," 1634055732732," count(journal_records.source_id) FILTER (WHERE entity_type = 'INSTANCE' AND journal_records.error != '') AS instance_errors_number," 1634055732732," array_agg(entity_hrid) FILTER (WHERE entity_type = 'INSTANCE') AS instance_entity_hrid," 1634055732732," array_agg(entity_id) FILTER (WHERE entity_type = 'INSTANCE') AS instance_entity_id," 1634055732732," array_agg(error) FILTER (WHERE entity_type = 'INSTANCE') AS instance_entity_error," 1634055732732," array_agg(action_type) FILTER (WHERE entity_type = 'HOLDINGS') AS holdings_actions," 1634055732732," count(journal_records.source_id) FILTER (WHERE entity_type = 'HOLDINGS' AND journal_records.error != '') AS holdings_errors_number," 1634055732732," array_agg(entity_hrid) FILTER (WHERE entity_type = 'HOLDINGS') AS holdings_entity_hrid," 1634055732732," array_agg(entity_id) FILTER (WHERE entity_type = 'HOLDINGS') AS holdings_entity_id," 1634055732732," array_agg(error) FILTER (WHERE entity_type = 'HOLDINGS') AS holdings_entity_error," 1634055732732," array_agg(action_type) FILTER (WHERE entity_type = 'ITEM') AS item_actions," 1634055732732," count(journal_records.source_id) FILTER (WHERE entity_type = 'ITEM' AND journal_records.error != '') AS item_errors_number," 1634055732732," array_agg(entity_hrid) FILTER (WHERE entity_type = 'ITEM') AS item_entity_hrid," 1634055732732," array_agg(entity_id) FILTER (WHERE entity_type = 'ITEM') AS item_entity_id," 1634055732732," array_agg(error) FILTER (WHERE entity_type = 'ITEM') AS item_entity_error," 1634055732732," array_agg(action_type) FILTER (WHERE entity_type = 'ORDER') AS order_actions," 1634055732732," count(journal_records.source_id) FILTER (WHERE entity_type = 'ORDER' AND journal_records.error != '') AS order_errors_number," 1634055732732," array_agg(entity_hrid) FILTER (WHERE entity_type = 'ORDER') AS order_entity_hrid," 1634055732732," array_agg(entity_id) FILTER (WHERE entity_type = 'ORDER') AS order_entity_id," 1634055732732, array_agg(error) FILTER (WHERE entity_type = 'ORDER') AS order_entity_error 1634055732732, FROM journal_records 1634055732732," WHERE journal_records.job_execution_id = jobExecutionId AND journal_records.source_id = recordId AND journal_records.entity_type NOT IN ('EDIFACT', 'INVOICE')" 1634055732732," GROUP BY journal_records.source_id, journal_records.source_record_order, journal_records.job_execution_id)" 1634055732732, AS records_actions 1634055732732, LEFT JOIN ( 1634055732732," SELECT journal_records.source_id, journal_records.title FROM journal_records" 1634055732732, WHERE journal_records.job_execution_id = jobExecutionId AND journal_records.source_id = recordId 1634055732732, ) AS rec_titles ON rec_titles.source_id = records_actions.source_id AND rec_titles.title IS NOT NULL 1634055732732, UNION 1634055732732," SELECT invoice_line_info.job_execution_id," 1634055732732," invoice_line_info.source_id," 1634055732732," records_actions.source_record_order," 1634055732732," invoice_line_info.title," 1634055732732, CASE WHEN edifact_errors_number != 0 THEN 'DISCARDED' 1634055732732," WHEN edifact_actions[array_length(edifact_actions, 1)] = 'CREATE' THEN 'CREATED'" 1634055732732," END AS source_record_action_status," 1634055732732," records_actions.source_record_error[1]," 1634055732732," null AS instance_action_status," 1634055732732," null AS instance_entity_id," 1634055732732," null AS instance_entity_hrid," 1634055732732," null AS instance_entity_error," 1634055732732," null AS holdings_action_status," 1634055732732," null AS holdings_entity_id," 1634055732732," null AS holdings_entity_hrid," 1634055732732," null AS holdings_entity_error," 1634055732732," null AS item_action_status," 1634055732732," null AS item_entity_id," 1634055732732," null AS item_entity_hrid," 1634055732732," null AS item_entity_error," 1634055732732," null AS order_action_status," 1634055732732," null AS order_entity_id," 1634055732732," null AS order_entity_hrid," 1634055732732," null AS order_entity_error," 1634055732732," get_entity_status(records_actions.invoice_actions, records_actions.invoice_errors_number) AS invoice_action_status," 1634055732732," records_actions.invoice_entity_id," 1634055732732," records_actions.invoice_entity_hrid," 1634055732732," records_actions.invoice_entity_error[1]," 1634055732732, CASE WHEN action_status = 'ERROR' THEN 'DISCARDED' 1634055732732, WHEN inv_line_actions = 'CREATE' THEN 'CREATED' 1634055732732," END AS invoice_line_action_status," 1634055732732," invoice_line_info.invoice_line_entity_id," 1634055732732," invoice_line_info.invoice_line_entity_hrid," 1634055732732, invoice_line_info.invoice_line_entity_error 1634055732732, FROM ( 1634055732732," SELECT journal_records.source_id," 1634055732732," journal_records.job_execution_id," 1634055732732," journal_records.title," 1634055732732," journal_records.action_type AS inv_line_actions," 1634055732732," action_status," 1634055732732," entity_hrid AS invoice_line_entity_hrid," 1634055732732," entity_id AS invoice_line_entity_id," 1634055732732, error AS invoice_line_entity_error 1634055732732, FROM journal_records 1634055732732, WHERE journal_records.id = recordId AND journal_records.entity_type = 'INVOICE' AND journal_records.title != 'INVOICE' 1634055732732, ) AS invoice_line_info 1634055732732, LEFT JOIN ( 1634055732732," SELECT journal_records.source_id," 1634055732732," journal_records.source_record_order," 1634055732732," array_agg(action_type) FILTER (WHERE entity_type = 'EDIFACT') AS edifact_actions," 1634055732732," count(journal_records.source_id) FILTER (WHERE entity_type = 'EDIFACT' AND journal_records.error != '') AS edifact_errors_number," 1634055732732," array_agg(error) FILTER (WHERE entity_type = 'EDIFACT') AS source_record_error," 1634055732732," array_agg(action_type) FILTER (WHERE entity_type = 'INVOICE' AND journal_records.title = 'INVOICE') AS invoice_actions," 1634055732732," count(journal_records.source_id) FILTER (WHERE entity_type = 'INVOICE' AND journal_records.title = 'INVOICE' AND journal_records.error != '') AS invoice_errors_number," 1634055732732," array_agg(entity_hrid) FILTER (WHERE entity_type = 'INVOICE' AND journal_records.title = 'INVOICE') AS invoice_entity_hrid," 1634055732732," array_agg(entity_id) FILTER (WHERE entity_type = 'INVOICE' AND journal_records.title = 'INVOICE') AS invoice_entity_id," 1634055732732, array_agg(error) FILTER (WHERE entity_type = 'INVOICE' AND journal_records.title = 'INVOICE') AS invoice_entity_error 1634055732732, FROM journal_records 1634055732732, WHERE journal_records.job_execution_id = jobExecutionId and entity_type = 'EDIFACT' OR journal_records.title = 'INVOICE' 1634055732732," GROUP BY journal_records.source_id, journal_records.job_execution_id, journal_records.source_record_order" 1634055732732, ) AS records_actions ON records_actions.source_id = invoice_line_info.source_id; 1634055732732,END; 1634055732732,$$ LANGUAGE plpgsql; 1634055732732,"16:22:12.732 [vert.x-eventloop-thread-1] INFO PostgresClient [1606969eqId] trying to execute: {} UPDATE fs09000000_mod_source_record_manager.job_executions SET jsonb = jsonb_set(jsonb, '{jobProfileInfo, dataType}', '""MARC""') WHERE jsonb -> 'jobProfileInfo' ->> 'dataType' IN ('MARC_BIB', 'MARC_AUTHORITY', 'MARC_HOLDINGS');" 1634055732791,"16:22:12.791 [vert.x-eventloop-thread-1] INFO PostgresClient [1607028eqId] Successfully executed UPDATE fs09000000_mod_source_record_manager.job_executions SET jsonb = jsonb_set(jsonb, '{jobProfileInfo, dataType}', '""MARC""') WHERE jsonb -> 'jobProfileInfo' ->> 'dataType' IN ('MARC_BIB', 'MARC_AUTHORITY', 'MARC_HOLDINGS');" 1634055732791,"16:22:12.791 [vert.x-eventloop-thread-1] INFO PostgresClient [1607028eqId] trying to execute: {} UPDATE fs09000000_mod_source_record_manager.job_executions SET jsonb = jsonb_set(jsonb, '{jobProfileSnapshotWrapper, content, dataType}', '""MARC""') WHERE jsonb -> 'jobProfileSnapshotWrapper' -> 'content' ->> 'dataType' IN ('MARC_BIB', 'MARC_AUTHORITY', 'MARC_HOLDINGS');" 1634055732850,"16:22:12.849 [vert.x-eventloop-thread-1] INFO PostgresClient [1607086eqId] Successfully executed UPDATE fs09000000_mod_source_record_manager.job_executions SET jsonb = jsonb_set(jsonb, '{jobProfileSnapshotWrapper, content, dataType}', '""MARC""') WHERE jsonb -> 'jobProfileSnapshotWrapper' -> 'content' ->> 'dataType' IN ('MARC_BIB', 'MARC_AUTHORITY', 'MARC_HOLDINGS');" 1634055732850,"16:22:12.850 [vert.x-eventloop-thread-1] INFO PostgresClient [1607087eqId] trying to execute: {} DO $$ BEGIN IF NOT EXISTS (SELECT 1 FROM pg_type t JOIN pg_enum e ON t.oid = e.enumtypid JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace WHERE t.typname = 'rule_type' AND n.nspname = '${myuniversity}_${mymodule}') THEN create type rule_type AS ENUM ('MARC_BIB', 'MARC_HOLDING'); END IF; END $$; ALTER TABLE mapping_rules ADD COLUMN IF NOT EXISTS record_type rule_type NOT NULL DEFAULT 'MARC_BIB';" 1634055732852,"16:22:12.852 [vert.x-eventloop-thread-1] ERROR PostgresClient [1607089eqId] { ""message"": ""type \""rule_type\"" already exists"", ""severity"": ""ERROR"", ""code"": ""42710"", ""where"": ""SQL statement \""create type rule_type AS ENUM ('MARC_BIB', 'MARC_HOLDING')\"" PL/pgSQL function inline_code_block line 1 at SQL statement"", ""file"": ""typecmds.c"", ""line"": ""1191"", ""routine"": ""DefineEnum"" }" 1634055732852,"io.vertx.pgclient.PgException: { ""message"": ""type \""rule_type\"" already exists"", ""severity"": ""ERROR"", ""code"": ""42710"", ""where"": ""SQL statement \""create type rule_type AS ENUM ('MARC_BIB', 'MARC_HOLDING')\"" PL/pgSQL function inline_code_block line 1 at SQL statement"", ""file"": ""typecmds.c"", ""line"": ""1191"", ""routine"": ""DefineEnum"" }" 1634055732852, at io.vertx.pgclient.impl.codec.ErrorResponse.toException(ErrorResponse.java:31) ~[ms.jar:?] 1634055732852, at io.vertx.pgclient.impl.codec.QueryCommandBaseCodec.handleErrorResponse(QueryCommandBaseCodec.java:57) ~[ms.jar:?] 1634055732852, at io.vertx.pgclient.impl.codec.PgDecoder.decodeError(PgDecoder.java:246) ~[ms.jar:?] 1634055732852, at io.vertx.pgclient.impl.codec.PgDecoder.decodeMessage(PgDecoder.java:131) [ms.jar:?] 1634055732852, at io.vertx.pgclient.impl.codec.PgDecoder.channelRead(PgDecoder.java:111) [ms.jar:?] 1634055732852, at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) [ms.jar:?] 1634055732852, at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [ms.jar:?] 1634055732852, at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [ms.jar:?] 1634055732853, at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [ms.jar:?] 1634055732853, at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [ms.jar:?] 1634055732853, at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [ms.jar:?] 1634055732853, at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [ms.jar:?] 1634055732853, at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [ms.jar:?] 1634055732853, at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) [ms.jar:?] 1634055732853, at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719) [ms.jar:?] 1634055732853, at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655) [ms.jar:?] 1634055732853, at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) [ms.jar:?] 1634055732853, at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [ms.jar:?] 1634055732853, at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [ms.jar:?] 1634055732853, at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [ms.jar:?] 1634055732853, at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [ms.jar:?] 1634055732853, at java.lang.Thread.run(Thread.java:829) [?:?] 1634055732853,16:22:12.853 [vert.x-eventloop-thread-1] INFO TenantAPI [1607090eqId] job 0fd326d8-add6-4ac7-8ea1-4fb05e664b9f completed 1634055732967,16:22:12.967 [vert.x-eventloop-thread-1] INFO RestRouting [1607204eqId] invoking getTenantByOperationId 1634055732971,16:22:12.971 [vert.x-eventloop-thread-1] INFO LogUtil [1607208eqId] 127.0.0.1:56714 GET /_/tenant/0fd326d8-add6-4ac7-8ea1-4fb05e664b9f null HTTP_1_1 200 745 4 tid=fs09000000 OK 1634055732979,16:22:12.979 [vert.x-eventloop-thread-1] INFO RestRouting [1607216eqId] invoking deleteTenantByOperationId 1634055732985,16:22:12.985 [vert.x-eventloop-thread-1] INFO LogUtil [1607222eqId] 127.0.0.1:56716 DELETE /_/tenant/0fd326d8-add6-4ac7-8ea1-4fb05e664b9f null HTTP_1_1 204 0 5 tid=fs09000000 No Content 1634055738970,16:22:18.970 [vert.x-eventloop-thread-1] INFO RestRouting [1613207eqId] invoking getAdminHealth 1634055738971,16:22:18.971 [vert.x-eventloop-thread-1] INFO LogUtil [1613208eqId] 127.0.0.1:56748 GET /admin/health null HTTP_1_1 200 4 1 tid=null OK 1634055739032,16:22:19.032 [vert.x-eventloop-thread-1] INFO RestRouting [1613269eqId] invoking getAdminHealth 1634055739032,16:22:19.032 [vert.x-eventloop-thread-1] INFO LogUtil [1613269eqId] 127.0.0.1:56758 GET /admin/health null HTTP_1_1 200 4 0 tid=null OK 1634055768975,16:22:48.974 [vert.x-eventloop-thread-1] INFO RestRouting [1643211eqId] invoking getAdminHealth 1634055768975,16:22:48.975 [vert.x-eventloop-thread-1] INFO LogUtil [1643212eqId] 127.0.0.1:56854 GET /admin/health null HTTP_1_1 200 4 1 tid=null OK 1634055769033,16:22:49.033 [vert.x-eventloop-thread-1] INFO RestRouting [1643270eqId] invoking getAdminHealth 1634055769033,16:22:49.033 [vert.x-eventloop-thread-1] INFO LogUtil [1643270eqId] 127.0.0.1:56864 GET /admin/health null HTTP_1_1 200 4 0 tid=null OK