View Javadoc

1   /*
2    * $Id: EndedProcess.java 20121 2010-11-08 17:33:48Z tcarlson $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.module.jbpm;
12  
13  import java.util.Collection;
14  import java.util.Map;
15  import java.util.Set;
16  
17  import org.jbpm.api.Execution;
18  import org.jbpm.api.ProcessInstance;
19  
20  /**
21   * Placeholder used to get status for a process in a uniform way, even if it has ended.
22   */
23  public class EndedProcess implements ProcessInstance
24  {
25      private String id;
26  
27      public EndedProcess(String id)
28      {
29          this.id = id;
30      }
31      
32      public String getId()
33      {
34          return id;
35      }
36  
37      public boolean isEnded()
38      {
39          return true;
40      }
41  
42      public Set<String> findActiveActivityNames()
43      {
44          return null;
45      }
46  
47      public Execution findActiveExecutionIn(String activityName)
48      {
49          return null;
50      }
51  
52      public Execution getExecution(String name)
53      {
54          return null;
55      }
56  
57      public Collection<? extends Execution> getExecutions()
58      {
59          return null;
60      }
61  
62      public Map<String, Execution> getExecutionsMap()
63      {
64          return null;
65      }
66  
67      public boolean getIsProcessInstance()
68      {
69          return true;
70      }
71  
72      public String getKey()
73      {
74          return null;
75      }
76  
77      public String getName()
78      {
79          return null;
80      }
81  
82      public Execution getParent()
83      {
84          return null;
85      }
86  
87      public int getPriority()
88      {
89          return 0;
90      }
91  
92      public String getProcessDefinitionId()
93      {
94          return null;
95      }
96  
97      public Execution getProcessInstance()
98      {
99          return null;
100     }
101 
102     public Execution getSubProcessInstance()
103     {
104         return null;
105     }
106     
107     public String getState()
108     {
109         return ProcessInstance.STATE_ENDED;
110     }
111 
112     public boolean hasExecution(String executionName)
113     {
114         return false;
115     }
116 
117     public boolean isActive(String activityName)
118     {
119         return false;
120     }
121 
122     public boolean isSuspended()
123     {
124         return false;
125     }
126 }
127 
128