01: package org.andromda.cartridges.jbpm.metafacades;
02:
03: import org.andromda.cartridges.jbpm.JBpmProfile;
04: import org.andromda.metafacades.uml.ActivityGraphFacade;
05: import org.andromda.metafacades.uml.GuardFacade;
06:
07: /**
08: * MetafacadeLogic implementation for org.andromda.cartridges.jbpm.metafacades.JBpmTransition.
09: *
10: * @see org.andromda.cartridges.jbpm.metafacades.JBpmTransition
11: */
12: public class JBpmTransitionLogicImpl extends JBpmTransitionLogic {
13: public JBpmTransitionLogicImpl(Object metaObject, String context) {
14: super (metaObject, context);
15: }
16:
17: protected boolean handleIsContainedInBusinessProcess() {
18: return this .getSource().getStateMachine() instanceof ActivityGraphFacade
19: && ((ActivityGraphFacade) this .getSource()
20: .getStateMachine()).getUseCase() instanceof JBpmProcessDefinition;
21: }
22:
23: protected String handleGetCondition() {
24: String decision = null;
25:
26: final GuardFacade guard = this .getGuard();
27: if (guard != null) {
28: decision = guard.getBody();
29: }
30:
31: return decision;
32: }
33:
34: protected boolean handleIsTaskNode() {
35: return hasStereotype(JBpmProfile.STEREOTYPE_TASK);
36: }
37: }
|