Author: tom.baeyens(a)jboss.com
Date: 2009-07-04 11:04:09 -0400 (Sat, 04 Jul 2009)
New Revision: 5226
Added:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/package.html
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/package.html
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/jpdl/package.html
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/package.html
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Problem.java
Removed:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Problem.java
Modified:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Deployment.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/DeploymentQuery.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/IdentityService.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/JbpmException.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/JobQuery.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ManagementService.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/NewDeployment.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessDefinitionQuery.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessEngine.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessInstanceQuery.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskQuery.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskService.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityBehaviour.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityExecution.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ExternalActivityBehaviour.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/package.html
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryActivityInstance.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryActivityInstanceQuery.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryProcessInstance.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryProcessInstanceQuery.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/Group.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/User.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/job/Job.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/job/Timer.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/job/package.html
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/jpdl/DecisionHandler.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/listener/EventListener.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/listener/package.html
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/package.html
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/package.html
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/ActivityParsingTest.java
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlParseTestCase.java
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlSchemaTest.java
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/ProcessParsingTest.java
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/TransitionParsingTest.java
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/JpdlXmlTest.java
jbpm4/trunk/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReaderTest.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryProcessInstanceImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/DeploymentQueryImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeployerManager.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/ProblemImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/ProblemList.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/AutoWireTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/BasicTypeWireTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ClassWireTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ListWireTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/MapWireTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ObjectWireTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/PropertiesWireTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/RefWireTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/SetWireTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/WireTestCase.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/deploy/DeploymentQueryTest.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/identity/IdentityTest.java
Log:
JBPM-2372 complete javadocs
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Deployment.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Deployment.java 2009-07-04 13:45:15
UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Deployment.java 2009-07-04 15:04:09
UTC (rev 5226)
@@ -21,7 +21,7 @@
*/
package org.jbpm.api;
-/** represents a deployment in the repository.
+/** represents an existing deployment in the repository.
*
* @author Tom Baeyens
*/
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/DeploymentQuery.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/DeploymentQuery.java 2009-07-04
13:45:15 UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/DeploymentQuery.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -23,7 +23,7 @@
import java.util.List;
-/** find deployments in the repository.
+/** find existing deployments in the repository.
*
* @author Tom Baeyens
*/
@@ -33,9 +33,13 @@
String PROPERTY_TIMESTAMP = "timestamp";
String PROPERTY_STATE = "state";
+ /** only include a specific deployment by id */
DeploymentQuery deploymentDbid(long dbid);
+
+ /** only select suspended deployments */
DeploymentQuery suspended();
- DeploymentQuery active();
+
+ DeploymentQuery notSuspended();
DeploymentQuery orderAsc(String property);
DeploymentQuery orderDesc(String property);
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/IdentityService.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/IdentityService.java 2009-07-04
13:45:15 UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/IdentityService.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -26,7 +26,9 @@
import org.jbpm.api.identity.Group;
import org.jbpm.api.identity.User;
-/**
+/** interface to expose the (configurable) identity component that is
+ * used by jBPM.
+ *
* @author Tom Baeyens
*/
public interface IdentityService {
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/JbpmException.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/JbpmException.java 2009-07-04
13:45:15 UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/JbpmException.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -21,6 +21,8 @@
*/
package org.jbpm.api;
+/** all exceptions that jBPM throws are JbpmException's
+ * (extends RuntimeException).*/
public class JbpmException extends RuntimeException {
private static final long serialVersionUID = 1L;
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/JobQuery.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/JobQuery.java 2009-07-04 13:45:15
UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/JobQuery.java 2009-07-04 15:04:09
UTC (rev 5226)
@@ -26,23 +26,47 @@
import org.jbpm.api.job.Job;
-/**
+/** query for jBPM related messages and timers.
+ *
+ * <p>Both {@link org.jbpm.api.job.Message messages} and
+ * {@link org.jbpm.api.job.Timer timers} are
+ * {@link org.jbpm.api.job.Job jobs}.</p>
+ *
* @author Tom Baeyens
*/
public interface JobQuery {
+ /** duedate property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
+ public static final String PROPERTY_DUEDATE = "dueDate";
+ /** state property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
+ public static final String PROPERTY_STATE = "state";
+
+ /** only select messages */
JobQuery messages();
+
+ /** only select timers */
JobQuery timers();
+ /** only select jobs related to the given process instance */
JobQuery processInstanceId(String processInstanceId);
+ /** only select jobs that were rolled back due to an exception */
JobQuery exception(boolean hasException);
+ /** order ascending for property {@link #PROPERTY_STATE}
+ * or {@link #PROPERTY_DUEDATE} */
JobQuery orderAsc(String property);
+
+ /** order descending for property {@link #PROPERTY_STATE}
+ * or {@link #PROPERTY_DUEDATE} */
JobQuery orderDesc(String property);
+ /** only select a specific page */
JobQuery page(int firstResult, int maxResults);
+ /** execute the query and get the result list */
List<Job> list();
+
+ /** execute the query and get the unique result */
Job uniqueResult();
}
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ManagementService.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ManagementService.java 2009-07-04
13:45:15 UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ManagementService.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -22,8 +22,6 @@
package org.jbpm.api;
-
-
/** operations targeted to system operators that need to keep
* the process engine up and running. This functionality is typically
* exposed through a management web console.
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/NewDeployment.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/NewDeployment.java 2009-07-04
13:45:15 UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/NewDeployment.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -26,7 +26,7 @@
import java.net.URL;
import java.util.zip.ZipInputStream;
-/** extends a {@link Deployment} with method to create a new
+/** extends a {@link Deployment} with method for creating a new
* deployment.
*
* @see RepositoryService#createDeployment()
Deleted: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Problem.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Problem.java 2009-07-04 13:45:15
UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Problem.java 2009-07-04 15:04:09
UTC (rev 5226)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jbpm.api;
-
-/**
- * @author Tom Baeyens
- */
-public interface Problem {
-
- public abstract Throwable getCause();
-
- public abstract int getColumn();
-
- public abstract int getLine();
-
- public abstract String getMsg();
-
- public abstract String getResource();
-
- public abstract String getSeverity();
-
-}
\ No newline at end of file
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessDefinitionQuery.java
===================================================================
---
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessDefinitionQuery.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessDefinitionQuery.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -23,31 +23,57 @@
import java.util.List;
-/**
+/** query for {@link ProcessDefinition process definitions}.
+ *
* @author Tom Baeyens
*/
public interface ProcessDefinitionQuery {
+ /** id property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
String PROPERTY_ID = "idProperty.stringValue";
+ /** key property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
String PROPERTY_KEY = "keyProperty.stringValue";
+ /** name property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
String PROPERTY_NAME = "idProperty.objectName";
+ /** version property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
String PROPERTY_VERSION = "versionProperty.longValue";
+ /** timestamp property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
String PROPERTY_DEPLOYMENT_TIMESTAMP = "deployment.timestamp";
+ /** select only the process definition with the given id */
ProcessDefinitionQuery processDefinitionId(String processDefinitionId);
+
+ /** select only process definitions with the given key */
ProcessDefinitionQuery processDefinitionKey(String key);
+
+ /** select only process definitions with a name like the
+ * given name (name can include % signs to act as wildcard)) */
ProcessDefinitionQuery processDefinitionNameLike(String name);
+
+ /** select only process definitions with an exact match for the given name */
ProcessDefinitionQuery processDefinitionName(String name);
+
+ /** select only process definitions within the given deployment */
ProcessDefinitionQuery deploymentId(String deploymentId);
+ /** select only suspended process definitions */
ProcessDefinitionQuery suspended();
+
+ /** select only process definitions that are not suspended */
ProcessDefinitionQuery notSuspended();
+ /** order selected process definitions ascending for certain {@link #PROPERTY_STATE
properties} */
ProcessDefinitionQuery orderAsc(String property);
+
+ /** order selected process definitions descending for certain {@link #PROPERTY_STATE
properties} */
ProcessDefinitionQuery orderDesc(String property);
+ /** select a specific page in the result set */
ProcessDefinitionQuery page(int firstResult, int maxResults);
+ /** execute the query and obtain the list of {@link ProcessDefinition}s */
List<ProcessDefinition> list();
+
+ /** execute the query and obtain the unique {@link ProcessDefinition} */
ProcessDefinition uniqueResult();
}
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessEngine.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessEngine.java 2009-07-04
13:45:15 UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessEngine.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -23,7 +23,10 @@
/** central starting point for all process engine API
- * interactions.
+ * interactions. This is a thread safe object so it can be
+ * kept in a static member field or in JNDI or something
+ * similar from which all threads (requests) will fetch the
+ * same ProcessEngine object.
*
* @author Tom Baeyens
*/
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessInstanceQuery.java
===================================================================
---
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessInstanceQuery.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessInstanceQuery.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -24,25 +24,39 @@
import java.util.List;
-/**
+/** query for {@link ProcessInstance process instances}.
+ *
* @author Tom Baeyens
*/
public interface ProcessInstanceQuery {
+ /** key property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
String PROPERTY_KEY = "key";
+ /** select only process instances for the given process definition */
ProcessInstanceQuery processDefinitionId(String processDefinitionId);
+ /** select only a specific process instances */
ProcessInstanceQuery processInstanceId(String processInstanceId);
+ /** select only suspended process definitions */
ProcessInstanceQuery suspended();
+
+ /** select only process definitions that are not suspended */
ProcessInstanceQuery notSuspended();
+ /** order selected process instances ascending for certain {@link #PROPERTY_KEY
properties} */
ProcessInstanceQuery orderAsc(String property);
+
+ /** order selected process instances descending for certain {@link #PROPERTY_KEY
properties} */
ProcessInstanceQuery orderDesc(String property);
+ /** select a specific page in the result set */
ProcessInstanceQuery page(int firstResult, int maxResults);
+ /** execute the query and obtain the list of {@link ProcessInstance}s */
List<ProcessInstance> list();
+
+ /** execute the query and obtain the unique {@link ProcessInstance} */
ProcessInstance uniqueResult();
}
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskQuery.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskQuery.java 2009-07-04 13:45:15
UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskQuery.java 2009-07-04 15:04:09
UTC (rev 5226)
@@ -26,23 +26,29 @@
import org.jbpm.api.task.Task;
-/**
+/** query for tasks.
+ *
* @author Tom Baeyens
- * @author Heiko Braun <heiko.braun(a)jboss.com>
- */
+ * @author Heiko Braun <heiko.braun(a)jboss.com> */
public interface TaskQuery {
- public static final String PROPERTY_NAME = "name";
- public static final String PROPERTY_ASSIGNEE = "assignee";
- public static final String PROPERTY_CREATEDATE = "create";
- public static final String PROPERTY_DUEDATE = "dueDate";
- public static final String PROPERTY_PRIORITY = "priority";
- public static final String PROPERTY_PROGRESS = "progress";
+ /** name property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
+ String PROPERTY_NAME = "name";
+ /** assignee property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
+ String PROPERTY_ASSIGNEE = "assignee";
+ /** createdate property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
+ String PROPERTY_CREATEDATE = "create";
+ /** duedate property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
+ String PROPERTY_DUEDATE = "dueDate";
+ /** priority property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
+ String PROPERTY_PRIORITY = "priority";
+ /** progress property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
+ String PROPERTY_PROGRESS = "progress";
- /** only find tasks for which the given user is the assignee */
+ /** only select tasks for which the given user is the assignee */
TaskQuery assignee(String userId);
- /** query for tasks that are unassigned.
+ /** only select tasks that are unassigned.
* These tasks can still potentially have candidates. */
TaskQuery unassigned();
@@ -52,26 +58,34 @@
* associated as a candidate group to the task. */
TaskQuery candidate(String userId);
- /** only query for tasks that are associated to the given process instance */
+ /** only select tasks that are associated to the given process instance */
TaskQuery processInstanceId(String processInstanceId);
- /** only query for tasks that are associated to the given process definition */
+ /** only select tasks that are associated to the given process definition */
TaskQuery processDefinitionId(String processDefinitionId);
- /** only query for tasks that are associated to the given activity name. This
+ /** only select tasks that are associated to the given activity name. This
* can be used in combination with the {@link #processDefinitionId(String)} */
TaskQuery activityName(String activityName);
- /** only query for suspended tasks */
+ /** only select suspended tasks */
TaskQuery suspended();
- /** exclude suspended tasks */
+ /** only select tasks that are not suspended */
TaskQuery notSuspended();
+ /** select a specific page in the result set */
TaskQuery page(int firstResult, int maxResults);
+
+ /** order selected tasks ascending for certain {@link #PROPERTY_NAME properties} */
TaskQuery orderAsc(String property);
+
+ /** order selected tasks descending for certain {@link #PROPERTY_NAME properties} */
TaskQuery orderDesc(String property);
+ /** execute the query and obtain the list of {@link Task}s */
List<Task> list();
+
+ /** execute the query and obtain the unique {@link Task} */
Task uniqueResult();
}
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskService.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskService.java 2009-07-04
13:45:15 UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/TaskService.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -30,8 +30,9 @@
import java.util.Map;
import java.util.Set;
-/**
- * Human task management facility.
+/** task management.
+ *
+ * @author Tome Baeyens
* @author Alejandro Guizar
* @author Heiko Braun <heiko.braun(a)jboss.com>
*/
Modified:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityBehaviour.java
===================================================================
---
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityBehaviour.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityBehaviour.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -23,26 +23,19 @@
import java.io.Serializable;
-/** piece of Java code that is to be included in a process as the runtime
- * activity behaviour.
+/** implements the runtime behaviour of an activity.
*
* @author Tom Baeyens
*/
public interface ActivityBehaviour extends Serializable {
- /** piece of Java code that is to be included in a process as activity behaviour
- * or as a hidden listener to process events.
+ /** invoked when an execution arrives in an activity.
*
- * <p>ActivityBehaviour's can be used to implement the behaviour of
activities, in
- * which case this behaviour is associated to a graphical activity in the diagram.
- * </p>
- *
* <p>An ActivityBehaviour can control the propagation
* of execution. ActivityBehaviour's can become external activities when they
* invoke {@link ActivityExecution#waitForSignal()}. That means the
* activity will become a wait state. In that case, {@link ExternalActivityBehaviour}
- * should be implemented to also handle the external triggers.
- * </p>
- */
+ * should be implemented to also handle the external signals.
+ * </p> */
void execute(ActivityExecution execution) throws Exception;
}
Modified:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityExecution.java
===================================================================
---
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityExecution.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ActivityExecution.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -26,7 +26,7 @@
import org.jbpm.api.model.OpenExecution;
-/** view upon an {@link Execution path of execution} exposed to
+/** view upon an {@link Execution} exposed to
* {@link ActivityBehaviour} implementations.
*
* @author Tom Baeyens
Modified:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ExternalActivityBehaviour.java
===================================================================
---
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ExternalActivityBehaviour.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/ExternalActivityBehaviour.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -24,30 +24,26 @@
import java.util.Map;
import org.jbpm.api.Execution;
+import org.jbpm.api.ExecutionService;
/** extends {@link ActivityBehaviour} for handling external triggers after a wait state.
*
- * <p>Process languages will provide a set of these activity implementations. But
- * languages like jPDL even allow users to provide their own activity behaviour with
- * this interface.
- * </p>
- *
* @author Tom Baeyens
*/
public interface ExternalActivityBehaviour extends ActivityBehaviour {
- /** handles an external trigger.
+ /** handles an external signal.
*
- * <p>An external trigger that comes into an execution
- * through one of the {@link Execution#signal()} methods, will be delegated to
- * the activity in which the execution is positioned when it receives the external
- * trigger.
+ * <p>An external signal that comes into an execution
+ * through one of the {@link ExecutionService#signalExecutionById(String)} methods.
+ * It will be delegated to the activity in which the execution is positioned when it
+ * receives the external trigger.
* </p>
*
- * <p>The signal method implements how the
- * activity will react on that signal. For example, the outgoing transition
- * could be taken that corresponds with the given signal.
+ * <p>The signal method implements how the activity will react on that signal.
+ * For example, the outgoing transition could be taken that corresponds with the
+ * given signal.
* </p>
*
* @param execution the {@link Execution} for which the signal is given
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/package.html
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/package.html 2009-07-04
13:45:15 UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/activity/package.html 2009-07-04
15:04:09 UTC (rev 5226)
@@ -1,4 +1,3 @@
-<body>interfaces for implementing
-{@link org.jbpm.pvm.activity.Activity activities}, which represent the
-runtime behaviour of activities.
+<body>interfaces for implementing customized
+{@link org.jbpm.api.activity.ActivityBehaviour runtime behaviour of activities}.
</body>
\ No newline at end of file
Modified:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryActivityInstance.java
===================================================================
---
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryActivityInstance.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryActivityInstance.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -23,19 +23,25 @@
import java.util.Date;
-/**
+/** represents one occurrence of an activity during a process
+ * instance.
+ *
* @author Tom Baeyens
*/
public interface HistoryActivityInstance {
+ /** name of the activity that was executed */
String getActivityName();
+ /** time when the activity was entered */
Date getStartTime();
+ /** might be null in case the activity is still active */
Date getEndTime();
+ /** duration in milleseconds */
long getDuration();
+ /** the execution that was related to this activity occurrence */
String getExecutionId();
-
}
\ No newline at end of file
Modified:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryActivityInstanceQuery.java
===================================================================
---
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryActivityInstanceQuery.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryActivityInstanceQuery.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -25,33 +25,57 @@
import java.util.List;
-/**
+/** query for {@link HistoryActivityInstance activity occurrences}.
+ *
* @author Tom Baeyens
*/
public interface HistoryActivityInstanceQuery {
+ /** starttime property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
String PROPERTY_STARTTIME = "startTime";
+ /** endtime property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
String PROPERTY_ENDTIME = "endTime";
+ /** executionId property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
String PROPERTY_EXECUTIONID = "executionId";
+ /** activityName property to be used as property in {@link #orderAsc(String)} and
{@link #orderDesc(String)} */
String PROPERTY_ACTIVITYNAME = "activityName";
+ /** duration property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
String PROPERTY_DURATION = "duration";
+ /** only select activity instances for the given process definition */
HistoryActivityInstanceQuery processDefinitionId(String processDefinitionId);
+
+ /** only select activity instances for the given execution */
HistoryActivityInstanceQuery executionId(String executionId);
+ /** only select activity instances started after the given time */
HistoryActivityInstanceQuery startedAfter(Date time);
+
+ /** only select activity instances started before the given time */
HistoryActivityInstanceQuery startedBefore(Date time);
+ /** only select activity instances for the given activity
+ * (this usually used in combination with {@link #processDefinitionId(String)}) */
HistoryActivityInstanceQuery activityName(String activityName);
+ /** only select activity instances that took longer then the given duration in
milliseconds */
HistoryActivityInstanceQuery tookLongerThen(long durationInMillis);
+
+ /** only select activity instances that took less then the given duration in
milliseconds */
HistoryActivityInstanceQuery tookLessThen(long durationInMillis);
+ /** order selected activity instances ascending for certain {@link #PROPERTY_STARTTIME
properties} */
HistoryActivityInstanceQuery orderAsc(String property);
+
+ /** order selected process definitions descending for certain {@link
#PROPERTY_STARTTIME properties} */
HistoryActivityInstanceQuery orderDesc(String property);
+ /** select a specific page in the result set */
HistoryActivityInstanceQuery page(int firstResult, int maxResults);
+ /** execute the query and obtain the list of {@link HistoryActivityInstance}s */
List<HistoryActivityInstance> list();
+
+ /** execute the query and obtain the unique {@link HistoryActivityInstance} */
HistoryActivityInstance uniqueResult();
}
Modified:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryProcessInstance.java
===================================================================
---
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryProcessInstance.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryProcessInstance.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -23,25 +23,50 @@
import java.util.Date;
-/**
+import org.jbpm.api.Execution;
+import org.jbpm.api.ExecutionService;
+import org.jbpm.api.ProcessInstance;
+
+/** one occurence of an execution of a process definition.
+ *
+ * Every {@link ProcessInstance} will have one HistoryProcessInstance
+ * associated. The difference is that the ProcessInstance will be
+ * deleted when it is ended. And the history information will remain
+ * in the DB. That keeps the runtime DB healthy and performant.
+ *
* @author Tom Baeyens
*/
public interface HistoryProcessInstance {
+ /** when the full process instance has come to an end */
String STATE_ENDED = "ended";
+
+ /** when the full process instance is still active */
String STATE_ACTIVE = "active";
+ /** the process instance id (== the root execution id) */
String getProcessInstanceId();
+ /** reference to the process definition */
String getProcessDefinitionId();
+ /** unique user provided business key
+ * (could be null if no such key is provided in
+ * {@link ExecutionService#startProcessInstanceById(String, java.util.Map, String)})
*/
String getKey();
+ /** {@link #STATE_ACTIVE} or {@link #STATE_ENDED} (this more coarse grained
+ * state then {@link Execution#getState()}) */
String getState();
+ /** when the process instance started */
Date getStartTime();
+ /** when the process instance ended (only not null if the
+ * process instance already ended) */
Date getEndTime();
- long getDuration();
+ /** duration of the process instance in milliseconds or null
+ * if the process instance has not yet ended */
+ Long getDuration();
}
\ No newline at end of file
Modified:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryProcessInstanceQuery.java
===================================================================
---
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryProcessInstanceQuery.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/HistoryProcessInstanceQuery.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -24,27 +24,38 @@
import java.util.List;
-
-/**
+/** query for occurences of {@link HistoryProcessInstance process instances}.
+ *
* @author Tom Baeyens
*/
public interface HistoryProcessInstanceQuery {
+ /** starttime property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
String PROPERTY_STARTTIME = "startTime";
+ /** endtime property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
String PROPERTY_ENDTIME = "endTime";
+ /** id property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
String PROPERTY_ID = "id";
+ /** state property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
String PROPERTY_STATE = "state";
+ /** duration property to be used as property in {@link #orderAsc(String)} and {@link
#orderDesc(String)} */
String PROPERTY_DURATION = "duration";
HistoryProcessInstanceQuery processInstanceId(String processInstanceId);
HistoryProcessInstanceQuery processDefinitionId(String processDefinitionId);
HistoryProcessInstanceQuery state(String state);
+ /** order selected process instances ascending for certain {@link #PROPERTY_STARTTIME
properties} */
HistoryProcessInstanceQuery orderAsc(String property);
+ /** order selected process instances ascending for certain {@link #PROPERTY_STARTTIME
properties} */
HistoryProcessInstanceQuery orderDesc(String property);
+ /** select a specific page in the result set */
HistoryProcessInstanceQuery page(int firstResult, int maxResults);
+ /** execute the query and obtain the list of {@link HistoryProcessInstance}s */
List<HistoryProcessInstance> list();
+
+ /** execute the query and obtain the unique {@link HistoryProcessInstance} */
HistoryProcessInstance uniqueResult();
}
Added: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/package.html
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/package.html
(rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/package.html 2009-07-04
15:04:09 UTC (rev 5226)
@@ -0,0 +1,2 @@
+<body>interfaces related to the {@link org.jbpm.api.HistoryService}.
+</body>
\ No newline at end of file
Property changes on:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/history/package.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/Group.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/Group.java 2009-07-04
13:45:15 UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/Group.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -22,15 +22,18 @@
package org.jbpm.api.identity;
-/** a group.
+/** a group of users.
*
* @author Tom Baeyens
*/
public interface Group {
- String TYPE_UNIT = "unit";
+ /** unique id for the group */
+ String getId();
- String getId();
+ /** name for the group (should be unique within one group type) */
String getName();
+
+ /** type or category of the group */
String getType();
}
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/User.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/User.java 2009-07-04
13:45:15 UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/User.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -22,15 +22,21 @@
package org.jbpm.api.identity;
-/** a user
+/** a user.
+ *
* @author Tom Baeyens
*/
public interface User {
+ /** unique id for the user */
String getId();
+ /** given name (aka first name) */
String getGivenName();
+
+ /** given name (aka last name) */
String getFamilyName();
+ /** the email address for the user */
String getBusinessEmail();
}
Added: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/package.html
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/package.html
(rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/package.html 2009-07-04
15:04:09 UTC (rev 5226)
@@ -0,0 +1,2 @@
+<body>User and Group interfaces related to the {@link
org.jbpm.api.IdentityService}
+</body>
\ No newline at end of file
Property changes on:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/identity/package.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/job/Job.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/job/Job.java 2009-07-04 13:45:15
UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/job/Job.java 2009-07-04 15:04:09
UTC (rev 5226)
@@ -31,20 +31,34 @@
*/
public interface Job {
+ /** unique id for this job that is used as a reference in the service methods */
String getId();
+ /** job executor identification that has acquired this job and is going to execute it
*/
String getLockOwner();
+ /** in case this is a timer, it is the time that the timer should fire, in case this
+ * is a message, it is null. */
Date getDueDate();
+ /** exception that occurred during the last execution of this job. The transaction
+ * of the job execution is rolled back. A synchronization is used to create
+ * a separate transaction to update the exception and decrement the retries. */
String getException();
+ /** number of retries left. This is only decremented when an exception occurs during
job
+ * execution. The transaction of the job execution is rolled back. A synchronization
is used to create
+ * a separate transaction to update the exception and decrement the retries. */
int getRetries();
+ /** indicates if this job should be executed separate from any other job
+ * in the same process instance */
boolean isExclusive();
+ /** the related execution */
Execution getExecution();
+ /** the related process instance */
Execution getProcessInstance();
Date getLockExpirationTime();
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/job/Timer.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/job/Timer.java 2009-07-04 13:45:15
UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/job/Timer.java 2009-07-04 15:04:09
UTC (rev 5226)
@@ -28,10 +28,15 @@
*/
public interface Timer extends Job {
+ /** the signal that sent to {@link #getExecution() the execution}
+ * when the timer fires */
String getSignalName();
+ /** the name of the event that is fired on {@link #getExecution() the execution}
+ * when the timer fires */
String getEventName();
+ /** indicates the delay for repeating this timer after successful execution */
String getRepeat();
}
\ No newline at end of file
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/job/package.html
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/job/package.html 2009-07-04
13:45:15 UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/job/package.html 2009-07-04
15:04:09 UTC (rev 5226)
@@ -1 +1,2 @@
-<body>timers and asynchronous messages</body>
\ No newline at end of file
+<body>Job, Message and Timer interfaces related to the {@link
org.jbpm.api.ManagementService}
+</body>
\ No newline at end of file
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/jpdl/DecisionHandler.java
===================================================================
---
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/jpdl/DecisionHandler.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/jpdl/DecisionHandler.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -26,9 +26,9 @@
import org.jbpm.api.model.OpenExecution;
-/**
- * @author Tom Baeyens
- */
+/** interface for supplying user programmed decisions.
+ *
+ * @author Tom Baeyens */
public interface DecisionHandler extends Serializable {
/** the name of the selected outgoing transition */
Added: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/jpdl/package.html
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/jpdl/package.html
(rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/jpdl/package.html 2009-07-04
15:04:09 UTC (rev 5226)
@@ -0,0 +1,2 @@
+<body>specific jPDL interfaces
+</body>
\ No newline at end of file
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/jpdl/package.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/listener/EventListener.java
===================================================================
---
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/listener/EventListener.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/listener/EventListener.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -24,11 +24,13 @@
import java.io.Serializable;
-/**
+/** listener to process execution events.
+ *
* @author Tom Baeyens
*/
public interface EventListener extends Serializable {
+ /** is invoked when an execution crosses the event on which this listener is registered
*/
void notify(EventListenerExecution execution) throws Exception;
}
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/listener/package.html
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/listener/package.html 2009-07-04
13:45:15 UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/listener/package.html 2009-07-04
15:04:09 UTC (rev 5226)
@@ -1,4 +1,4 @@
<body>interfaces for implementing
-{@link org.jbpm.pvm.listener.EventListener event listeners}, which represent
+{@link org.jbpm.api.listener.EventListener event listeners}, which represent
runtime behaviour that can be associated as listeners to process events.
</body>
\ No newline at end of file
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/package.html
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/package.html 2009-07-04
13:45:15 UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/model/package.html 2009-07-04
15:04:09 UTC (rev 5226)
@@ -1,2 +1,4 @@
-<body>common model base classes for the client, activity and event listener
API's
+<body>common process execution model interfaces used in services and
+delegation interfaces like {@link org.jbpm.api.activity.ActivityBehaviour} and
+{@link org.jbpm.api.listener.EventListener}.
</body>
\ No newline at end of file
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/package.html
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/package.html 2009-07-04 13:45:15
UTC (rev 5225)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/package.html 2009-07-04 15:04:09
UTC (rev 5226)
@@ -1,5 +1,5 @@
-<body>the primary facade interfaces to
-{@link org.jbpm.pvm.ProcessService the process repository},
-{@link org.jbpm.pvm.ExecutionService the execution repository}
-and {@link org.jbpm.pvm.ManagementService the management functionalities}.
+<body>the jBPM API, Start by creating a {@link org.jbpm.api.Configuration},
+build a {@link org.jbpm.api.ProcessEngine} from that, and then you can find
+the workflow methods on the services like {@link org.jbpm.api.ExecutionService},
+{@link org.jbpm.api.TaskService}.
</body>
\ No newline at end of file
Added: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/package.html
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/package.html
(rev 0)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/package.html 2009-07-04
15:04:09 UTC (rev 5226)
@@ -0,0 +1,2 @@
+<body>interfaces related to the {@link org.jbpm.api.TaskService}
+</body>
\ No newline at end of file
Property changes on: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/package.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml
===================================================================
---
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml 2009-07-04
15:04:09 UTC (rev 5226)
@@ -581,5 +581,31 @@
</section>
</section>
+
+ <section>
+ <title>Creating groups</title>
+ <para>The identity service methods to create groups are based on
+ component generated ID's.
+ </para>
+ <programlisting>public class IdentityService {
+ /** create a group new group
+ * @return the generated id for this group. */
+ String createGroup(String groupName);
+ /** create a group new group
+ * @return the generated id for this group. */
+ String createGroup(String groupName, String groupType);
+
+ /** create a group new group
+ * @return the generated id for this group. */
+ String createGroup(String groupName, String groupType, String parentGroupId);
+
+ ...
+
+}</programlisting>
+ <para>In the next release we might switch to user provided ID's for these 3
methods.
+ </para>
+
+ </section>
+
</chapter>
Modified:
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/ActivityParsingTest.java
===================================================================
---
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/ActivityParsingTest.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/ActivityParsingTest.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -23,7 +23,7 @@
import java.util.List;
-import org.jbpm.api.Problem;
+import org.jbpm.pvm.internal.xml.Problem;
/**
Modified:
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlParseTestCase.java
===================================================================
---
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlParseTestCase.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlParseTestCase.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -23,9 +23,9 @@
import java.util.List;
-import org.jbpm.api.Problem;
import org.jbpm.jpdl.internal.xml.JpdlParser;
import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.xml.Problem;
import org.jbpm.test.BaseJbpmTestCase;
Modified:
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlSchemaTest.java
===================================================================
---
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlSchemaTest.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlSchemaTest.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -23,8 +23,8 @@
import java.util.List;
-import org.jbpm.api.Problem;
import org.jbpm.jpdl.internal.xml.JpdlParser;
+import org.jbpm.pvm.internal.xml.Problem;
/**
Modified:
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/ProcessParsingTest.java
===================================================================
---
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/ProcessParsingTest.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/ProcessParsingTest.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -23,8 +23,8 @@
import java.util.List;
-import org.jbpm.api.Problem;
import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.xml.Problem;
/**
* @author Tom Baeyens
Modified:
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/TransitionParsingTest.java
===================================================================
---
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/TransitionParsingTest.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/TransitionParsingTest.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -23,10 +23,10 @@
import java.util.List;
-import org.jbpm.api.Problem;
import org.jbpm.pvm.internal.client.ClientProcessDefinition;
import org.jbpm.pvm.internal.model.Activity;
import org.jbpm.pvm.internal.model.Transition;
+import org.jbpm.pvm.internal.xml.Problem;
/**
Modified: jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/JpdlXmlTest.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/JpdlXmlTest.java 2009-07-04
13:45:15 UTC (rev 5225)
+++ jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/JpdlXmlTest.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -23,8 +23,8 @@
import java.util.List;
-import org.jbpm.api.Problem;
import org.jbpm.jpdl.internal.xml.JpdlParser;
+import org.jbpm.pvm.internal.xml.Problem;
import org.jbpm.test.BaseJbpmTestCase;
/**
Modified:
jbpm4/trunk/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReaderTest.java
===================================================================
---
jbpm4/trunk/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReaderTest.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReaderTest.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -25,10 +25,10 @@
import java.util.List;
import org.dom4j.Document;
-import org.jbpm.api.Problem;
import org.jbpm.jpdl.internal.xml.JpdlParser;
import org.jbpm.pvm.internal.cfg.JbpmConfiguration;
import org.jbpm.pvm.internal.env.EnvironmentFactory;
+import org.jbpm.pvm.internal.xml.Problem;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
Modified:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryProcessInstanceImpl.java
===================================================================
---
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryProcessInstanceImpl.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/model/HistoryProcessInstanceImpl.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -49,7 +49,7 @@
protected String endActivityName;
protected Date startTime;
protected Date endTime;
- protected long duration;
+ protected Long duration = null;
/** only here to get hibernate cascade deletes */
protected Set<HistoryActivityInstanceImpl> historyActivityInstances;
@@ -85,7 +85,7 @@
public Date getStartTime() {
return startTime;
}
- public long getDuration() {
+ public Long getDuration() {
return duration;
}
public String getProcessInstanceId() {
Modified:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/DeploymentQueryImpl.java
===================================================================
---
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/DeploymentQueryImpl.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/DeploymentQueryImpl.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -35,7 +35,7 @@
public class DeploymentQueryImpl extends AbstractQuery implements DeploymentQuery {
protected Long deploymentDbid = null;
- protected String state = null;
+ protected Boolean suspended = null;
public String hql() {
StringBuilder hql = new StringBuilder();
@@ -48,8 +48,12 @@
appendWhereClause("d.dbid = "+deploymentDbid+" ", hql);
}
- if (state!=null) {
- appendWhereClause(" d.state = '"+state+"' ", hql);
+ if (suspended!=null) {
+ if (suspended) {
+ appendWhereClause(" d.state =
'"+Deployment.STATE_SUSPENDED+"' ", hql);
+ } else {
+ appendWhereClause(" d.state !=
'"+Deployment.STATE_SUSPENDED+"' ", hql);
+ }
}
return hql.toString();
@@ -63,13 +67,13 @@
return this;
}
- public DeploymentQuery active() {
- this.state = Deployment.STATE_ACTIVE;
+ public DeploymentQuery notSuspended() {
+ suspended = false;
return this;
}
public DeploymentQuery suspended() {
- this.state = Deployment.STATE_SUSPENDED;
+ suspended = true;
return this;
}
Modified:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeployerManager.java
===================================================================
---
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeployerManager.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeployerManager.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -25,9 +25,9 @@
import java.util.List;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.Problem;
import org.jbpm.internal.log.Log;
import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.xml.Problem;
/**
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Problem.java (from
rev 5219, jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Problem.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Problem.java
(rev 0)
+++
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/Problem.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.xml;
+
+/**
+ * @author Tom Baeyens
+ */
+public interface Problem {
+
+ public abstract Throwable getCause();
+
+ public abstract int getColumn();
+
+ public abstract int getLine();
+
+ public abstract String getMsg();
+
+ public abstract String getResource();
+
+ public abstract String getSeverity();
+
+}
\ No newline at end of file
Modified:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/ProblemImpl.java
===================================================================
---
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/ProblemImpl.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/ProblemImpl.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -23,7 +23,6 @@
import java.io.Serializable;
-import org.jbpm.api.Problem;
import org.xml.sax.SAXParseException;
/**
Modified:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/ProblemList.java
===================================================================
---
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/ProblemList.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/ProblemList.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -27,7 +27,6 @@
import java.util.List;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.Problem;
import org.jbpm.pvm.internal.repository.DeploymentImpl;
import org.w3c.dom.Element;
Modified:
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/AutoWireTest.java
===================================================================
---
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/AutoWireTest.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/AutoWireTest.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -23,7 +23,7 @@
import java.util.List;
-import org.jbpm.api.Problem;
+import org.jbpm.pvm.internal.xml.Problem;
/**
* @author Tom Baeyens
Modified:
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/BasicTypeWireTest.java
===================================================================
---
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/BasicTypeWireTest.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/BasicTypeWireTest.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -23,7 +23,7 @@
import java.util.List;
-import org.jbpm.api.Problem;
+import org.jbpm.pvm.internal.xml.Problem;
/**
* @author Tom Baeyens
Modified:
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ClassWireTest.java
===================================================================
---
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ClassWireTest.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ClassWireTest.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -2,8 +2,8 @@
import java.util.List;
-import org.jbpm.api.Problem;
import org.jbpm.pvm.internal.env.Environment;
+import org.jbpm.pvm.internal.xml.Problem;
/**
* Tests for the ClassDescriptor
Modified:
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ListWireTest.java
===================================================================
---
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ListWireTest.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ListWireTest.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -25,7 +25,7 @@
import java.util.HashSet;
import java.util.List;
-import org.jbpm.api.Problem;
+import org.jbpm.pvm.internal.xml.Problem;
/**
* @author Tom Baeyens
Modified:
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/MapWireTest.java
===================================================================
---
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/MapWireTest.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/MapWireTest.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -4,7 +4,7 @@
import java.util.Map;
import java.util.TreeMap;
-import org.jbpm.api.Problem;
+import org.jbpm.pvm.internal.xml.Problem;
/**
* @author Tom Baeyens
Modified:
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ObjectWireTest.java
===================================================================
---
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ObjectWireTest.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/ObjectWireTest.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -24,7 +24,7 @@
import java.util.List;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.Problem;
+import org.jbpm.pvm.internal.xml.Problem;
/**
* @author Tom Baeyens
Modified:
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/PropertiesWireTest.java
===================================================================
---
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/PropertiesWireTest.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/PropertiesWireTest.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -24,8 +24,8 @@
import java.util.List;
import java.util.Properties;
-import org.jbpm.api.Problem;
import org.jbpm.pvm.internal.util.FileUtil;
+import org.jbpm.pvm.internal.xml.Problem;
/**
* @author Tom Baeyens
Modified:
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/RefWireTest.java
===================================================================
---
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/RefWireTest.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/RefWireTest.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -25,7 +25,7 @@
import java.util.Map;
import java.util.Set;
-import org.jbpm.api.Problem;
+import org.jbpm.pvm.internal.xml.Problem;
/**
* @author Tom Baeyens
Modified:
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/SetWireTest.java
===================================================================
---
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/SetWireTest.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/SetWireTest.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -3,7 +3,7 @@
import java.util.List;
import java.util.Set;
-import org.jbpm.api.Problem;
+import org.jbpm.pvm.internal.xml.Problem;
public class SetWireTest extends WireTestCase {
Modified:
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/WireTestCase.java
===================================================================
---
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/WireTestCase.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/WireTestCase.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -23,8 +23,8 @@
import java.util.List;
-import org.jbpm.api.Problem;
import org.jbpm.pvm.internal.wire.xml.WireParser;
+import org.jbpm.pvm.internal.xml.Problem;
import org.jbpm.test.BaseJbpmTestCase;
/**
Modified:
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/deploy/DeploymentQueryTest.java
===================================================================
---
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/deploy/DeploymentQueryTest.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/deploy/DeploymentQueryTest.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -108,7 +108,7 @@
deployments = repositoryService
.createDeploymentQuery()
- .active()
+ .notSuspended()
.list();
expectedDeploymentNames = new HashSet<String>();
Modified:
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/identity/IdentityTest.java
===================================================================
---
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/identity/IdentityTest.java 2009-07-04
13:45:15 UTC (rev 5225)
+++
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/identity/IdentityTest.java 2009-07-04
15:04:09 UTC (rev 5226)
@@ -47,17 +47,17 @@
}
public void testCreateGroup() throws Exception {
- String testGroupId = identityService.createGroup("testGroup",
Group.TYPE_UNIT, null);
+ String testGroupId = identityService.createGroup("testGroup",
"unit", null);
Group group = identityService.findGroupById(testGroupId);
assertEquals("testGroup", group.getName());
- assertEquals(Group.TYPE_UNIT, group.getType());
+ assertEquals("unit", group.getType());
identityService.deleteGroup(testGroupId);
}
public void testFindGroupsByUser() throws Exception {
- String redhatGroupId = identityService.createGroup("redhat",
Group.TYPE_UNIT, null);
+ String redhatGroupId = identityService.createGroup("redhat",
"unit", null);
identityService.createUser("jeffyu", "Jeff", "Yu");
identityService.createMembership("jeffyu", redhatGroupId);
@@ -82,10 +82,10 @@
public void testFindGroupByUserAndGroupType() throws Exception {
identityService.createUser("johndoe", "John", "Doe");
- String redhatGroupId = identityService.createGroup("redhat",
Group.TYPE_UNIT, null);
+ String redhatGroupId = identityService.createGroup("redhat",
"unit", null);
identityService.createMembership("johndoe", redhatGroupId,
"developer");
- List<Group> groups =
identityService.findGroupsByUserAndGroupType("johndoe", Group.TYPE_UNIT);
+ List<Group> groups =
identityService.findGroupsByUserAndGroupType("johndoe", "unit");
assertTrue(groups.size() > 0);
Set<String> groupNames = new HashSet<String>();
@@ -107,15 +107,15 @@
identityService.createUser("joesmoe", "Joe", "Smoe");
identityService.createUser("jackblack", "Jack",
"Black");
- String redhatGroupId = identityService.createGroup("redhat",
Group.TYPE_UNIT, null);
- String jbossId = identityService.createGroup("jboss", Group.TYPE_UNIT,
redhatGroupId);
- String jbpmId = identityService.createGroup("jbpm", Group.TYPE_UNIT,
jbossId);
+ String redhatGroupId = identityService.createGroup("redhat",
"unit", null);
+ String jbossId = identityService.createGroup("jboss", "unit",
redhatGroupId);
+ String jbpmId = identityService.createGroup("jbpm", "unit",
jbossId);
identityService.createMembership("johndoe", redhatGroupId,
"developer");
identityService.createMembership("joesmoe", jbpmId, "leader");
identityService.createMembership("jackblack", jbossId,
"manager");
- List<Group> groups =
identityService.findGroupsByUserAndGroupType("johndoe", Group.TYPE_UNIT);
+ List<Group> groups =
identityService.findGroupsByUserAndGroupType("johndoe", "unit");
assertEquals(1, groups.size());
Group group = groups.get(0);