You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Bilgin Ibryam (JIRA)" <ji...@apache.org> on 2007/08/08 15:14:59 UTC

[jira] Created: (OFBIZ-1189) Cannot approve digital product orders

Cannot approve digital product orders
-------------------------------------

                 Key: OFBIZ-1189
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1189
             Project: OFBiz
          Issue Type: Bug
          Components: order
    Affects Versions: SVN trunk
            Reporter: Bilgin Ibryam
             Fix For: SVN trunk


Hi all,
There is a bug when approving orders that contains only digital products. 
If you create an order that contains only digital products and then try to approve it you will get ERROR : Could not change order status ; status is not a valid change.: [ORDER_COMPLETED] -> [ORDER_APPROVED]
The reason is that there is seca rule and checkDigitalItemFulfillment service will put all the items to ITEM_COMPLETED status. Then another seca calls checkOrderItemStatus and the order is also in put in ORDER_COMPLETED status. All the items are completed and the order is also completed, everything looks fine, but the service called in the beginning to approve the order generates the error [ORDER_COMPLETED] -> [ORDER_APPROVED] is not a valid change....
Any ideas what should be the flow in approving and completing an order in cases where all items are completed while approving ?

Regards,
Bilgin Ibryam

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1189) Cannot approve digital product orders

Posted by "Enrique Ruibal (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588401#action_12588401 ] 

Enrique Ruibal commented on OFBIZ-1189:
---------------------------------------

I think currently there is an issue with this default setting as the order is only approved (and completed) for a digital good if and only if it has been previously paid for, wich seems a bit odd compared to real business situations where a service order is just issued and paid for after a period of time has elapsed, there is a broad discussion here

http://www.nabble.com/Can%27t-Approve-Orders-with-service-products-to16242722.html#a16659894




> Cannot approve digital product orders
> -------------------------------------
>
>                 Key: OFBIZ-1189
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1189
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Bilgin Ibryam
>            Assignee: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: order.patch, order.patch
>
>
> Hi all,
> There is a bug when approving orders that contains only digital products. 
> If you create an order that contains only digital products and then try to approve it you will get ERROR : Could not change order status ; status is not a valid change.: [ORDER_COMPLETED] -> [ORDER_APPROVED]
> The reason is that there is seca rule and checkDigitalItemFulfillment service will put all the items to ITEM_COMPLETED status. Then another seca calls checkOrderItemStatus and the order is also in put in ORDER_COMPLETED status. All the items are completed and the order is also completed, everything looks fine, but the service called in the beginning to approve the order generates the error [ORDER_COMPLETED] -> [ORDER_APPROVED] is not a valid change....
> Any ideas what should be the flow in approving and completing an order in cases where all items are completed while approving ?
> Regards,
> Bilgin Ibryam

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1189) Cannot approve digital product orders

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux updated OFBIZ-1189:
-----------------------------------

    Attachment: order.patch

Hi Bilgin,

IMHO it would be better if we would clearly deal with the problem at hand. Creating an order StatusValidChange from completed to approved seems not a solution at all. Please see attached patch. I'm not sure it's the better solution though. Just a quick workaound... 



> Cannot approve digital product orders
> -------------------------------------
>
>                 Key: OFBIZ-1189
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1189
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Bilgin Ibryam
>             Fix For: SVN trunk
>
>         Attachments: order.patch, order.patch
>
>
> Hi all,
> There is a bug when approving orders that contains only digital products. 
> If you create an order that contains only digital products and then try to approve it you will get ERROR : Could not change order status ; status is not a valid change.: [ORDER_COMPLETED] -> [ORDER_APPROVED]
> The reason is that there is seca rule and checkDigitalItemFulfillment service will put all the items to ITEM_COMPLETED status. Then another seca calls checkOrderItemStatus and the order is also in put in ORDER_COMPLETED status. All the items are completed and the order is also completed, everything looks fine, but the service called in the beginning to approve the order generates the error [ORDER_COMPLETED] -> [ORDER_APPROVED] is not a valid change....
> Any ideas what should be the flow in approving and completing an order in cases where all items are completed while approving ?
> Regards,
> Bilgin Ibryam

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1189) Cannot approve digital product orders

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588474#action_12588474 ] 

David E. Jones commented on OFBIZ-1189:
---------------------------------------

What you're describing is a difference between service products and digital products. A new indicator should be added to the ProductType entity to represent service products and the relevant code should be added or changed to look at this indicator and behave accordingly, just like we do for digital and physical goods (neither of which are service products).

