1 package org.andromda.cartridges.jbpm.metafacades;
2
3 import org.andromda.cartridges.jbpm.JBpmProfile;
4 import org.andromda.metafacades.uml.ActivityGraphFacade;
5 import org.andromda.metafacades.uml.GuardFacade;
6
7
8
9
10
11
12 public class JBpmTransitionLogicImpl
13 extends JBpmTransitionLogic
14 {
15 private static final long serialVersionUID = 34L;
16
17
18
19
20 public JBpmTransitionLogicImpl(Object metaObject, String context)
21 {
22 super(metaObject, context);
23 }
24
25
26
27
28 protected boolean handleIsContainedInBusinessProcess()
29 {
30 return this.getSource().getStateMachine() instanceof ActivityGraphFacade &&
31 ((ActivityGraphFacade)this.getSource().getStateMachine()).getUseCase() instanceof JBpmProcessDefinition;
32 }
33
34
35
36
37 protected String handleGetCondition()
38 {
39 String decision = null;
40
41 final GuardFacade guard = this.getGuard();
42 if (guard != null)
43 {
44 decision = guard.getBody();
45 }
46
47 return decision;
48 }
49
50
51
52
53 protected boolean handleIsTaskNode()
54 {
55 return hasStereotype(JBpmProfile.STEREOTYPE_TASK);
56 }
57 }