-
Notifications
You must be signed in to change notification settings - Fork 9
Bugfix/atr 936 dev remove noise alerts for px1065 #658
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
Open
SENya1990
wants to merge
7
commits into
dev
Choose a base branch
from
bugfix/ATR-936-dev-remove-noise-alerts-for-PX1065
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2e7bfab
ATR-936: removed reporting of PX1065 for DAC properties from base DACs
SENya1990 8912427
ATR-936: fixed code fix registration logic for PX1065
SENya1990 60ab86f
ATR-936: updated PX1065 unit test for DAC in the external DLL
SENya1990 83ce907
ATR-936: updated unit tests for PX1065 for scenarios when property wi…
SENya1990 f824f5a
ATR-936: updated PX1065 docs
SENya1990 68416cf
ATR-936: updated documentation for PX1080 with the latest information…
SENya1990 e7d2fb4
ATR-936: Simplify note about diagnostic
EAndrosova File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,17 @@ This document describes the PX1080 diagnostic. | |
| | PX1080 | Data view delegates should not start long-running operations. | Error | Unavailable | | ||
|
|
||
| ## Diagnostic Description | ||
| Data view delegates should not start long-running operations. A data view delegate is designed to prepare a data set to display it in the UI. The result of the data view delegate is returned before the end of the long-running operation. | ||
| Data view delegates should not start long-running operations. A data view delegate is designed to prepare a data set to display it in the UI. If the results of the long-running operation are not awaited synchronously, | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @EAndrosova please review the updates in PX1080 |
||
| then the results of the data view delegate are returned before the end of the long-running operation. This scenario is not supported by the Acumatica Framework and may lead to unexpected behavior. | ||
|
|
||
| However, even if the results of the long-running operation are awaited synchronously, starting a long-running operation from a data view delegate is still strongly discouraged due to the following reasons: | ||
| - A synchronous wait until the data is loaded from the external service is bad for the user experience. | ||
| - The paging mechanisms of the Acumatica Framework may work incorrectly. | ||
| - The approach does not scale well. There are no observable problems when there are only 10-50 records retrieved from the external service. However, the solution rapidly deteriorates when the amount of external | ||
| data grows to something like 50 000 - 100 000. Such cases were observed by Acumatica support. | ||
| - Any disruption of the external service (for example, some trivial issues after OS upgrade on the server) will prevent the affected Acumatica screen from opening. Neither Acumatica, nor the customization authors | ||
| can guarantee the stability of the external service. Such situations take a lot of time and effort for investigation keeping the customer annoyed and frustrated with Acumatica even though the real problem was caused | ||
| by another service. | ||
|
|
||
| Long-running operations are started by the following APIs: | ||
| - `PXLongOperation.StartOperation` methods | ||
|
|
@@ -17,6 +27,11 @@ Long-running operations are started by the following APIs: | |
|
|
||
| To prevent the error from occurring, you should remove the code that starts a long-running operation from the data view delegate and rework the related business logic. | ||
|
|
||
| The alternative approach recommended by the Acumatica ISV Support team: | ||
| - If there is not much data to retrieve from the external service, then you can use a virtual DAC which is filled by clicking on an action. | ||
| - If there is a lot of data to retrieve from the external service, then you keep the data locally in the database. You should obtain the updates in the external service's data with a click on an action, | ||
| and synchronize them with the locally stored data. The synchronization of data can be also done via the push notifications mechanism. | ||
|
|
||
| ## Example of Incorrect Code | ||
|
|
||
| ```C# | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EAndrosova please review changes