Page 1 of 1

workflows-and-activities [state configuration]

Posted: Thu Sep 04, 2014 6:07 am
by bibroy

Code: Select all

public void rollbackState(Activity<? extends ProcessContext> activity, ProcessContext processContext, Map<String, Object> stateConfiguration) throws RollbackFailureException;


The RollbackHandler interface has the above method with the parameter "stateConfiguration" which is defined as "stateConfiguration - Any user-defined state configuration associated with the RollbackHandler" in the interface document. Now can you give me some use-cases/examples where such user-defined state is being used......

Re: workflows-and-activities [state configuration]

Posted: Sat Sep 06, 2014 7:12 pm
by phillipuniverse
Yup, check out the DecrementInventoryActivity: https://github.com/BroadleafCommerce/Br ... ivity.java and its subsequent Rollbackhandler: https://github.com/BroadleafCommerce/Br ... ndler.java

This activity adds state for what inventory it actually decremented and then the rollback handler will go and put that inventory back.