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