> Cannot approve digital product orders
> -------------------------------------
>
>                 Key: OFBIZ-1189
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1189
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Bilgin Ibryam
>            Assignee: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: order.patch, order.patch
>
>
> Hi all,
> There is a bug when approving orders that contains only digital products. 
> If you create an order that contains only digital products and then try to approve it you will get ERROR : Could not change order status ; status is not a valid change.: [ORDER_COMPLETED] -> [ORDER_APPROVED]
> The reason is that there is seca rule and checkDigitalItemFulfillment service will put all the items to ITEM_COMPLETED status. Then another seca calls checkOrderItemStatus and the order is also in put in ORDER_COMPLETED status. All the items are completed and the order is also completed, everything looks fine, but the service called in the beginning to approve the order generates the error [ORDER_COMPLETED] -> [ORDER_APPROVED] is not a valid change....
> Any ideas what should be the flow in approving and completing an order in cases where all items are completed while approving ?
> Regards,
> Bilgin Ibryam

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1189) Cannot approve digital product orders

Posted by "Bilgin Ibryam (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bilgin Ibryam updated OFBIZ-1189:
---------------------------------

    Attachment: order.patch

the patch

> Cannot approve digital product orders
> -------------------------------------
>
>                 Key: OFBIZ-1189
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1189
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Bilgin Ibryam
>             Fix For: SVN trunk
>
>         Attachments: order.patch
>
>
> Hi all,
> There is a bug when approving orders that contains only digital products. 
> If you create an order that contains only digital products and then try to approve it you will get ERROR : Could not change order status ; status is not a valid change.: [ORDER_COMPLETED] -> [ORDER_APPROVED]
> The reason is that there is seca rule and checkDigitalItemFulfillment service will put all the items to ITEM_COMPLETED status. Then another seca calls checkOrderItemStatus and the order is also in put in ORDER_COMPLETED status. All the items are completed and the order is also completed, everything looks fine, but the service called in the beginning to approve the order generates the error [ORDER_COMPLETED] -> [ORDER_APPROVED] is not a valid change....
> Any ideas what should be the flow in approving and completing an order in cases where all items are completed while approving ?
> Regards,
> Bilgin Ibryam

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1189) Cannot approve digital product orders

Posted by "Bilgin Ibryam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525663 ] 

Bilgin Ibryam commented on OFBIZ-1189:
--------------------------------------

Hi David, i use latest trunk revision and the bug is still not fixed.
Which revision (status code refactoring) should fix it ?

> Cannot approve digital product orders
> -------------------------------------
>
>                 Key: OFBIZ-1189
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1189
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Bilgin Ibryam
>            Assignee: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: order.patch, order.patch
>
>
> Hi all,
> There is a bug when approving orders that contains only digital products. 
> If you create an order that contains only digital products and then try to approve it you will get ERROR : Could not change order status ; status is not a valid change.: [ORDER_COMPLETED] -> [ORDER_APPROVED]
> The reason is that there is seca rule and checkDigitalItemFulfillment service will put all the items to ITEM_COMPLETED status. Then another seca calls checkOrderItemStatus and the order is also in put in ORDER_COMPLETED status. All the items are completed and the order is also completed, everything looks fine, but the service called in the beginning to approve the order generates the error [ORDER_COMPLETED] -> [ORDER_APPROVED] is not a valid change....
> Any ideas what should be the flow in approving and completing an order in cases where all items are completed while approving ?
> Regards,
> Bilgin Ibryam

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1189) Cannot approve digital product orders

Posted by "Bilgin Ibryam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528360 ] 

Bilgin Ibryam commented on OFBIZ-1189:
--------------------------------------

The ECA event type i was expecting "global-commit-post-run" is just committed at r576815   :)
Now we can call "checkDigitalItemFulfillment' (the serviec that completes approved order items) this way and the bug is fixed :
Index: applications/order/servicedef/secas.xml
===================================================================
--- applications/order/servicedef/secas.xml	(revision 576837)
+++ applications/order/servicedef/secas.xml	(working copy)
@@ -45,7 +45,7 @@
         <condition field-name="statusId" operator="equals" value="ITEM_APPROVED"/>
         <action service="checkOrderItemStatus" mode="sync"/>
     </eca>
-    <eca service="changeOrderItemStatus" event="commit">
+    <eca service="changeOrderItemStatus" event="global-commit-post-run">
         <condition field-name="statusId" operator="equals" value="ITEM_APPROVED"/>
         <action service="checkDigitalItemFulfillment" mode="sync"/>
     </eca>

Now if we try to approve an order with only digital products, the order will be approved.
Actually the order (and all the items)  are completed, but they are completed after some time (2 seconds on my machine )and we have to refresh the order view page to see that order is completed.
I was expecting that with mode="sync" i will see the completed status of the order without needing to refresh (not refresh exactly, refresh will try to approve the order again. clicking on the order id will reload the page).



> Cannot approve digital product orders
> -------------------------------------
>
>                 Key: OFBIZ-1189
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1189
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Bilgin Ibryam
>            Assignee: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: order.patch, order.patch
>
>
> Hi all,
> There is a bug when approving orders that contains only digital products. 
> If you create an order that contains only digital products and then try to approve it you will get ERROR : Could not change order status ; status is not a valid change.: [ORDER_COMPLETED] -> [ORDER_APPROVED]
> The reason is that there is seca rule and checkDigitalItemFulfillment service will put all the items to ITEM_COMPLETED status. Then another seca calls checkOrderItemStatus and the order is also in put in ORDER_COMPLETED status. All the items are completed and the order is also completed, everything looks fine, but the service called in the beginning to approve the order generates the error [ORDER_COMPLETED] -> [ORDER_APPROVED] is not a valid change....
> Any ideas what should be the flow in approving and completing an order in cases where all items are completed while approving ?
> Regards,
> Bilgin Ibryam

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OFBIZ-1189) Cannot approve digital product orders

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David E. Jones closed OFBIZ-1189.
---------------------------------

    Resolution: Fixed
      Assignee: David E. Jones

This was fixed a while back with the status code refactoring 

> Cannot approve digital product orders
> -------------------------------------
>
>                 Key: OFBIZ-1189
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1189
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Bilgin Ibryam
>            Assignee: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: order.patch, order.patch
>
>
> Hi all,
> There is a bug when approving orders that contains only digital products. 
> If you create an order that contains only digital products and then try to approve it you will get ERROR : Could not change order status ; status is not a valid change.: [ORDER_COMPLETED] -> [ORDER_APPROVED]
> The reason is that there is seca rule and checkDigitalItemFulfillment service will put all the items to ITEM_COMPLETED status. Then another seca calls checkOrderItemStatus and the order is also in put in ORDER_COMPLETED status. All the items are completed and the order is also completed, everything looks fine, but the service called in the beginning to approve the order generates the error [ORDER_COMPLETED] -> [ORDER_APPROVED] is not a valid change....
> Any ideas what should be the flow in approving and completing an order in cases where all items are completed while approving ?
> Regards,
> Bilgin Ibryam

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1189) Cannot approve digital product orders

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518476 ] 

David E. Jones commented on OFBIZ-1189:
---------------------------------------

I made some changes to this stuff recently because the way it was written broke the ProductStore.headerApprovedStatus feature, and had some general weirdness in it.

Which revision exactly are you using?

Also, could you attach a stack trace or more log info related to the error?

> Cannot approve digital product orders
> -------------------------------------
>
>                 Key: OFBIZ-1189
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1189
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Bilgin Ibryam
>             Fix For: SVN trunk
>
>
> Hi all,
> There is a bug when approving orders that contains only digital products. 
> If you create an order that contains only digital products and then try to approve it you will get ERROR : Could not change order status ; status is not a valid change.: [ORDER_COMPLETED] -> [ORDER_APPROVED]
> The reason is that there is seca rule and checkDigitalItemFulfillment service will put all the items to ITEM_COMPLETED status. Then another seca calls checkOrderItemStatus and the order is also in put in ORDER_COMPLETED status. All the items are completed and the order is also completed, everything looks fine, but the service called in the beginning to approve the order generates the error [ORDER_COMPLETED] -> [ORDER_APPROVED] is not a valid change....
> Any ideas what should be the flow in approving and completing an order in cases where all items are completed while approving ?
> Regards,
> Bilgin Ibryam

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1189) Cannot approve digital product orders

Posted by "Bilgin Ibryam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518668 ] 

Bilgin Ibryam commented on OFBIZ-1189:
--------------------------------------

David,

I tested it with r562836 and it works fine. 
Looks like it is affected from your changes  (ProductStore.headerApprovedStatus feature r562843).
But the changes you did are  correct. The error occurs because the seca approves the items, approves the order, completes the items and completes the order. Then the first started service for approving returns the error.
In OrderServices.java:1973 i see that when we try to change the order status to the same status, we are not returning error but only a warning log and success .
So the solution i offer is similar: Instead of returning error when the order_status_change is not valid, we can log warning and return success. What you think ?

> Cannot approve digital product orders
> -------------------------------------
>
>                 Key: OFBIZ-1189
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1189
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Bilgin Ibryam
>             Fix For: SVN trunk
>
>         Attachments: order.patch
>
>
> Hi all,
> There is a bug when approving orders that contains only digital products. 
> If you create an order that contains only digital products and then try to approve it you will get ERROR : Could not change order status ; status is not a valid change.: [ORDER_COMPLETED] -> [ORDER_APPROVED]
> The reason is that there is seca rule and checkDigitalItemFulfillment service will put all the items to ITEM_COMPLETED status. Then another seca calls checkOrderItemStatus and the order is also in put in ORDER_COMPLETED status. All the items are completed and the order is also completed, everything looks fine, but the service called in the beginning to approve the order generates the error [ORDER_COMPLETED] -> [ORDER_APPROVED] is not a valid change....
> Any ideas what should be the flow in approving and completing an order in cases where all items are completed while approving ?
> Regards,
> Bilgin Ibryam

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (OFBIZ-1189) Cannot approve digital product orders

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David E. Jones reopened OFBIZ-1189:
-----------------------------------


> Cannot approve digital product orders
> -------------------------------------
>
>                 Key: OFBIZ-1189
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1189
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Bilgin Ibryam
>            Assignee: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: order.patch, order.patch
>
>
> Hi all,
> There is a bug when approving orders that contains only digital products. 
> If you create an order that contains only digital products and then try to approve it you will get ERROR : Could not change order status ; status is not a valid change.: [ORDER_COMPLETED] -> [ORDER_APPROVED]
> The reason is that there is seca rule and checkDigitalItemFulfillment service will put all the items to ITEM_COMPLETED status. Then another seca calls checkOrderItemStatus and the order is also in put in ORDER_COMPLETED status. All the items are completed and the order is also completed, everything looks fine, but the service called in the beginning to approve the order generates the error [ORDER_COMPLETED] -> [ORDER_APPROVED] is not a valid change....
> Any ideas what should be the flow in approving and completing an order in cases where all items are completed while approving ?
> Regards,
> Bilgin Ibryam

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1189) Cannot approve digital product orders

Posted by "Bilgin Ibryam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518517 ] 

Bilgin Ibryam commented on OFBIZ-1189:
--------------------------------------

I am using latest ofbiz trunk r563918, here is the log

     [java] 2007-08-08 20:21:54,156 (http-0.0.0.0-8443-Processor2) [     ControlServlet.java:93 :INFO ] The character encoding of the request is: [null]. The character encoding we will use for the request and response is: [UTF-8]
     [java] 2007-08-08 20:21:54,250 (http-0.0.0.0-8443-Processor2) [    ConfigXMLReader.java:558:INFO ] ConfigMap Created: (4) records in 0.0s
     [java] 2007-08-08 20:21:54,250 (http-0.0.0.0-8443-Processor2) [    ConfigXMLReader.java:716:INFO ] HandlerMap Created: (4) view handlers and (6) request/event handlers in 0.0s
     [java] 2007-08-08 20:21:54,265 (http-0.0.0.0-8443-Processor2) [    ConfigXMLReader.java:291:INFO ] RequestMap Created: (299) records in 0.015s
     [java] 2007-08-08 20:21:54,281 (http-0.0.0.0-8443-Processor2) [    ConfigXMLReader.java:385:INFO ] ViewMap Created: (132) records in 0.0s
     [java] 2007-08-08 20:21:54,281 (http-0.0.0.0-8443-Processor2) [     RequestHandler.java:239:INFO ] [Processing Request]: changeOrderStatus sessionId=C79B19660A0979D9DE3D5BEF621785D9.jvm1
     [java] 2007-08-08 20:21:54,593 (http-0.0.0.0-8443-Processor2) [      EntityEcaRule.java:111:INFO ] Running Entity ECA Service: checkCreateOrderRequirement, triggered by rule on Entity: OrderItem
     [java] 2007-08-08 20:21:54,734 (http-0.0.0.0-8443-Processor2) [   PrimaryKeyFinder.java:124:INFO ] Returning null because found incomplete primary key in find: [GenericEntity:Product]
     [java] 2007-08-08 20:21:54,937 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:112:INFO ] Got false for condition: [null][][statusId][equals][null][ITEM_CANCELLED][true][String][]
     [java] 2007-08-08 20:21:54,953 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:112:INFO ] Got false for condition: [null][][statusId][equals][null][ITEM_COMPLETED][true][String][]
     [java] 2007-08-08 20:21:54,953 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:137:INFO ] Running Service ECA Service: checkOrderItemStatus, triggered by rule on Service: changeOrderItemStatus
     [java] 2007-08-08 20:21:55,500 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:112:INFO ] Got false for condition: [null][][statusId][equals][null][ORDER_CANCELLED][true][String][]
     [java] 2007-08-08 20:21:55,500 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:112:INFO ] Got false for condition: [null][][statusId][equals][null][ORDER_COMPLETED][true][String][]
     [java] 2007-08-08 20:21:55,500 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:112:INFO ] Got false for condition: [null][][statusId][equals][null][ORDER_COMPLETED][true][String][]
     [java] 2007-08-08 20:21:55,500 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:137:INFO ] Running Service ECA Service: updateContentSubscriptionByOrder, triggered by rule on Service: changeOrderStatus
     [java] 2007-08-08 20:21:55,546 (http-0.0.0.0-8443-Processor2) [ContentManagementServices.java:1577:INFO ] In updateContentSubscriptionByOrder service with orderId: WSCO10000
     [java] 2007-08-08 20:21:55,656 (http-0.0.0.0-8443-Processor2) [   GenericDelegator.java:2295:WARN ] Tried to put a value of the OrderHeader entity in the BY PRIMARY KEY cache but this entity has never-cache set to true, not caching.
     [java] 2007-08-08 20:21:55,750 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:137:INFO ] Running Service ECA Service: processExtendSubscriptionByOrder, triggered by rule on Service: changeOrderStatus
     [java] 2007-08-08 20:21:55,828 (http-0.0.0.0-8443-Processor2) [SubscriptionServices.java:220:INFO ] In processExtendSubscriptionByOrder service with orderId: WSCO10000
     [java] 2007-08-08 20:21:55,828 (http-0.0.0.0-8443-Processor2) [   GenericDelegator.java:2295:WARN ] Tried to put a value of the OrderHeader entity in the BY PRIMARY KEY cache but this entity has never-cache set to true, not caching.
     [java] 2007-08-08 20:21:56,093 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:137:INFO ] Running Service ECA Service: checkDigitalItemFulfillment, triggered by rule on Service: changeOrderItemStatus
     [java] 2007-08-08 20:21:57,218 (http-0.0.0.0-8443-Processor2) [                Log.java:94 :INFO ] In getNextInvoiceId partyId is [Company], partyAcctgPreference: [GenericEntity:PartyAcctgPreference][baseCurrencyUomId,USD(java.lang.String)][cogsMethodId,COGS_AVG_COST(java.lang.String)][createdStamp,2007-08-08 19:20:37.671(java.sql.Timestamp)][createdTxStamp,2007-08-08 19:20:32.281(java.sql.Timestamp)][fiscalYearStartDay,null()][fiscalYearStartMonth,null()][invoiceIdPrefix,CI(java.lang.String)][invoiceSequenceEnumId,INVSQ_ENF_SEQ(java.lang.String)][lastInvoiceNumber,0(java.lang.Long)][lastInvoiceRestartDate,null()][lastOrderNumber,0(java.lang.Long)][lastQuoteNumber,0(java.lang.Long)][lastUpdatedStamp,2007-08-08 19:20:37.671(java.sql.Timestamp)][lastUpdatedTxStamp,2007-08-08 19:20:32.281(java.sql.Timestamp)][orderIdPrefix,CO(java.lang.String)][orderSequenceEnumId,INVSQ_ENF_SEQ(java.lang.String)][partyId,Company(java.lang.String)][quoteIdPrefix,CQ(java.lang.String)][quoteSequenceEnumId,INVSQ_ENF_SEQ(java.lang.String)][refundPaymentMethodId,null()][taxFormId,US_IRS_1120(java.lang.String)][useInvoiceIdForReturns,null()]
     [java] 2007-08-08 20:21:57,234 (http-0.0.0.0-8443-Processor2) [                Log.java:94 :INFO ] In createInvoice sequence enum INVSQ_ENF_SEQ
     [java] 2007-08-08 20:21:58,390 (http-0.0.0.0-8443-Processor2) [    InvoiceServices.java:335:WARN ] No billing locations found for order [WSCO10000] and none were created for Invoice [CI1]
     [java] 2007-08-08 20:22:04,437 (http-0.0.0.0-8443-Processor2) [    InvoiceServices.java:1940:INFO ] No payments found for Invoice #CI1
     [java] 2007-08-08 20:22:04,437 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:137:INFO ] Running Service ECA Service: capturePaymentsByInvoice, triggered by rule on Service: createInvoiceForOrder
     [java] 2007-08-08 20:22:05,015 (http-0.0.0.0-8443-Processor2) [PaymentGatewayServices.java:995:INFO ] (Capture) Invoice [#CI1] total: 0.0
     [java] 2007-08-08 20:22:05,390 (http-0.0.0.0-8443-Processor2) [PaymentGatewayServices.java:1060:INFO ] The Remaining Total for order: WSCO10000 is: 0.00
     [java] 2007-08-08 20:22:05,406 (http-0.0.0.0-8443-Processor2) [PaymentGatewayServices.java:1063:INFO ] Actual Expected Capture Amount : 0.00
     [java] 2007-08-08 20:22:05,921 (http-0.0.0.0-8443-Processor2) [      EntityEcaRule.java:111:INFO ] Running Entity ECA Service: checkCreateOrderRequirement, triggered by rule on Entity: OrderItem
     [java] 2007-08-08 20:22:06,062 (http-0.0.0.0-8443-Processor2) [   PrimaryKeyFinder.java:124:INFO ] Returning null because found incomplete primary key in find: [GenericEntity:Product]
     [java] 2007-08-08 20:22:06,062 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:112:INFO ] Got false for condition: [null][][statusId][equals][null][ITEM_CANCELLED][true][String][]
     [java] 2007-08-08 20:22:06,078 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:137:INFO ] Running Service ECA Service: checkOrderItemStatus, triggered by rule on Service: changeOrderItemStatus
     [java] 2007-08-08 20:22:06,140 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:112:INFO ] Got false for condition: [null][][statusId][equals][null][ORDER_CANCELLED][true][String][]
     [java] 2007-08-08 20:22:06,140 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:137:INFO ] Running Service ECA Service: resetGrandTotal, triggered by rule on Service: changeOrderStatus
     [java] 2007-08-08 20:22:06,171 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:137:INFO ] Running Service ECA Service: sendOrderCompleteNotification, triggered by rule on Service: changeOrderStatus
     [java] 2007-08-08 20:22:06,359 (http-0.0.0.0-8443-Processor2) [ GenericAsyncEngine.java:142:INFO ] Persisted job queued : 1186593726203
     [java] 2007-08-08 20:22:06,375 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:137:INFO ] Running Service ECA Service: setEbayOrderToComplete, triggered by rule on Service: changeOrderStatus
     [java] 2007-08-08 20:22:06,421 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:112:INFO ] Got false for condition: [null][][statusId][equals][null][ORDER_APPROVED][true][String][]
     [java] 2007-08-08 20:22:06,437 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:112:INFO ] Got false for condition: [null][][statusId][equals][null][ITEM_APPROVED][true][String][]
     [java] 2007-08-08 20:22:06,437 (http-0.0.0.0-8443-Processor2) [     ServiceEcaRule.java:112:INFO ] Got false for condition: [null][][statusId][equals][null][ITEM_APPROVED][true][String][]
     [java] 2007-08-08 20:22:06,546 (http-0.0.0.0-8443-Processor2) [      OrderServices.java:2945:INFO ] Product has 1 associations, 1 has valid from/thru dates
     [java] 2007-08-08 20:22:07,218 (http-0.0.0.0-8443-Processor2) [  ServiceDispatcher.java:410:ERROR] Service Error [changeOrderStatus]: ERROR : Could not change order status ; status is not a valid change.: [ORDER_COMPLETED] -> [ORDER_APPROVED]
     [java] 2007-08-08 20:22:07,218 (http-0.0.0.0-8443-Processor2) [    TransactionUtil.java:255:ERROR]
     [java] ---- exception report ----------------------------------------------------------
     [java] [TransactionUtil.rollback]
     [java] Exception: java.lang.Exception
     [java] Message: Stack Trace
     [java] ---- stack trace ---------------------------------------------------------------
     [java] java.lang.Exception: Stack Trace
     [java] org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:254)
     [java] org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:236)
     [java] org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:414)
     [java] org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:210)
     [java] org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:136)
     [java] org.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:325)
     [java] org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:448)
     [java] org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:277)
     [java] org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:193)
     [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
     [java] javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
     [java] org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
     [java] org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
     [java] org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:248)
     [java] org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
     [java] org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
     [java] org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
     [java] org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
     [java] org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
     [java] org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
     [java] org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
     [java] org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:542)
     [java] org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
     [java] org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
     [java] org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
     [java] org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
     [java] org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
     [java] org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
     [java] java.lang.Thread.run(Unknown Source)
     [java] --------------------------------------------------------------------------------
     [java] 2007-08-08 20:22:07,625 (http-0.0.0.0-8443-Processor2) [    TransactionUtil.java:265:INFO ] [TransactionUtil.rollback] transaction rolled back
     [java] 2007-08-08 20:22:07,625 (http-0.0.0.0-8443-Processor2) [     RequestHandler.java:308:ERROR] Request changeOrderStatus caused an error with the following message: ERROR : Could not change order status ; status is not a valid change.: [ORDER_COMPLETED] -> [ORDER_APPROVED]
     [java] 2007-08-08 20:22:07,656 (http-0.0.0.0-8443-Processor2) [    ConfigXMLReader.java:558:INFO ] ConfigMap Created: (4) records in 0.0s
     [java] 2007-08-08 20:22:07,656 (http-0.0.0.0-8443-Processor2) [    ConfigXMLReader.java:716:INFO ] HandlerMap Created: (4) view handlers and (6) request/event handlers in 0.0s
     [java] 2007-08-08 20:22:07,656 (http-0.0.0.0-8443-Processor2) [    ConfigXMLReader.java:291:INFO ] RequestMap Created: (299) records in 0.0s
     [java] 2007-08-08 20:22:07,671 (http-0.0.0.0-8443-Processor2) [    ConfigXMLReader.java:385:INFO ] ViewMap Created: (132) records in 0.0s
     [java] 2007-08-08 20:22:07,671 (http-0.0.0.0-8443-Processor2) [     RequestHandler.java:427:INFO ] [RequestHandler.doRequest]: Response is a view. sessionId=C79B19660A0979D9DE3D5BEF621785D9.jvm1
     [java] 2007-08-08 20:22:07,671 (http-0.0.0.0-8443-Processor2) [     RequestHandler.java:576:INFO ] servletName=control, view=orderview sessionId=C79B19660A0979D9DE3D5BEF621785D9.jvm1
     [java] 2007-08-08 20:22:07,687 (http-0.0.0.0-8443-Processor2) [      ScreenFactory.java:118:INFO ] Got 19 screens in 0.016s from: file:/C:/Documents%20and%20Settings/Bilgin%20Ibryam/workspace/ofbiz-trunk/applications/order/widget/ordermgr/OrderViewScreens.xml
     [java] 2007-08-08 20:22:12,734 (http-0.0.0.0-8443-Processor2) [      ScreenFactory.java:118:INFO ] Got 5 screens in 0.031s from: file:/C:/Documents%20and%20Settings/Bilgin%20Ibryam/workspace/ofbiz-trunk/applications/order/widget/ordermgr/CommonScreens.xml
     [java] 2007-08-08 20:22:12,750 (http-0.0.0.0-8443-Processor2) [      ScreenFactory.java:118:INFO ] Got 13 screens in 0.016s from: file:/C:/Documents%20and%20Settings/Bilgin%20Ibryam/workspace/ofbiz-trunk/framework/common/widget/CommonScreens.xml
     [java] 2007-08-08 20:22:12,812 (http-0.0.0.0-8443-Processor2) [  ModelScreenWidget.java:360:INFO ] In the include-screen tag the screen name was empty, ignoring include; in screen [GlobalDecorator]
     [java] 2007-08-08 20:22:17,609 (default-invoker-Thread-9) [         JobInvoker.java:211:INFO ] Invoker: default-invoker-Thread-9 received job -- 1186593726203 from poller - org.ofbiz.service.job.JobPoller@9fd062
     [java] 2007-08-08 20:22:17,609 (default-invoker-Thread-9) [PersistedServiceJob.java:136:INFO ] org.ofbiz.service.job.PersistedServiceJob@5bcd16[10013] -- Next runtime: -1
     [java] [Error] :2:12: cvc-elt.1: Cannot find the declaration of element 'ofbiz-ser'.
     [java] 2007-08-08 20:22:17,671 (default-invoker-Thread-9) [      ScreenFactory.java:118:INFO ] Got 7 screens in 0.015s from: file:/C:/Documents%20and%20Settings/Bilgin%20Ibryam/workspace/ofbiz-trunk/applications/ecommerce/widget/EmailOrderScreens.xml
     [java] 2007-08-08 20:22:18,718 (default-invoker-Thread-9) [      ScreenFactory.java:118:INFO ] Got 34 screens in 0.015s from: file:/C:/Documents%20and%20Settings/Bilgin%20Ibryam/workspace/ofbiz-trunk/applications/ecommerce/widget/OrderScreens.xml
     [java] 2007-08-08 20:22:19,046 (default-invoker-Thread-9) [      EmailServices.java:113:INFO ] Mail notifications disabled in general.properties; here is the context with info that would have been sent: [userLogin=[GenericEntity:UserLogin][createdStamp,2007-08-08 19:17:45.484(java.sql.Timestamp)][createdTxStamp,2007-08-08 19:17:41.109(java.sql.Timestamp)][currentPassword,47ca69ebb4bdc9ae0adec130880165d2cc05db1a(java.lang.String)][lastUpdatedStamp,2007-08-08 19:17:46.312(java.sql.Timestamp)][lastUpdatedTxStamp,2007-08-08 19:17:46.265(java.sql.Timestamp)][partyId,admin(java.lang.String)][userLoginId,admin(java.lang.String)], sendFrom=ofbiztest@yahoo.com, sendCc=null, sendBcc=null, sendTo=ofbiztest@yahoo.com, locale=en_US, body=
     [java] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     [java] <html xmlns="http://www.w3.org/1999/xhtml">

> Cannot approve digital product orders
> -------------------------------------
>
>                 Key: OFBIZ-1189
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1189
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Bilgin Ibryam
>             Fix For: SVN trunk
>
>
> Hi all,
> There is a bug when approving orders that contains only digital products. 
> If you create an order that contains only digital products and then try to approve it you will get ERROR : Could not change order status ; status is not a valid change.: [ORDER_COMPLETED] -> [ORDER_APPROVED]
> The reason is that there is seca rule and checkDigitalItemFulfillment service will put all the items to ITEM_COMPLETED status. Then another seca calls checkOrderItemStatus and the order is also in put in ORDER_COMPLETED status. All the items are completed and the order is also completed, everything looks fine, but the service called in the beginning to approve the order generates the error [ORDER_COMPLETED] -> [ORDER_APPROVED] is not a valid change....
> Any ideas what should be the flow in approving and completing an order in cases where all items are completed while approving ?
> Regards,
> Bilgin Ibryam

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1189) Cannot approve digital product orders

Posted by "Bilgin Ibryam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12519291 ] 

Bilgin Ibryam commented on OFBIZ-1189:
--------------------------------------

Jacques,
Your solution is better and fixes the bug.
Thanks.

> Cannot approve digital product orders
> -------------------------------------
>
>                 Key: OFBIZ-1189
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1189
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Bilgin Ibryam
>             Fix For: SVN trunk
>
>         Attachments: order.patch, order.patch
>
>
> Hi all,
> There is a bug when approving orders that contains only digital products. 
> If you create an order that contains only digital products and then try to approve it you will get ERROR : Could not change order status ; status is not a valid change.: [ORDER_COMPLETED] -> [ORDER_APPROVED]
> The reason is that there is seca rule and checkDigitalItemFulfillment service will put all the items to ITEM_COMPLETED status. Then another seca calls checkOrderItemStatus and the order is also in put in ORDER_COMPLETED status. All the items are completed and the order is also completed, everything looks fine, but the service called in the beginning to approve the order generates the error [ORDER_COMPLETED] -> [ORDER_APPROVED] is not a valid change....
> Any ideas what should be the flow in approving and completing an order in cases where all items are completed while approving ?
> Regards,
> Bilgin Ibryam

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OFBIZ-1189) Cannot approve digital product orders

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-1189.
----------------------------------

    Resolution: Fixed

