Page 1 of 1

workflows-and-activities [Conditional Activity Execution]

Posted: Thu Sep 04, 2014 7:15 am
by bibroy
This question is related to the tutorial at http://www.broadleafcommerce.com/docs/c ... activities - The section Conditional Activity Execution says:

.........perhaps a single large workflow could be declared for multiple configurations of a ProcessContext.


Does the above mean something which the code snippet (I created) suggests below: (if not, please explain)

Code: Select all

<bean id="blCheckoutWorkflow" class="org.broadleafcommerce.core.workflow.SequenceProcessor">
        <property name="processContextFactory">
           <list>
              <bean class="org.broadleafcommerce.core.checkout.service.workflow.CheckoutProcessContextFactory"/>
              <bean class="org.broadleafcommerce.core.checkout.service.workflow.SomeOtherProcessContextFactory"/>
           <list>
        </property>
  ..........
</bean>


Re: workflows-and-activities [Conditional Activity Execution]

Posted: Sat Sep 06, 2014 7:22 pm
by phillipuniverse
No. This is talking about the shouldExecute() method in the Activity interface. The way you have that configured will result in an exception on startup (the application will not load at all) since the processContextFactory property can only be an instance of the ProcessContextFactory interface.