Page 1 of 1

workflows-and-activities [explicitly register - handler]

Posted: Thu Sep 04, 2014 6:42 am
by bibroy
This question is related to the tutorial at http://www.broadleafcommerce.com/docs/c ... activities - the document states:
By default, one must explicitly register a RollbackHandler in code (see above). This is because most RollbackHandlers will require thread specific state to be registered in order to achieve a viable rollback state


Question: Since details are not provided, will the code for explicit registration be something like this:

Code: Select all

ActivityStateManage asm = ActivityStateManagerImpl.getStateManager();
//more code goes here.
asm.registerState(myrollbackHandler, some-hashmap-of-state-items);


The document also says
The ActivityStateManager can be called from anywhere in the flow of execution for a workflow (Activity, Module, ErrorHandler, etc...).


Question: what is meant by module here?

Re: workflows-and-activities [explicitly register - handler]

Posted: Sat Sep 06, 2014 7:19 pm
by phillipuniverse
Question: Since details are not provided, will the code for explicit registration be something like this:


See some of your previous posts for examples of Broadleaf activities that supply rollback handlers (all of the activities in the checkout workflow).

Question: what is meant by module here?


Any extension of Broadleaf that is not your site code specifically. For instance, we ship some custom modules along with Broadleaf that you can add for additional functionality (most of these are commercial): http://www.broadleafcommerce.com/docs/c ... nt/modules