After some tests, I can't see any reasons to keep this issue open.

> Cannot approve digital product orders
> -------------------------------------
>
>                 Key: OFBIZ-1189
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1189
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Bilgin Ibryam
>            Assignee: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: order.patch, order.patch
>
>
> Hi all,
> There is a bug when approving orders that contains only digital products. 
> If you create an order that contains only digital products and then try to approve it you will get ERROR : Could not change order status ; status is not a valid change.: [ORDER_COMPLETED] -> [ORDER_APPROVED]
> The reason is that there is seca rule and checkDigitalItemFulfillment service will put all the items to ITEM_COMPLETED status. Then another seca calls checkOrderItemStatus and the order is also in put in ORDER_COMPLETED status. All the items are completed and the order is also completed, everything looks fine, but the service called in the beginning to approve the order generates the error [ORDER_COMPLETED] -> [ORDER_APPROVED] is not a valid change....
> Any ideas what should be the flow in approving and completing an order in cases where all items are completed while approving ?
> Regards,
> Bilgin Ibryam

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1189) Cannot approve digital product orders

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588341#action_12588341 ] 

Jacques Le Roux commented on OFBIZ-1189:
----------------------------------------

Should we not close this issue ?

> Cannot approve digital product orders
> -------------------------------------
>
>                 Key: OFBIZ-1189
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1189
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Bilgin Ibryam
>            Assignee: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: order.patch, order.patch
>
>
> Hi all,
> There is a bug when approving orders that contains only digital products. 
> If you create an order that contains only digital products and then try to approve it you will get ERROR : Could not change order status ; status is not a valid change.: [ORDER_COMPLETED] -> [ORDER_APPROVED]
> The reason is that there is seca rule and checkDigitalItemFulfillment service will put all the items to ITEM_COMPLETED status. Then another seca calls checkOrderItemStatus and the order is also in put in ORDER_COMPLETED status. All the items are completed and the order is also completed, everything looks fine, but the service called in the beginning to approve the order generates the error [ORDER_COMPLETED] -> [ORDER_APPROVED] is not a valid change....
> Any ideas what should be the flow in approving and completing an order in cases where all items are completed while approving ?
> Regards,
> Bilgin Ibryam

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.