KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > workflow > WorkflowExecutionService


1 package org.exoplatform.services.workflow;
2
3 import org.jbpm.model.definition.Definition;
4 import org.jbpm.model.execution.ProcessInstance;
5 import org.jbpm.model.execution.Token;
6 import org.jbpm.model.log.InvocationLog;
7 import org.jbpm.Assembler;
8 import org.jbpm.ExecutionException;
9
10 import java.util.Collection JavaDoc;
11 import java.util.Map JavaDoc;
12 import java.util.Date JavaDoc;
13 import java.util.List JavaDoc;
14
15 /**
16  * Created y the eXo platform team
17  * User: Benjamin Mestrallet
18  * Date: 9 mai 2004
19  * <p/>
20  * interfaces taken from JBPM
21  */

22 public interface WorkflowExecutionService {
23
24   public void close();
25
26   public List JavaDoc getAllDefinitions();
27
28   public List JavaDoc getAllDefinitions(Assembler assembler);
29
30   public Collection JavaDoc getTaskList(String JavaDoc targetActorId, Assembler assembler);
31
32   public Token getToken(Long JavaDoc tokenId, Assembler assembler);
33
34   public ProcessInstance getProcessInstance(Long JavaDoc processInstanceId, Assembler assembler);
35
36   public Map JavaDoc getVariables(Long JavaDoc tokenId);
37
38   public Definition getDefinition(Long JavaDoc definitionId, Assembler assembler);
39
40   public Definition getLatestDefinition(String JavaDoc name);
41
42   public Collection JavaDoc getLatestDefinitions();
43
44   public byte[] getFile(Long JavaDoc processDefinitionId, String JavaDoc fileName);
45
46   public InvocationLog startProcessInstance(String JavaDoc actorId, Long JavaDoc definitionId)
47       throws ExecutionException;
48
49   public InvocationLog startProcessInstance(String JavaDoc actorId, Long JavaDoc definitionId, Map JavaDoc variables)
50       throws ExecutionException;
51
52   public InvocationLog startProcessInstance(String JavaDoc actorId, Long JavaDoc definitionId, Map JavaDoc variables, String JavaDoc transitionName)
53       throws ExecutionException;
54
55   public InvocationLog setVariables(String JavaDoc actorId, Long JavaDoc tokenId, Map JavaDoc variables)
56       throws ExecutionException;
57
58   public InvocationLog endOfState(String JavaDoc actorId, Long JavaDoc tokenId)
59       throws ExecutionException;
60
61   public InvocationLog endOfState(String JavaDoc actorId, Long JavaDoc tokenId, Map JavaDoc variables)
62       throws ExecutionException;
63
64   public InvocationLog endOfState(String JavaDoc actorId, Long JavaDoc tokenId,
65                                   Map JavaDoc variables, String JavaDoc transitionName)
66       throws ExecutionException;
67
68   public InvocationLog cancelProcessInstance(String JavaDoc actorId, Long JavaDoc processInstanceId)
69       throws ExecutionException;
70
71   public InvocationLog cancelToken(String JavaDoc actorId, Long JavaDoc flowId)
72       throws ExecutionException;
73
74   public InvocationLog undo(String JavaDoc actorId, Long JavaDoc processInstanceId, Date JavaDoc date)
75       throws ExecutionException;
76
77 }
78
Popular Tags