Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metasfresh - procurement audit #12600

Merged

Conversation

teosarca
Copy link
Member

@teosarca teosarca commented Feb 24, 2022

Audit on metasfresh side

select * from rabbitmq_message_audit;

image

Audit on procurement side

select * from rabbitmq_audit_entry;

image

Copy link
Member

@metas-ts metas-ts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have some remarks for a follow-up..will put them into an issue..
LE: we should also have a scheduled process that deletes audit-records past a certain age

@NonNull Object content;
@Nullable String eventUUID;
@Nullable String relatedEventUUID;
@Nullable IHostIdentifier host;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it would make sense to also have a property for indicating the service on which the "in" or "out" happened (app or webapi).
Then we could also use this for intra-metasfresh-auditing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, we might add a "status", like success, warning or error..and in the case of error we might have an AD_Issue_ID

}
catch (final JsonProcessingException e)
{
logger.warn("Failed converting `{}` to JSON. Returning toString().", content, e);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here, instead of cluttering the console, we might ceate the entry with status="Warn" and an ad_issue

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shall not happen

}
catch (final Exception ex)
{
logger.warn("Failed converting message to JSON: {}. Returning toString().", message, ex);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here we could again create an ad_issue and create the record with status="Warn"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shall not happen

{
return;
}

final PutBPartnersRequest syncBPartnersRequest = PutBPartnersRequest.of(syncBPartner);
agent.syncBPartners(syncBPartnersRequest);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should record this in the export audit log, and make sure to have a reference between it and the RabbitMQ_Message_Audit record

@teosarca teosarca merged commit 7f2ca58 into scary_plum_hotfix Feb 25, 2022
@teosarca teosarca deleted the scary_plum_hotfix_procurement_rabbitmq_audit branch February 25, 2022 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants