1 package org.andromda.cartridges.bpm4struts.metafacades;
2
3 import java.util.Collection;
4 import org.andromda.metafacades.uml.PseudostateFacade;
5
6
7
8
9
10
11
12
13 public class StrutsActivityGraphLogicImpl
14 extends StrutsActivityGraphLogic
15 {
16 private static final long serialVersionUID = 34L;
17
18
19
20
21 public StrutsActivityGraphLogicImpl(
22 Object metaObject,
23 String context)
24 {
25 super(metaObject, context);
26 }
27
28
29
30
31 protected Object handleGetFirstAction()
32 {
33 Object firstAction = null;
34 final Collection initialStates = getInitialStates();
35 if (!initialStates.isEmpty())
36 {
37 final PseudostateFacade initialState = (PseudostateFacade)initialStates.iterator().next();
38 final Collection outgoings = initialState.getOutgoings();
39 firstAction = (outgoings.isEmpty()) ? null : outgoings.iterator().next();
40 }
41 return firstAction;
42 }
43 }