-
Notifications
You must be signed in to change notification settings - Fork 13
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
Refactor system message type parameter entity #70
base: main
Are you sure you want to change the base?
Refactor system message type parameter entity #70
Conversation
Nishtha-Jain-1119
commented
Mar 21, 2024
- Created a new EnumType called "SystemMessageTypeParameter" and an associated Enumeration for all parameterNames.
- For systemMessageTypeId created an Enumeration of type "ShopifyMessageTypeEnum", if doesn't exist already.
- Associated parameters to ShopifyMessageTypeEnum through EnumGroupMember entity.
- Changed primary key of SystemMessageTypeParameter entity.
- Added data in ShopifyConfigDemoData.xml
- Added UpgradeData_upcoming.xml with new changes.
data/ShopifySetupSeedData.xml
Outdated
<!-- Parent SystemMessageType record for incoming and outgoing local feed file system message types --> | ||
<moqui.service.message.SystemMessageType systemMessageTypeId="LocalFeedFile" description="Local Feed File"/> | ||
|
||
<moqui.basic.Enumeration description="Local Feed File" enumId="LocalFeedFile" enumTypeId="ShopifyMessageTypeEnum"/> |
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.
Don't need enum for this, it's a ParentType to other system messages.
data/ShopifySetupSeedData.xml
Outdated
<!-- Parent SystemMessageType for all the shopify bulk import mutation system message types --> | ||
<moqui.service.message.SystemMessageType systemMessageTypeId="ShopifyBulkImport" description="Parent SystemMessageType for Shopify Bulk Imports"/> | ||
<moqui.basic.Enumeration description="Parent SystemMessageType for Shopify Bulk Imports" enumId="ShopifyBulkImport" enumTypeId="ShopifyMessageTypeEnum"/> |
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.
Don't need enum for this, it's a ParentType to other system messages.
data/ShopifySetupSeedData.xml
Outdated
|
||
<!-- Parent SystemMessageType for all the shopify bulk query system message types --> | ||
<moqui.service.message.SystemMessageType systemMessageTypeId="ShopifyBulkQuery" description="Parent SystemMessageType for Shopify Bulk Query"/> | ||
<moqui.basic.Enumeration description="Parent SystemMessageType for Shopify Bulk Query" enumId="ShopifyBulkQuery" enumTypeId="ShopifyMessageTypeEnum"/> |
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.
Don't need enum for this, it's a ParentType to other system messages.
data/ShopifySetupSeedData.xml
Outdated
@@ -72,7 +110,7 @@ under the License. | |||
receiveResponseEnumId="MsgRrMove" | |||
receiveMovePath="" | |||
sendPath="${contentRoot}/shopify/ProductTagsFeed"> | |||
<parameters parameterName="consumeSmrId" parameterValue="" systemMessageRemoteId=""/> | |||
|
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.
Seems to be an extra line.
data/ShopifySetupSeedData.xml
Outdated
<moqui.basic.Enumeration enumId="namespaces" enumTypeId="SystemMessageTypeParameter"/> | ||
|
||
<!-- EnumerationGroupMember data for system message type and system message parameter --> | ||
<moqui.basic.EnumGroupMember enumGroupEnumId="OMSFulfillmentFeed" enumId="consumeSmrId" sequenceNum="1"/> |
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.
Move each of these EnumGroupRecords with respective SystemMessageType and Enumeration records.
data/UpgradeData_Upcoming.xml
Outdated
<entity-facade-xml type="ext-upgrade-upcoming"> | ||
<!-- EnumerationType for Shopify system message type enum and relationship --> | ||
<moqui.basic.Enumeration description="Local Feed File" enumId="LocalFeedFile" enumTypeId="ShopifyMessageTypeEnum"/> |
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.
We don't need Enumeration for parent SystemMessageType(s).
data/UpgradeData_Upcoming.xml
Outdated
@@ -9,7 +52,7 @@ | |||
sendPath="component://shopify-connector/template/graphQL/BulkOrderDiscountCodeApplQuery.ftl" | |||
consumeServiceName="co.hotwax.shopify.system.ShopifySystemMessageServices.consume#BulkOperationResult" | |||
receivePath="${contentRoot}/shopify/BulkOrderDiscountCodeAppl/BulkOperationResult-${systemMessageId}-${remoteMessageId}-${nowDate}.jsonl"> | |||
<parameters parameterName="consumeSmrId" parameterValue="" systemMessageRemoteId=""/> | |||
<!-- <parameters parameterName="consumeSmrId" parameterValue="" systemMessageRemoteId=""/> --> |
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.
We could remove this parameter here as we have added it in demo data.
## Steps for migration of Database | ||
#### To make SYSTEM_MESSAGE_REMOTE_ID a part of the Primary key of SystemMessageTypeParameter entity. | ||
|
||
1. Stop the server |
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.
Remove this step.
```sql | ||
desc SYSTEM_MESSAGE_TYPE_PARAMETER; | ||
``` | ||
5. Restart the server. |
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.
Remove this step.
@@ -0,0 +1,22 @@ | |||
## Steps for migration of Database | |||
#### To make SYSTEM_MESSAGE_REMOTE_ID a part of the Primary key of SystemMessageTypeParameter entity. |
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.
Add following "Perform following migration steps before upgrading,"
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.
Change the file name to UpgradeSteps_Upcoming.md
No need to add v1.3.3 directory at this point, move the file to root "upgrade" directory.
upgrade/UpgradeSteps_Upcoming.md
Outdated
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.
We should rename and move file to upgrade/upcoming/UpgradeSteps.md to follow the pattern.
…://github.com/Nishtha-Jain-1119/mantle-shopify-connector into refactor-system_message_type_parameter-entity