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

Refactor system message type parameter entity #70

Open
wants to merge 28 commits into
base: main
Choose a base branch
from

Conversation

Nishtha-Jain-1119
Copy link
Contributor

  1. Created a new EnumType called "SystemMessageTypeParameter" and an associated Enumeration for all parameterNames.
  2. For systemMessageTypeId created an Enumeration of type "ShopifyMessageTypeEnum", if doesn't exist already.
  3. Associated parameters to ShopifyMessageTypeEnum through EnumGroupMember entity.
  4. Changed primary key of SystemMessageTypeParameter entity.
  5. Added data in ShopifyConfigDemoData.xml
  6. Added UpgradeData_upcoming.xml with new changes.

<!-- 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"/>
Copy link
Contributor

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.

<!-- 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"/>
Copy link
Contributor

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.


<!-- 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"/>
Copy link
Contributor

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.

@@ -72,7 +110,7 @@ under the License.
receiveResponseEnumId="MsgRrMove"
receiveMovePath=""
sendPath="${contentRoot}/shopify/ProductTagsFeed">
<parameters parameterName="consumeSmrId" parameterValue="" systemMessageRemoteId=""/>

Copy link
Contributor

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.

<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"/>
Copy link
Contributor

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.

<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"/>
Copy link
Contributor

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).

@@ -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=""/> -->
Copy link
Contributor

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
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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,"

Copy link
Contributor

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.

Copy link
Contributor

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.

@dixitdeepak dixitdeepak changed the base branch from develop to main December 16, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants