Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/jbpm/workflow/definition/DefinitionComponent.java


1   package org.jbpm.workflow.definition;
2   
3   import java.util.*;
4   import java.util.jar.*;
5   
6   import org.jbpm.util.client.*;
7   
8   /**
9    * is the session facade that exposes the interface for loading process definitions into the process engine.
10   * <p>For an introduction on how to build process definitions please refer to 
11   * <a href="http://jbpm.org/jpdl.html">'The jBpm Process definition language'</a>
12   * (jPdl) on the jBpm website.  Also the DTD and XSD of the processdefinition.xml file
13   * can be found there.
14   * </p>
15   * 
16   * <p>For more information on how jBpm copes with multiple versions of
17   * the same process definition, see section <a href="http://jbpm.org/concepts#versioning">'Versioning' 
18   * on the jBpm website</a>. 
19   * </p>
20   */
21  public interface DefinitionComponent {
22  
23    /**
24     * deploys a process archive into the jBpm runtime engine.
25     * The contents of the process archive is parsed and stored in the database.
26     * A process archive contains one process definition.
27     * If a process definition with the same name already exists in the jBpm-engine,
28     * the added definition will get a new version number (one higher then the highest
29     * existing version number for that name)
30     * @param processArchiveStream must be a jar formatted process archive.  
31     * @throws JpdlException if the processArchiveStream does not contain a
32     * valid process archive. 
33     */
34    void deployProcessArchive( JarInputStream processArchiveStream ) throws JpdlException;
35    
36    
37    /**
38     * collects the highest version of every {@link ProcessDefinition}. Those are the
39     * {@link ProcessDefinition}s from which a user must choose one to start.
40     * See also <a href="http://jbpm.org/concepts.html#versioning">versioning</a>.
41     * @return a Collection of {@link org.jbpm.workflow.definition.ProcessDefinition}s.  
42     *   For each distinct process-definition-name it will return one ProcessDefinition : the 
43     *   one with the highest version number.
44     */
45    Collection getProcessDefinitions();
46  
47    /**
48     * collects the highest version of every {@link ProcessDefinition}. Those are the
49     * {@link ProcessDefinition}s from which a user must choose one to start.
50     * See also <a href="http://jbpm.org/concepts.html#versioning">versioning</a>.
51     * @param relations specifies which {@link Relations} should be resolved in the 
52     *   returned {@link org.jbpm.workflow.definition.ProcessDefinition}s
53     * @return a Collection of {@link org.jbpm.workflow.definition.ProcessDefinition}s.  
54     *   For each distinct process-definition-name it will return one ProcessDefinition : the 
55     *   one with the highest version number.
56     */
57    Collection getProcessDefinitions( Relations relations );
58    
59  
60    /**
61     * gets the latest version of the {@link ProcessDefinition} with the given name.
62     */
63    ProcessDefinition getProcessDefinition( String processDefinitionName );
64  
65    /**
66     * gets the latest version of the {@link ProcessDefinition} with the given name.
67     * @param relations specifies which {@link Relations} should be resolved in the 
68     *   returned {@link org.jbpm.workflow.definition.ProcessDefinition}
69     */
70    ProcessDefinition getProcessDefinition( String processDefinitionName, Relations relations );
71  
72    /**
73     * gets a specific version of a {@link ProcessDefinition}.
74     */
75    ProcessDefinition getProcessDefinition(Long processDefinitionId);
76  
77    /**
78     * gets a specific version of a {@link ProcessDefinition}.
79     * @param relations specifies which {@link Relations} should be resolved in the 
80     *   returned {@link org.jbpm.workflow.definition.ProcessDefinition}
81     */
82    ProcessDefinition getProcessDefinition(Long processDefinitionId, Relations relations);
83    
84    
85    /**
86     * retrievses all process definitions, including older versions.
87     */
88    Collection getAllProcessDefinitions();
89  
90    /**
91     * retrievses all process definitions, including older versions.
92     * @param relations specifies which {@link Relations} should be resolved in the 
93     *   returned {@link org.jbpm.workflow.definition.ProcessDefinition}s
94     */
95    Collection getAllProcessDefinitions( Relations relations );
96  }