Skip to content

Commit

Permalink
Merge pull request #62 from hotwax/create-product
Browse files Browse the repository at this point in the history
Removed polling jobs for product feeds, added enum data for product feeds, added service job to consume system messages in sync mode.
  • Loading branch information
mridulpathak authored Feb 13, 2025
2 parents 31d222c + 94fed3e commit 2d8eb0d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion component.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<component xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/moqui-conf-3.xsd"
name="oms" version="1.0.2">
name="oms" version="1.0.3">
<!-- no dependencies -->
</component>
19 changes: 9 additions & 10 deletions data/SeedData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<!-- SystemMessageType data for Error Feed file -->
<moqui.service.message.SystemMessageType systemMessageTypeId="FeedErrorFile"/>

<!-- EnumerationType for OMS system message type enum and relationship -->
<moqui.basic.EnumerationType description="OMS System Message Type Enum" enumTypeId="OMSMessageTypeEnum"/>

<!-- TODO: Add receivePath -->
<!-- SystemMessageType data for consuming New Products Feed -->
<moqui.service.message.SystemMessageType systemMessageTypeId="NewProductsFeed"
Expand All @@ -16,6 +19,7 @@
receiveMovePath="/home/${sftpUsername}/hotwax/ProductsFeed/archive"
sendService="co.hotwax.oms.product.ProductServices.create#ProductAndVariants"
sendPath="${contentRoot}/oms/NewProductsFeed"/>
<moqui.basic.Enumeration description="New Products Feed" enumId="NewProductsFeed" enumTypeId="OMSMessageTypeEnum"/>

<!-- TODO: Add receivePath -->
<!-- SystemMessageType data for consuming Update Products Feed -->
Expand All @@ -28,17 +32,12 @@
receiveMovePath="/home/${sftpUsername}/hotwax/UpdatedProductsFeed/archive"
sendService="co.hotwax.oms.product.ProductServices.update#ProductAndVariants"
sendPath="${contentRoot}/oms/ProductUpdatesFeed"/>
<moqui.basic.Enumeration description="Products Updates Feed" enumId="ProductUpdatesFeed" enumTypeId="OMSMessageTypeEnum"/>

<!-- ServiceJob data for polling New Products Feed from SFTP -->
<moqui.service.job.ServiceJob jobName="poll_SystemMessageFileSftp_NewProductsFeed" description="Poll New Products Feed"
serviceName="co.hotwax.ofbiz.SystemMessageServices.poll#SystemMessageFileSftp" cronExpression="0 0 * * * ?" paused="Y">
<parameters parameterName="systemMessageTypeId" parameterValue="NewProductsFeed"/>
</moqui.service.job.ServiceJob>

<!-- ServiceJob data for polling Update Products Feed from SFTP -->
<moqui.service.job.ServiceJob jobName="poll_SystemMessageFileSftp_ProductUpdatesFeed" description="Poll Product Updates Feed"
serviceName="co.hotwax.ofbiz.SystemMessageServices.poll#SystemMessageFileSftp" cronExpression="0 0 * * * ?" paused="Y">
<parameters parameterName="systemMessageTypeId" parameterValue="ProductUpdatesFeed"/>
<moqui.service.job.ServiceJob jobName="consume_AllReceivedSystemMessages_oms" description="Consume All Received SystemMessages for OMS"
serviceName="org.moqui.impl.SystemMessageServices.consume#AllReceivedSystemMessages" cronExpression="0 0/15 * * * ?" paused="Y">
<parameters parameterName="mode" parameterValue="sync"/>
<parameters parameterName="systemMessageTypeIds" parameterValue="NewProductsFeed,ProductUpdatesFeed"/>
</moqui.service.job.ServiceJob>

</entity-facade-xml>
2 changes: 1 addition & 1 deletion data/UpgradeData_v1.0.1.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<entity-facade-xml type="ext-upgrade-upcoming">
<entity-facade-xml type="ext-upgrade-v1.0.1">
<dataDocuments dataDocumentId="OmsProduct" indexName="oms" documentName="Product"
primaryEntityName="org.apache.ofbiz.product.product.Product" documentTitle="ProductNameTemplate">
<fields fieldSeqId="01" fieldPath="productId"/>
Expand Down
13 changes: 13 additions & 0 deletions data/UpgradeData_v1.0.3.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<entity-facade-xml type="ext-upgrade-v1.0.3">
<!-- EnumerationType for OMS system message type enum and relationship -->
<moqui.basic.EnumerationType description="OMS System Message Type Enum" enumTypeId="OMSMessageTypeEnum"/>
<moqui.basic.Enumeration description="New Products Feed" enumId="NewProductsFeed" enumTypeId="OMSMessageTypeEnum"/>
<moqui.basic.Enumeration description="Products Updates Feed" enumId="ProductUpdatesFeed" enumTypeId="OMSMessageTypeEnum"/>

<moqui.service.job.ServiceJob jobName="consume_AllReceivedSystemMessages_oms" description="Consume All Received SystemMessages for OMS"
serviceName="org.moqui.impl.SystemMessageServices.consume#AllReceivedSystemMessages" cronExpression="0 0/15 * * * ?" paused="Y">
<parameters parameterName="mode" parameterValue="sync"/>
<parameters parameterName="systemMessageTypeIds" parameterValue="NewProductsFeed,ProductUpdatesFeed"/>
</moqui.service.job.ServiceJob>
</entity-facade-xml>

0 comments on commit 2d8eb0d

Please sign in to comment.