{"action":"created","issue":{"url":"https://api.github.com/repos/BroadleafCommerce/BroadleafCommerce/issues/93","labels_url":"https://api.github.com/repos/BroadleafCommerce/BroadleafCommerce/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/BroadleafCommerce/BroadleafCommerce/issues/93/comments","events_url":"https://api.github.com/repos/BroadleafCommerce/BroadleafCommerce/issues/93/events","html_url":"https://github.com/BroadleafCommerce/BroadleafCommerce/issues/93","id":15646584,"number":93,"title":"Refactor BaseActivity and set the default automaticallyRegisterRollbackHandler to \"false\"","user":{"login":"elbertbautista","id":1213999,"avatar_url":"https://avatars.githubusercontent.com/u/1213999?v=3","gravatar_id":"","url":"https://api.github.com/users/elbertbautista","html_url":"https://github.com/elbertbautista","followers_url":"https://api.github.com/users/elbertbautista/followers","following_url":"https://api.github.com/users/elbertbautista/following{/other_user}","gists_url":"https://api.github.com/users/elbertbautista/gists{/gist_id}","starred_url":"https://api.github.com/users/elbertbautista/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elbertbautista/subscriptions","organizations_url":"https://api.github.com/users/elbertbautista/orgs","repos_url":"https://api.github.com/users/elbertbautista/repos","events_url":"https://api.github.com/users/elbertbautista/events{/privacy}","received_events_url":"https://api.github.com/users/elbertbautista/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/BroadleafCommerce/BroadleafCommerce/labels/module-core","name":"module-core","color":"207de5"},{"url":"https://api.github.com/repos/BroadleafCommerce/BroadleafCommerce/labels/severity-major","name":"severity-major","color":"207de5"},{"url":"https://api.github.com/repos/BroadleafCommerce/BroadleafCommerce/labels/type-enhancement","name":"type-enhancement","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/BroadleafCommerce/BroadleafCommerce/milestones/1","html_url":"https://github.com/BroadleafCommerce/BroadleafCommerce/milestones/3.0.0-GA","labels_url":"https://api.github.com/repos/BroadleafCommerce/BroadleafCommerce/milestones/1/labels","id":356388,"number":1,"title":"3.0.0-GA","description":"Broadleaf began using GitHub with this release.    The issues contained within represent roughly 10% of the overall features and issues contained in this release.","creator":{"login":"bpolster","id":1189191,"avatar_url":"https://avatars.githubusercontent.com/u/1189191?v=3","gravatar_id":"","url":"https://api.github.com/users/bpolster","html_url":"https://github.com/bpolster","followers_url":"https://api.github.com/users/bpolster/followers","following_url":"https://api.github.com/users/bpolster/following{/other_user}","gists_url":"https://api.github.com/users/bpolster/gists{/gist_id}","starred_url":"https://api.github.com/users/bpolster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpolster/subscriptions","organizations_url":"https://api.github.com/users/bpolster/orgs","repos_url":"https://api.github.com/users/bpolster/repos","events_url":"https://api.github.com/users/bpolster/events{/privacy}","received_events_url":"https://api.github.com/users/bpolster/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":47,"state":"closed","created_at":"2013-06-15T18:51:12Z","updated_at":"2013-12-07T21:52:27Z","due_on":"2013-06-22T07:00:00Z","closed_at":"2013-06-28T19:56:25Z"},"comments":13,"created_at":"2013-06-17T17:58:40Z","updated_at":"2015-08-09T16:45:45Z","closed_at":"2013-11-01T16:47:38Z","body":"Consider Refactoring BaseActivity and set the default automaticallyRegisterRollbackHandler to \"false\" because in most cases if you define an activity with a Rollback Handler. The activity itself needs to programmatically register itself with the Activity Manager instead of having the SequenceProcessor register it. Right now as it is set to \"true\", the activities that do register a rollback have to manually set it and produce some boiler plate code. See: org.broadleafcommerce.inventory.service.workflow.DecrementInventoryActivity and org.broadleafcommerce.core.payment.service.workflow.PaymentActivity\r\n\r\n```java\r\nif (getRollbackHandler() != null && !getAutomaticallyRegisterRollbackHandler()) {\r\n  ...\r\n}\r\n```\r\n\r\nIn the cases of the existing activities, the Rollback Handlers are null anyways so the logic in the SequenceProcessor should still work if you set automaticallyRegisterRollbackHandler to \"false\"\r\n\r\n```java\r\nif (activity.getRollbackHandler() != null && activity.getAutomaticallyRegisterRollbackHandler()) { \r\n  ActivityStateManagerImpl.getStateManager().registerState(activity, context, activity.getRollbackRegion(), activity.getRollbackHandler(), activity.getStateConfiguration());\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/BroadleafCommerce/BroadleafCommerce/issues/comments/129215776","html_url":"https://github.com/BroadleafCommerce/BroadleafCommerce/issues/93#issuecomment-129215776","issue_url":"https://api.github.com/repos/BroadleafCommerce/BroadleafCommerce/issues/93","id":129215776,"user":{"login":"daniellavoie","id":4403970,"avatar_url":"https://avatars.githubusercontent.com/u/4403970?v=3","gravatar_id":"","url":"https://api.github.com/users/daniellavoie","html_url":"https://github.com/daniellavoie","followers_url":"https://api.github.com/users/daniellavoie/followers","following_url":"https://api.github.com/users/daniellavoie/following{/other_user}","gists_url":"https://api.github.com/users/daniellavoie/gists{/gist_id}","starred_url":"https://api.github.com/users/daniellavoie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daniellavoie/subscriptions","organizations_url":"https://api.github.com/users/daniellavoie/orgs","repos_url":"https://api.github.com/users/daniellavoie/repos","events_url":"https://api.github.com/users/daniellavoie/events{/privacy}","received_events_url":"https://api.github.com/users/daniellavoie/received_events","type":"User","site_admin":false},"created_at":"2015-08-09T16:45:45Z","updated_at":"2015-08-09T16:45:45Z","body":"Hi there guys, I came across this change because I actually encountering a problem with the **ValidateAndConfirmPaymentActivity**. I can see that I have a registered rollback handler but the famous flag **automaticallyRegisterRollbackHandler** is set to **false**. As a result my rollback handler is not being registered. \r\n\r\n```\r\nif (activity.getRollbackHandler() != null && activity.getAutomaticallyRegisterRollbackHandler()) {\r\n    ActivityStateManagerImpl.getStateManager().registerState(activity, context, activity.getRollbackRegion(), activity.getRollbackHandler(), activity.getStateConfiguration());\r\n}\r\n```\r\n\r\nI don't get the logic behind this behavior. Could you guys light me up about why the **ValidateAndConfirmPaymentActivity** does not register itself ?\r\n\r\nI can see the proper behavior with the following activities : \r\n* CommitTaxActivity\r\n* CompleteOrderActivity\r\n* DecrementInventoryActivity"}}