JBoss JBPM SVN: r6595 - in jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal: history/events and 1 other directories.
by do-not-reply@jboss.org
Author: rebody
Date: 2010-08-15 11:14:11 -0400 (Sun, 15 Aug 2010)
New Revision: 6595
Modified:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddParticipationCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteDeploymentCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/RemoveParticipantCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartProcessInstanceCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ActivityEnd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ProcessInstanceCreate.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ProcessInstanceEnd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskComplete.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskSkip.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeploymentProperty.java
Log:
JBPM-2927 replace Session to DbSession.
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddParticipationCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddParticipationCmd.java 2010-08-15 06:10:08 UTC (rev 6594)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddParticipationCmd.java 2010-08-15 15:14:11 UTC (rev 6595)
@@ -21,16 +21,16 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.hibernate.Session;
import org.jbpm.api.JbpmException;
import org.jbpm.api.cmd.Environment;
+import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.task.TaskImpl;
/**
* @author Tom Baeyens
*/
public class AddParticipationCmd extends AbstractCommand<Object> {
-
+
private static final long serialVersionUID = 1L;
protected String taskId;
@@ -38,7 +38,7 @@
protected String userId;
protected String groupId;
protected String type;
-
+
public AddParticipationCmd(String taskId, String swimlaneId, String userId, String groupId, String type) {
this.taskId = taskId;
this.swimlaneId = swimlaneId;
@@ -48,12 +48,12 @@
}
public Object execute(Environment environment) throws Exception {
- Session session = environment.get(Session.class);
-
- if (taskId!=null) {
- TaskImpl task = (TaskImpl) session.get(TaskImpl.class, Long.parseLong(taskId));
- if (task==null) {
- throw new JbpmException("task "+taskId+" was not found");
+ DbSession dbSession = environment.get(DbSession.class);
+
+ if (taskId != null) {
+ TaskImpl task = (TaskImpl) dbSession.get(TaskImpl.class, Long.parseLong(taskId));
+ if (task == null) {
+ throw new JbpmException("task " + taskId + " was not found");
}
task.addParticipation(userId, groupId, type);
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteDeploymentCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteDeploymentCmd.java 2010-08-15 06:10:08 UTC (rev 6594)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteDeploymentCmd.java 2010-08-15 15:14:11 UTC (rev 6595)
@@ -23,8 +23,6 @@
import java.util.List;
-import org.hibernate.Session;
-
import org.jbpm.api.JbpmException;
import org.jbpm.api.ProcessDefinition;
import org.jbpm.api.cmd.Command;
@@ -41,16 +39,16 @@
public class DeleteDeploymentCmd implements Command<Object> {
private static final Log log = Log.getLog(DeleteDeploymentCmd.class.getName());
-
+
private static final long serialVersionUID = 1L;
-
+
String deploymentId;
boolean cascade;
-
+
public DeleteDeploymentCmd(String deploymentId) {
this.deploymentId = deploymentId;
}
-
+
public DeleteDeploymentCmd(String deploymentId, boolean cascade) {
this.deploymentId = deploymentId;
this.cascade = cascade;
@@ -61,32 +59,38 @@
List<ProcessDefinition> processDefinitions = repositorySession.createProcessDefinitionQuery()
.deploymentId(deploymentId)
.list();
-
- DbSession dbSession = environment.get(DbSession.class);
+ DbSession dbSession = environment.get(DbSession.class);
+
for (ProcessDefinition processDefinition: processDefinitions) {
String processDefinitionId = processDefinition.getId();
List<String> processInstanceIds = dbSession.findProcessInstanceIds(processDefinitionId);
-
+
if (cascade) {
- for (String processInstanceId: processInstanceIds) {
+ for (String processInstanceId : processInstanceIds) {
dbSession.deleteProcessInstance(processInstanceId, true);
}
dbSession.deleteProcessDefinitionHistory(processDefinitionId);
-
+
} else {
if (!processInstanceIds.isEmpty()) {
- throw new JbpmException("cannot delete deployment "+deploymentId+": still executions for "+processDefinition+": "+processInstanceIds);
+ throw new JbpmException("cannot delete deployment "
+ + deploymentId
+ + ": still executions for "
+ + processDefinition
+ + ": "
+ + processInstanceIds);
}
}
}
-
- Session session = environment.get(Session.class);
- DeploymentImpl deployment = (DeploymentImpl) session.load(DeploymentImpl.class, Long.parseLong(deploymentId));
- log.debug("deleting deployment "+deploymentId);
- session.delete(deployment);
-
+
+ DeploymentImpl deployment = (DeploymentImpl) dbSession.get(DeploymentImpl.class, Long.parseLong(deploymentId));
+ if (log.isDebugEnabled()) {
+ log.debug("deleting deployment " + deploymentId);
+ }
+ dbSession.delete(deployment);
+
RepositoryCache repositoryCache = environment.get(RepositoryCache.class);
repositoryCache.remove(deploymentId);
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/RemoveParticipantCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/RemoveParticipantCmd.java 2010-08-15 06:10:08 UTC (rev 6594)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/RemoveParticipantCmd.java 2010-08-15 15:14:11 UTC (rev 6595)
@@ -24,9 +24,9 @@
import java.util.HashSet;
import java.util.Set;
-import org.hibernate.Session;
import org.jbpm.api.JbpmException;
import org.jbpm.api.cmd.Environment;
+import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.task.ParticipationImpl;
import org.jbpm.pvm.internal.task.TaskImpl;
@@ -37,35 +37,35 @@
public class RemoveParticipantCmd extends AbstractCommand<Object> {
private static final long serialVersionUID = 1L;
-
+
protected Long taskDbid;
protected Long swimlaneId;
protected String userId;
protected String groupId;
protected String participationType;
-
+
public RemoveParticipantCmd(String taskId, String swimlaneId, String userId, String groupId, String participationType) {
- this.swimlaneId = (swimlaneId!=null ? Long.parseLong(swimlaneId) : null );
- this.taskDbid = (taskId!=null ? Long.parseLong(taskId) : null );
+ this.swimlaneId = (swimlaneId != null ? Long.parseLong(swimlaneId) : null);
+ this.taskDbid = (taskId != null ? Long.parseLong(taskId) : null );
this.userId = userId;
this.groupId = groupId;
this.participationType = participationType;
}
public Object execute(Environment environment) throws Exception {
- Session session = environment.get(Session.class);
+ DbSession dbSession = environment.get(DbSession.class);
- if (taskDbid!=null) {
- TaskImpl task = (TaskImpl) session.get(TaskImpl.class, taskDbid);
- if (task==null) {
- throw new JbpmException("task "+taskDbid+" was not found");
+ if (taskDbid != null) {
+ TaskImpl task = (TaskImpl) dbSession.get(TaskImpl.class, taskDbid);
+ if (task == null) {
+ throw new JbpmException("task " + taskDbid + " was not found");
}
Set<ParticipationImpl> participations = new HashSet<ParticipationImpl>(task.getParticipations());
for (ParticipationImpl participation : participations) {
boolean userMatch = userId!=null ? userId.equals(participation.getUserId()) : false;
boolean groupMatch = groupId!=null ? groupId.equals(participation.getGroupId()) : false;
- if ( ( userMatch || groupMatch )
+ if ( ( userMatch || groupMatch )
&& participation.getType().equals(participationType)
) {
task.removeParticipant(participation);
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartProcessInstanceCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartProcessInstanceCmd.java 2010-08-15 06:10:08 UTC (rev 6594)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartProcessInstanceCmd.java 2010-08-15 15:14:11 UTC (rev 6595)
@@ -23,12 +23,12 @@
import java.util.Map;
-import org.hibernate.Session;
import org.jbpm.api.JbpmException;
import org.jbpm.api.ProcessInstance;
import org.jbpm.api.cmd.Environment;
import org.jbpm.pvm.internal.client.ClientProcessDefinition;
import org.jbpm.pvm.internal.client.ClientProcessInstance;
+import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.session.RepositorySession;
/**
@@ -37,7 +37,7 @@
public class StartProcessInstanceCmd extends VariablesCmd<ProcessInstance> {
private static final long serialVersionUID = 1L;
-
+
protected String processDefinitionId;
protected String executionKey;
@@ -54,14 +54,14 @@
if (processDefinition==null) {
throw new JbpmException("no process definition with id '"+processDefinitionId+"'");
}
-
+
ClientProcessInstance processInstance = processDefinition.createProcessInstance(executionKey);
processInstance.setVariables(variables);
processInstance.start();
if (!processInstance.isEnded()) {
- Session session = environment.get(Session.class);
- session.save(processInstance);
+ DbSession dbSession = environment.get(DbSession.class);
+ dbSession.save(processInstance);
}
return processInstance;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ActivityEnd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ActivityEnd.java 2010-08-15 06:10:08 UTC (rev 6594)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ActivityEnd.java 2010-08-15 15:14:11 UTC (rev 6595)
@@ -21,10 +21,10 @@
*/
package org.jbpm.pvm.internal.history.events;
-import org.hibernate.Session;
import org.jbpm.pvm.internal.env.EnvironmentImpl;
import org.jbpm.pvm.internal.history.HistoryEvent;
import org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl;
+import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.util.Clock;
@@ -36,7 +36,7 @@
private static final long serialVersionUID = 1L;
protected String transitionName;
-
+
public ActivityEnd() {
}
@@ -45,12 +45,12 @@
}
public void process() {
- Session session = EnvironmentImpl.getFromCurrent(Session.class);
+ DbSession dbSession = EnvironmentImpl.getFromCurrent(DbSession.class);
Long historyActivityInstanceDbId = execution.getHistoryActivityInstanceDbid();
- HistoryActivityInstanceImpl historyActivityInstance = (HistoryActivityInstanceImpl)
- session.load(getHistoryActivityInstanceClass(), historyActivityInstanceDbId);
+ HistoryActivityInstanceImpl historyActivityInstance = (HistoryActivityInstanceImpl)
+ dbSession.get(getHistoryActivityInstanceClass(), historyActivityInstanceDbId);
updateHistoryActivityInstance(historyActivityInstance);
- session.update(historyActivityInstance);
+ dbSession.update(historyActivityInstance);
}
protected void updateHistoryActivityInstance(HistoryActivityInstanceImpl historyActivityInstance) {
@@ -61,9 +61,9 @@
protected Class<? extends HistoryActivityInstanceImpl> getHistoryActivityInstanceClass() {
return HistoryActivityInstanceImpl.class;
}
-
+
public String getTransitionName() {
return transitionName;
}
-
+
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ProcessInstanceCreate.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ProcessInstanceCreate.java 2010-08-15 06:10:08 UTC (rev 6594)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ProcessInstanceCreate.java 2010-08-15 15:14:11 UTC (rev 6595)
@@ -21,12 +21,11 @@
*/
package org.jbpm.pvm.internal.history.events;
-import org.hibernate.Session;
-
import org.jbpm.api.history.HistoryProcessInstance;
import org.jbpm.pvm.internal.env.EnvironmentImpl;
import org.jbpm.pvm.internal.history.HistoryEvent;
import org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl;
+import org.jbpm.pvm.internal.session.DbSession;
/**
* @author Tom Baeyens
@@ -34,10 +33,10 @@
public class ProcessInstanceCreate extends HistoryEvent {
private static final long serialVersionUID = 1L;
-
+
public void process() {
HistoryProcessInstance historyProcessInstanceImpl = new HistoryProcessInstanceImpl(execution);
- Session session = EnvironmentImpl.getFromCurrent(Session.class);
- session.save(historyProcessInstanceImpl);
+ DbSession dbSession = EnvironmentImpl.getFromCurrent(DbSession.class);
+ dbSession.save(historyProcessInstanceImpl);
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ProcessInstanceEnd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ProcessInstanceEnd.java 2010-08-15 06:10:08 UTC (rev 6594)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/ProcessInstanceEnd.java 2010-08-15 15:14:11 UTC (rev 6595)
@@ -21,10 +21,10 @@
*/
package org.jbpm.pvm.internal.history.events;
-import org.hibernate.Session;
import org.jbpm.pvm.internal.env.EnvironmentImpl;
import org.jbpm.pvm.internal.history.HistoryEvent;
import org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl;
+import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.util.Clock;
/**
@@ -35,11 +35,12 @@
private static final long serialVersionUID = 1L;
public void process() {
- Session session = EnvironmentImpl.getFromCurrent(Session.class);
- HistoryProcessInstanceImpl historyProcessInstanceImpl = (HistoryProcessInstanceImpl)
- session.load(HistoryProcessInstanceImpl.class, execution.getDbid());
+ DbSession dbSession = EnvironmentImpl.getFromCurrent(DbSession.class);
+ HistoryProcessInstanceImpl historyProcessInstanceImpl = (HistoryProcessInstanceImpl)
+ dbSession.get(HistoryProcessInstanceImpl.class, execution.getDbid());
historyProcessInstanceImpl.setEndTime(Clock.getTime());
historyProcessInstanceImpl.setState(execution.getState());
historyProcessInstanceImpl.setEndActivityName(execution.getActivityName());
+ dbSession.update(historyProcessInstanceImpl);
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskComplete.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskComplete.java 2010-08-15 06:10:08 UTC (rev 6594)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskComplete.java 2010-08-15 15:14:11 UTC (rev 6595)
@@ -21,12 +21,12 @@
*/
package org.jbpm.pvm.internal.history.events;
-import org.hibernate.Session;
import org.jbpm.api.history.HistoryTask;
import org.jbpm.pvm.internal.env.EnvironmentImpl;
import org.jbpm.pvm.internal.history.HistoryEvent;
import org.jbpm.pvm.internal.history.model.HistoryTaskImpl;
import org.jbpm.pvm.internal.history.model.HistoryTaskInstanceImpl;
+import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.util.Clock;
@@ -37,7 +37,7 @@
public class TaskComplete extends HistoryEvent {
private static final long serialVersionUID = 1L;
-
+
protected String outcome;
public TaskComplete(String outcome) {
@@ -45,10 +45,10 @@
}
public void process() {
- Session session = EnvironmentImpl.getFromCurrent(Session.class);
+ DbSession dbSession = EnvironmentImpl.getFromCurrent(DbSession.class);
Long historyActivityInstanceDbId = execution.getHistoryActivityInstanceDbid();
- HistoryTaskInstanceImpl historyTaskInstance = (HistoryTaskInstanceImpl)
- session.load(HistoryTaskInstanceImpl.class, historyActivityInstanceDbId);
+ HistoryTaskInstanceImpl historyTaskInstance = (HistoryTaskInstanceImpl)
+ dbSession.get(HistoryTaskInstanceImpl.class, historyActivityInstanceDbId);
historyTaskInstance.setEndTime(Clock.getTime());
historyTaskInstance.setTransitionName(outcome);
@@ -57,11 +57,11 @@
historyTask.setEndTime(Clock.getTime());
historyTask.setState(HistoryTask.STATE_COMPLETED);
- session.update(historyTaskInstance);
+ dbSession.update(historyTaskInstance);
}
public String getOutcome() {
return outcome;
}
-
+
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskSkip.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskSkip.java 2010-08-15 06:10:08 UTC (rev 6594)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/history/events/TaskSkip.java 2010-08-15 15:14:11 UTC (rev 6595)
@@ -21,12 +21,12 @@
*/
package org.jbpm.pvm.internal.history.events;
-import org.hibernate.Session;
import org.jbpm.api.history.HistoryTask;
import org.jbpm.pvm.internal.env.EnvironmentImpl;
import org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl;
import org.jbpm.pvm.internal.history.model.HistoryTaskImpl;
import org.jbpm.pvm.internal.history.model.HistoryTaskInstanceImpl;
+import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.task.TaskImpl;
import org.jbpm.pvm.internal.util.Clock;
@@ -52,10 +52,10 @@
HistoryActivityInstanceImpl historyActivityInstance) {
super.updateHistoryActivityInstance(historyActivityInstance);
- Session session = EnvironmentImpl.getFromCurrent(Session.class);
+ DbSession dbSession = EnvironmentImpl.getFromCurrent(DbSession.class);
Long historyTaskInstanceId = execution.getHistoryActivityInstanceDbid();
- HistoryTaskInstanceImpl historyTaskInstance = (HistoryTaskInstanceImpl) session
- .load(HistoryTaskInstanceImpl.class, historyTaskInstanceId);
+ HistoryTaskInstanceImpl historyTaskInstance = (HistoryTaskInstanceImpl) dbSession
+ .get(HistoryTaskInstanceImpl.class, historyTaskInstanceId);
historyTaskInstance.setEndTime(Clock.getTime());
historyTaskInstance.setTransitionName(outcome);
@@ -64,7 +64,7 @@
historyTask.setEndTime(Clock.getTime());
historyTask.setState(HistoryTask.STATE_OBSOLETE);
- session.update(historyTaskInstance);
+ dbSession.update(historyTaskInstance);
}
@Override
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeploymentProperty.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeploymentProperty.java 2010-08-15 06:10:08 UTC (rev 6594)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeploymentProperty.java 2010-08-15 15:14:11 UTC (rev 6595)
@@ -23,17 +23,17 @@
import java.io.Serializable;
-import org.hibernate.Session;
import org.jbpm.api.JbpmException;
import org.jbpm.pvm.internal.env.EnvironmentImpl;
import org.jbpm.pvm.internal.id.DbidGenerator;
+import org.jbpm.pvm.internal.session.DbSession;
/**
* @author Tom Baeyens
*/
public class DeploymentProperty implements Serializable {
-
+
private static final long serialVersionUID = 1L;
long dbid;
@@ -42,20 +42,20 @@
protected String key;
protected String stringValue;
protected Long longValue;
-
+
public DeploymentProperty() {
}
-
+
public DeploymentProperty(DeploymentImpl deployment, String objectName, String key) {
this.dbid = DbidGenerator.getDbidGenerator().getNextId();
- EnvironmentImpl.getFromCurrent(Session.class).save(this);
+ EnvironmentImpl.getFromCurrent(DbSession.class).save(this);
this.deployment = deployment;
this.objectName = objectName;
this.key = key;
}
-
+
public String toString() {
- return "{"+objectName+","+key+","+(stringValue!=null?stringValue:longValue)+"}";
+ return "{" + objectName + "," + key + "," + (stringValue != null ? stringValue : longValue) + "}";
}
public String getObjectName() {
@@ -81,20 +81,20 @@
}
public void setValue(Object value) {
- if (value==null) {
+ if (value == null) {
stringValue = null;
longValue = null;
} else if (value instanceof String) {
- stringValue = (String)value;
+ stringValue = (String) value;
} else if (value instanceof Long) {
- longValue = (Long)value;
+ longValue = (Long) value;
} else {
- throw new JbpmException("value type "+value.getClass().getName()+" not supported (only string and long)");
+ throw new JbpmException("value type " + value.getClass().getName() + " not supported (only string and long)");
}
}
-
+
public Object getValue() {
- if (stringValue!=null) {
+ if (stringValue != null) {
return stringValue;
}
return longValue;
13 years, 10 months
JBoss JBPM SVN: r6594 - in jbpm4/trunk/modules: pvm/src/main/java/org/jbpm/pvm/internal/query and 2 other directories.
by do-not-reply@jboss.org
Author: rebody
Date: 2010-08-15 02:10:08 -0400 (Sun, 15 Aug 2010)
New Revision: 6594
Added:
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskUnassignedCandidatesTest.java
Modified:
jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/bpmn/usertask/UserTaskTest.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/TaskQueryImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/TaskServiceImpl.java
Log:
JBPM-2773 allow query assigned candidates tasks
Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/bpmn/usertask/UserTaskTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/bpmn/usertask/UserTaskTest.java 2010-08-15 04:31:28 UTC (rev 6593)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/bpmn/usertask/UserTaskTest.java 2010-08-15 06:10:08 UTC (rev 6594)
@@ -35,35 +35,35 @@
* @author Joram Barrez
*/
public class UserTaskTest extends JbpmTestCase {
-
- private static String[] PROCESS_LOCATIONS =
+
+ private static String[] PROCESS_LOCATIONS =
{"org/jbpm/examples/bpmn/task/usertask/user_task_potential_owner_user.bpmn.xml",
"org/jbpm/examples/bpmn/task/usertask/user_task_potential_owner_group.bpmn.xml",
"org/jbpm/examples/bpmn/task/usertask/user_task_human_performer_user.bpmn.xml",
"org/jbpm/examples/bpmn/task/usertask/user_task_human_performer_variable.bpmn.xml"};
-
+
private static final String PETER = "peter";
private static final String MARY = "mary";
-
+
@Override
protected void setUp() throws Exception {
super.setUp();
-
+
for (String processLocation: PROCESS_LOCATIONS) {
NewDeployment deployment = repositoryService.createDeployment();
deployment.addResourceFromClasspath(processLocation);
- registerDeployment(deployment.deploy());
+ registerDeployment(deployment.deploy());
}
-
+
identityService.createGroup("management");
-
+
identityService.createUser(PETER, "Peter", "Pan");
identityService.createMembership(PETER, "management");
-
+
identityService.createUser(MARY, "Mary", "Littlelamb");
identityService.createMembership(MARY, "management");
}
-
+
@Override
protected void tearDown() throws Exception {
identityService.deleteGroup("management");
@@ -71,7 +71,7 @@
identityService.deleteUser(MARY);
super.tearDown();
}
-
+
public void testPotentialOwnerUser() {
ProcessInstance processInstance = executionService.startProcessInstanceByKey("userTaskPotentialOwnerUser");
Task task = taskService.createTaskQuery().candidate(PETER).uniqueResult();
@@ -79,28 +79,28 @@
taskService.completeTask(task.getId());
assertProcessInstanceEnded(processInstance);
}
-
+
public void testPotentialOwnerGroup() {
ProcessInstance processInstance = executionService.startProcessInstanceByKey("userTaskPotentialOwnerGroup");
-
+
// Peter and Mary are both part of management, so they both should see the task
List<Task> tasks = taskService.findGroupTasks(PETER);
assertEquals(1, tasks.size());
tasks = taskService.findGroupTasks(MARY);
assertEquals(1, tasks.size());
-
+
// Mary claims the task
Task task = tasks.get(0);
taskService.takeTask(task.getId(), MARY);
- assertNull(taskService.createTaskQuery().candidate(PETER).uniqueResult());
-
+ assertNull(taskService.createTaskQuery().candidate(PETER).unassigned().uniqueResult());
+
taskService.completeTask(task.getId());
assertProcessInstanceEnded(processInstance);
}
-
+
public void testHumanPerformerUser() {
ProcessInstance processInstance = executionService.startProcessInstanceByKey("userTaskHumanPerformerUser");
- Task task = taskService.findPersonalTasks(MARY).get(0);
+ Task task = taskService.findPersonalTasks(MARY).get(0);
assertNotNull(task);
taskService.completeTask(task.getId());
assertProcessInstanceEnded(processInstance);
@@ -116,6 +116,6 @@
taskService.completeTask(task.getId());
assertProcessInstanceEnded(processInstance);
}
-
+
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/TaskQueryImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/TaskQueryImpl.java 2010-08-15 04:31:28 UTC (rev 6593)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/TaskQueryImpl.java 2010-08-15 06:10:08 UTC (rev 6594)
@@ -73,7 +73,6 @@
public TaskQuery candidate(String userId) {
this.candidate = userId;
- unassigned();
return this;
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/TaskServiceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/TaskServiceImpl.java 2010-08-15 04:31:28 UTC (rev 6593)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/TaskServiceImpl.java 2010-08-15 06:10:08 UTC (rev 6594)
@@ -79,7 +79,7 @@
public void deleteTask(String taskId, String reason) {
commandService.execute(new DeleteTaskCmd(taskId, reason));
}
-
+
public void deleteTaskCascade(String taskId) {
commandService.execute(new DeleteTaskCmd(taskId, true));
}
@@ -87,7 +87,7 @@
public void completeTask(String taskId) {
commandService.execute(new CompleteTaskCmd(taskId));
}
-
+
public void completeTask(String taskId, Map<String, ?> variables) {
completeTask(taskId, null, variables);
}
@@ -95,7 +95,7 @@
public void completeTask(String taskId, String outcome) {
commandService.execute(new CompleteTaskCmd(taskId, outcome));
}
-
+
public void completeTask(String taskId, String outcome, Map<String, ?> variables) {
SetTaskVariablesCmd setTaskVariablesCmd = new SetTaskVariablesCmd(taskId);
setTaskVariablesCmd.setVariables(variables);
@@ -129,14 +129,15 @@
public List<Task> findPersonalTasks(String userId) {
return createTaskQuery()
.assignee(userId)
- .orderDesc(TaskQuery.PROPERTY_PRIORITY)
+ .orderDesc(TaskQuery.PROPERTY_PRIORITY)
.list();
}
public List<Task> findGroupTasks(String userId) {
return createTaskQuery()
.candidate(userId)
- .orderDesc(TaskQuery.PROPERTY_PRIORITY)
+ .unassigned()
+ .orderDesc(TaskQuery.PROPERTY_PRIORITY)
.list();
}
Added: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskUnassignedCandidatesTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskUnassignedCandidatesTest.java (rev 0)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskUnassignedCandidatesTest.java 2010-08-15 06:10:08 UTC (rev 6594)
@@ -0,0 +1,98 @@
+/*
+ * 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.test.task;
+
+import java.util.List;
+
+import org.jbpm.api.ProcessInstance;
+import org.jbpm.api.task.Task;
+import org.jbpm.test.JbpmTestCase;
+
+/**
+ * @author Huisheng Xu
+ */
+public class TaskUnassignedCandidatesTest extends JbpmTestCase {
+
+ public static final String PROCESS_XML = "<process name='TaskCandidates'>"
+ + " <start g='20,20,48,48'>"
+ + " <transition to='review' />"
+ + " </start>"
+ + " <task name='review'"
+ + " candidate-groups='sales-dept'"
+ + " g='96,16,127,52'>"
+ + " <transition to='wait' />"
+ + " </task>"
+ + " <state name='wait' g='255,16,88,52'/>"
+ + "</process>";
+
+ String deploymentId;
+ String dept;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ // create identities
+ dept = identityService.createGroup("sales-dept");
+
+ identityService.createUser("johndoe", "John", "Doe");
+ identityService.createMembership("johndoe", dept, "developer");
+
+ identityService.createUser("joesmoe", "Joe", "Smoe");
+ identityService.createMembership("joesmoe", dept, "developer");
+
+ // deploy process
+ deployJpdlXmlString(PROCESS_XML);
+ }
+
+ protected void tearDown() throws Exception {
+ // delete identities
+ identityService.deleteGroup(dept);
+ identityService.deleteUser("johndoe");
+ identityService.deleteUser("joesmoe");
+
+ super.tearDown();
+ }
+
+ public void testGroupCandidateAssignmentQueryAllCandidateTasks() {
+ executionService.startProcessInstanceByKey("TaskCandidates");
+
+ List<Task> taskList = taskService.findGroupTasks("johndoe");
+ Task task = taskList.get(0);
+ taskService.takeTask(task.getId(), "johndoe");
+
+ // should return assigned tasks as well, but doesn't
+ taskList = taskService.createTaskQuery().candidate("joesmoe").list();
+ assertContainsTask(taskList, "review");
+ }
+
+ public void testGroupCandidateAssignmentQueryUnassignedCandidateTasks() {
+ executionService.startProcessInstanceByKey("TaskCandidates");
+
+ List<Task> taskList = taskService.findGroupTasks("johndoe");
+ Task task = taskList.get(0);
+ taskService.takeTask(task.getId(), "johndoe");
+
+ // should return only unassigned candidate tasks (as before)
+ taskList = taskService.createTaskQuery().candidate("joesmoe").unassigned().list();
+ assertEquals(0, taskList.size());
+ }
+}
13 years, 10 months
JBoss JBPM SVN: r6593 - in jbpm4/trunk/modules/pvm/src: test/java/org/jbpm/pvm/internal/cal and 1 other directory.
by do-not-reply@jboss.org
Author: rebody
Date: 2010-08-15 00:31:28 -0400 (Sun, 15 Aug 2010)
New Revision: 6593
Modified:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/BusinessCalendarImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/Day.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/cal/BusinessCalendarTest.java
Log:
JBPM-2814 working on check unconfigured days
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/BusinessCalendarImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/BusinessCalendarImpl.java 2010-08-15 03:39:21 UTC (rev 6592)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/BusinessCalendarImpl.java 2010-08-15 04:31:28 UTC (rev 6593)
@@ -52,16 +52,16 @@
protected long secondInMillis = 1000;
protected long minuteInMillis = 60000;
protected long hourInMillis = 3600000;
- protected long dayInMillis = 24*hourInMillis;
- protected long weekInMillis = 7*dayInMillis;
- protected long monthInMillis = 30*dayInMillis;
- protected long yearInMillis = 365*dayInMillis;
+ protected long dayInMillis = 24 * hourInMillis;
+ protected long weekInMillis = 7 * dayInMillis;
+ protected long monthInMillis = 30 * dayInMillis;
+ protected long yearInMillis = 365 * dayInMillis;
//TODO: calculate these numbers based on business calendar config
- protected long businessDayInMillis = 8*hourInMillis;
- protected long businessWeekInMillis = 40*hourInMillis;
- protected long businessMonthInMillis = 21*dayInMillis;
- protected long businessYearInMillis = 220*dayInMillis;
+ protected long businessDayInMillis = 8 * hourInMillis;
+ protected long businessWeekInMillis = 40 * hourInMillis;
+ protected long businessMonthInMillis = 21 * dayInMillis;
+ protected long businessYearInMillis = 220 * dayInMillis;
/** constructor for persistence and creating an empty business calendar */
public BusinessCalendarImpl() {
@@ -84,22 +84,31 @@
public Date subtract(Date date, Duration duration) {
Date end = null;
+ DayPart dayPart = null;
if (duration.isBusinessTime()) {
- DayPart dayPart = findDayPart(date);
- boolean isInbusinessHours = (dayPart!=null);
- if (! isInbusinessHours) {
- Object[] result = new Object[2];
- Day day = findDay(date);
- day.findPreviousDayPartStart((day.getDayParts()!=null ? day.getDayParts().length-1 : 0), date, result);
+ dayPart = findDayPart(date);
+ boolean isInbusinessHours = (dayPart != null);
+ if (! isInbusinessHours) {
+ Object[] result = new Object[2];
+ Day day = findDay(date);
+ if (day != null) {
+ day.findPreviousDayPartStart(
+ (day.getDayParts() != null ? day.getDayParts().length - 1 : 0),
+ date,
+ result);
date = (Date) result[0];
dayPart = (DayPart) result[1];
}
- long millis = convertToMillis(duration);
- end = dayPart.subtract(date, millis, duration.isBusinessTime());
+ }
+ }
+
+ long millis = convertToMillis(duration);
+ if (dayPart == null) {
+ end = new Date(date.getTime() - millis);
} else {
- long millis = convertToMillis(duration);
- end = new Date(date.getTime()-millis);
+ end = dayPart.subtract(date, millis, duration.isBusinessTime());
}
+
if (end.before(Clock.getTime())) {
if (log.isWarnEnabled()) {
log.warn("Duedate : [" + end + "] in the past of start : [" + date + "]");
@@ -112,21 +121,28 @@
public Date add(Date date, Duration duration) {
Date end = null;
+ DayPart dayPart = null;
if (duration.isBusinessTime()) {
- DayPart dayPart = findDayPart(date);
+ dayPart = findDayPart(date);
boolean isInbusinessHours = (dayPart!=null);
if (! isInbusinessHours) {
Object[] result = new Object[2];
- findDay(date).findNextDayPartStart(0, date, result);
- date = (Date) result[0];
- dayPart = (DayPart) result[1];
+ Day day = findDay(date);
+ if (day != null) {
+ day.findNextDayPartStart(0, date, result);
+ date = (Date) result[0];
+ dayPart = (DayPart) result[1];
+ }
}
- long millis = convertToMillis(duration);
+ }
+
+ long millis = convertToMillis(duration);
+ if (dayPart == null) {
+ end = new Date(date.getTime() + millis);
+ } else {
end = dayPart.add(date, millis, duration.isBusinessTime());
- } else {
- long millis = convertToMillis(duration);
- end = new Date(date.getTime()+millis);
}
+
return end;
}
@@ -150,11 +166,11 @@
}
public boolean isInBusinessHours(Date date) {
- return (findDayPart(date)!=null);
+ return (findDayPart(date) != null);
}
public boolean isHoliday(Date date) {
- if (holidays!=null) {
+ if (holidays != null) {
for(Holiday holiday: holidays) {
if (holiday.includes(date)) {
return true;
@@ -173,7 +189,7 @@
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
date = calendar.getTime();
- while(isHoliday(date)) {
+ while (isHoliday(date)) {
calendar.setTime(date);
calendar.add(Calendar.DATE, 1);
date = calendar.getTime();
@@ -203,6 +219,10 @@
}
protected Day findDay(Date date) {
+ if (days == null) {
+ log.trace("business days is unconfigured.");
+ return null;
+ }
Calendar calendar = createCalendar();
calendar.setTime(date);
int weekDayIndex = calendar.get(Calendar.DAY_OF_WEEK);
@@ -213,9 +233,12 @@
DayPart dayPart = null;
if (! isHoliday(date)) {
Day day = findDay(date);
+ if (day == null) {
+ return null;
+ }
DayPart[] dayParts = day.getDayParts();
- if (dayParts!=null) {
- for (int i=0; ((i < dayParts.length) && (dayPart==null)); i++) {
+ if (dayParts != null) {
+ for (int i = 0; ((i < dayParts.length) && (dayPart == null)); i++) {
DayPart candidate = dayParts[i];
if (candidate.includes(date)) {
dayPart = candidate;
@@ -234,6 +257,9 @@
date = findStartOfNextDay(date);
Object result[] = new Object[2];
Day day = findDay(date);
+ if (day == null) {
+ return null;
+ }
day.findNextDayPartStart(0, date, result);
nextDayPart = (DayPart) result[1];
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/Day.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/Day.java 2010-08-15 03:39:21 UTC (rev 6592)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/Day.java 2010-08-15 04:31:28 UTC (rev 6593)
@@ -56,23 +56,26 @@
}
public void findPreviousDayPartStart(int dayPartIndex, Date date, Object[] result) {
- // if there is a day part in this day that starts before the given date
- if ( (dayParts!=null)
- && (dayPartIndex >= 0)
- ) {
- if (dayParts[dayPartIndex].isEndBefore(date)) {
- result[0] = dayParts[dayPartIndex].getEndTime(date);
- result[1] = dayParts[dayPartIndex];
- } else {
- findPreviousDayPartStart(dayPartIndex-1, date, result);
- }
- } else {
- // descend recursively
- date = businessCalendarImpl.findStartOfPreviousDay(date);
- Day previousDay = businessCalendarImpl.findDay(date);
- previousDay.findPreviousDayPartStart((previousDay.getDayParts()!=null ? previousDay.getDayParts().length-1 : 0), date, result);
- }
+ // if there is a day part in this day that starts before the given date
+ if ( (dayParts != null)
+ && (dayPartIndex >= 0)
+ ) {
+ if (dayParts[dayPartIndex].isEndBefore(date)) {
+ result[0] = dayParts[dayPartIndex].getEndTime(date);
+ result[1] = dayParts[dayPartIndex];
+ } else {
+ findPreviousDayPartStart(dayPartIndex - 1, date, result);
}
+ } else {
+ // descend recursively
+ date = businessCalendarImpl.findStartOfPreviousDay(date);
+ Day previousDay = businessCalendarImpl.findDay(date);
+ previousDay.findPreviousDayPartStart(
+ (previousDay.getDayParts() != null ? previousDay.getDayParts().length - 1 : 0),
+ date,
+ result);
+ }
+ }
public BusinessCalendarImpl getBusinessCalendar() {
return businessCalendarImpl;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/cal/BusinessCalendarTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/cal/BusinessCalendarTest.java 2010-08-15 03:39:21 UTC (rev 6592)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/cal/BusinessCalendarTest.java 2010-08-15 04:31:28 UTC (rev 6593)
@@ -14,4 +14,13 @@
assertEquals(end.getYear(), start.getYear());
}
+
+ public void testWithoutSettingDays() {
+ BusinessCalendarImpl businessCalendar = new BusinessCalendarImpl();
+
+ Date start = new Date();
+ Date end = businessCalendar.subtract(start, new Duration("1 business day"));
+
+ assertEquals(end.getDay(), start.getDay());
+ }
}
13 years, 10 months
JBoss JBPM SVN: r6592 - in jbpm4/trunk/modules: pvm/src/main/java/org/jbpm/pvm/internal/cal and 1 other directories.
by do-not-reply@jboss.org
Author: rebody
Date: 2010-08-14 23:39:21 -0400 (Sat, 14 Aug 2010)
New Revision: 6592
Modified:
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/BusinessCalendarImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/Day.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/DayPart.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/Duration.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/timer/TimerTest.java
Log:
JBPM-2759 provide subtract for business day.
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 2010-08-15 02:44:16 UTC (rev 6591)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml 2010-08-15 03:39:21 UTC (rev 6592)
@@ -80,7 +80,6 @@
that only business hours should be taken into account for this duration. Without
the indication business, the duration will be interpreted as an absolute time period.
How to configure business hours is explained in <xref linkend="businesscalendar"/>
- <emphasis>Note: 'business' is not supported when subtracting from a base date!</emphasis>
</para>
<section id="baseDate">
@@ -113,7 +112,6 @@
<reminder name="hitBoss" duedate="#{payRaiseDay} + 3 days" repeat="#{iritationFactor}" />
</programlisting>
- <para>Remember, the following example, a subtraction in combination with 'business', is <emphasis>not</emphasis> supported and will throw an exception, as will resulting due dates that will be in the past</para>
<programlisting language="xml"><reminder name="toGoOrNotToGo" duedate="#{goLive} - 3 business days"/></programlisting>
</section>
</section>
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/BusinessCalendarImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/BusinessCalendarImpl.java 2010-08-15 02:44:16 UTC (rev 6591)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/BusinessCalendarImpl.java 2010-08-15 03:39:21 UTC (rev 6592)
@@ -57,6 +57,7 @@
protected long monthInMillis = 30*dayInMillis;
protected long yearInMillis = 365*dayInMillis;
+ //TODO: calculate these numbers based on business calendar config
protected long businessDayInMillis = 8*hourInMillis;
protected long businessWeekInMillis = 40*hourInMillis;
protected long businessMonthInMillis = 21*dayInMillis;
@@ -78,16 +79,27 @@
}
public Date subtract(Date date, String duration) {
- if (duration.contains("business")) {
- throw new JbpmException("Duedate subtraction not supported for business durations");
- }
return subtract(date, new Duration(duration));
}
public Date subtract(Date date, Duration duration) {
Date end = null;
- long millis = convertToMillis(duration);
- end = new Date(date.getTime() - millis);
+ if (duration.isBusinessTime()) {
+ DayPart dayPart = findDayPart(date);
+ boolean isInbusinessHours = (dayPart!=null);
+ if (! isInbusinessHours) {
+ Object[] result = new Object[2];
+ Day day = findDay(date);
+ day.findPreviousDayPartStart((day.getDayParts()!=null ? day.getDayParts().length-1 : 0), date, result);
+ date = (Date) result[0];
+ dayPart = (DayPart) result[1];
+ }
+ long millis = convertToMillis(duration);
+ end = dayPart.subtract(date, millis, duration.isBusinessTime());
+ } else {
+ long millis = convertToMillis(duration);
+ end = new Date(date.getTime()-millis);
+ }
if (end.before(Clock.getTime())) {
if (log.isWarnEnabled()) {
log.warn("Duedate : [" + end + "] in the past of start : [" + date + "]");
@@ -169,6 +181,23 @@
return date;
}
+ protected Date findStartOfPreviousDay(Date date) {
+ Calendar calendar = createCalendar();
+ calendar.setTime(date);
+ calendar.add(Calendar.DATE, -1);
+ calendar.set(Calendar.HOUR_OF_DAY, 23);
+ calendar.set(Calendar.MINUTE, 59);
+ calendar.set(Calendar.SECOND, 59);
+ calendar.set(Calendar.MILLISECOND, 999);
+ date = calendar.getTime();
+ while(isHoliday(date)) {
+ calendar.setTime(date);
+ calendar.add(Calendar.DATE, -1);
+ date = calendar.getTime();
+ }
+ return date;
+ }
+
public Calendar createCalendar() {
return new GregorianCalendar();
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/Day.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/Day.java 2010-08-15 02:44:16 UTC (rev 6591)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/Day.java 2010-08-15 03:39:21 UTC (rev 6592)
@@ -28,9 +28,9 @@
* is a day on a business calendar.
*/
public class Day implements Serializable {
-
+
private static final long serialVersionUID = 1L;
-
+
protected long oid = -1;
protected int version = 0;
protected DayPart[] dayParts = null;
@@ -55,6 +55,25 @@
}
}
+ public void findPreviousDayPartStart(int dayPartIndex, Date date, Object[] result) {
+ // if there is a day part in this day that starts before the given date
+ if ( (dayParts!=null)
+ && (dayPartIndex >= 0)
+ ) {
+ if (dayParts[dayPartIndex].isEndBefore(date)) {
+ result[0] = dayParts[dayPartIndex].getEndTime(date);
+ result[1] = dayParts[dayPartIndex];
+ } else {
+ findPreviousDayPartStart(dayPartIndex-1, date, result);
+ }
+ } else {
+ // descend recursively
+ date = businessCalendarImpl.findStartOfPreviousDay(date);
+ Day previousDay = businessCalendarImpl.findDay(date);
+ previousDay.findPreviousDayPartStart((previousDay.getDayParts()!=null ? previousDay.getDayParts().length-1 : 0), date, result);
+ }
+ }
+
public BusinessCalendarImpl getBusinessCalendar() {
return businessCalendarImpl;
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/DayPart.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/DayPart.java 2010-08-15 02:44:16 UTC (rev 6591)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/DayPart.java 2010-08-15 03:39:21 UTC (rev 6592)
@@ -26,13 +26,13 @@
import java.util.Date;
/**
- * is part of a day that can for example be used to represent business hours.
+ * is part of a day that can for example be used to represent business hours.
*
*/
public class DayPart implements Serializable {
private static final long serialVersionUID = 1L;
-
+
protected long oid = -1;
protected int version = 0;
protected int fromHour = -1;
@@ -44,7 +44,7 @@
public Date add(Date date, long millis, boolean isBusinessTime) {
Date end = null;
-
+
BusinessCalendarImpl businessCalendarImpl = day.getBusinessCalendar();
Calendar calendar = businessCalendarImpl.createCalendar();
calendar.setTime(date);
@@ -54,52 +54,97 @@
long dateMilliseconds = ((hour*60)+minute)*60*1000;
long dayPartEndMilleseconds = ((toHour*60)+toMinute)*60*1000;
long millisecondsInThisDayPart = dayPartEndMilleseconds - dateMilliseconds;
-
+
if (millis <= millisecondsInThisDayPart) {
end = new Date( date.getTime() + millis);
} else {
long remainderMillis = millis - millisecondsInThisDayPart;
Date dayPartEndDate = new Date(date.getTime() + millis - remainderMillis);
-
+
Object[] result = new Object[2];
day.findNextDayPartStart(index+1, dayPartEndDate, result);
Date nextDayPartStart = (Date) result[0];
DayPart nextDayPart = (DayPart) result[1];
-
+
end = nextDayPart.add(nextDayPartStart, remainderMillis, isBusinessTime);
}
-
+
return end;
}
-
+
+ public Date subtract(Date date, long millis, boolean isBusinessTime) {
+ Date end = null;
+
+ BusinessCalendarImpl businessCalendarImpl = day.getBusinessCalendar();
+ Calendar calendar = businessCalendarImpl.createCalendar();
+ calendar.setTime(date);
+ int hour = calendar.get(Calendar.HOUR_OF_DAY);
+ int minute = calendar.get(Calendar.MINUTE);
+
+ long dateMilliseconds = ((hour*60)+minute)*60*1000;
+ long dayPartStartMilleseconds = ((fromHour*60)+fromMinute)*60*1000;
+ long millisecondsInThisDayPart = dateMilliseconds - dayPartStartMilleseconds;
+
+ if (millis <= millisecondsInThisDayPart) {
+ end = new Date( date.getTime() - millis);
+ } else {
+ long remainderMillis = millis - millisecondsInThisDayPart;
+ Date dayPartStartDate = new Date(date.getTime() - millis + remainderMillis);
+
+ Object[] result = new Object[2];
+ day.findPreviousDayPartStart(index, dayPartStartDate, result);
+ Date previousDayPartStart = (Date) result[0];
+ DayPart previousDayPart = (DayPart) result[1];
+
+ end = previousDayPart.subtract(previousDayPartStart, remainderMillis, isBusinessTime);
+ }
+
+ return end;
+ }
+
+
public boolean isStartAfter(Date date) {
Calendar calendar = day.getBusinessCalendar().createCalendar();
calendar.setTime(date);
int hour = calendar.get(Calendar.HOUR_OF_DAY);
int minute = calendar.get(Calendar.MINUTE);
-
+
return ( (hour<fromHour)
|| ( (hour==fromHour)
- && (minute<=fromMinute)
- )
+ && (minute<=fromMinute)
+ )
);
}
+ public boolean isEndBefore(Date date) {
+ Calendar calendar = day.getBusinessCalendar().createCalendar();
+ calendar.setTime(date);
+ int hour = calendar.get(Calendar.HOUR_OF_DAY);
+ int minute = calendar.get(Calendar.MINUTE);
+
+ return ( (toHour<hour)
+ || ( (toHour==hour)
+ && (toMinute<=minute)
+ )
+ );
+ }
+
+
public boolean includes(Date date) {
Calendar calendar = day.getBusinessCalendar().createCalendar();
calendar.setTime(date);
int hour = calendar.get(Calendar.HOUR_OF_DAY);
int minute = calendar.get(Calendar.MINUTE);
-
+
return ( ( (fromHour<hour)
|| ( (fromHour==hour)
- && (fromMinute<=minute)
+ && (fromMinute<=minute)
)
) &&
( (hour<toHour)
|| ( (hour==toHour)
- && (minute<=toMinute)
+ && (minute<=toMinute)
)
)
);
@@ -112,7 +157,17 @@
calendar.set(Calendar.MINUTE, fromMinute);
return calendar.getTime();
}
-
+
+ public Date getEndTime(Date date) {
+ Calendar calendar = day.getBusinessCalendar().createCalendar();
+ calendar.setTime(date);
+ calendar.set(Calendar.HOUR_OF_DAY, toHour);
+ calendar.set(Calendar.MINUTE, toMinute);
+ calendar.set(Calendar.SECOND, 0);
+ calendar.set(Calendar.MILLISECOND, 0);
+ return calendar.getTime();
+ }
+
public Day getDay() {
return day;
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/Duration.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/Duration.java 2010-08-15 02:44:16 UTC (rev 6591)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/Duration.java 2010-08-15 03:39:21 UTC (rev 6592)
@@ -165,9 +165,6 @@
if (durationString == null || durationString.length() == 0) {
duedate = baseDate;
} else {
- if (durationString.contains("business") && durationSeparator == '-') {
- throw new JbpmException("Invalid duedate, subtraction ('-') not supported if duedate contains 'business'");
- }
BusinessCalendar businessCalendar = EnvironmentImpl.getFromCurrent(BusinessCalendar.class);
if (durationSeparator == '+') {
duedate = businessCalendar.add(baseDate, durationString);
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/timer/TimerTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/timer/TimerTest.java 2010-08-15 02:44:16 UTC (rev 6591)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/timer/TimerTest.java 2010-08-15 03:39:21 UTC (rev 6592)
@@ -369,7 +369,7 @@
} catch (Exception e) {}
}
- public void testTimerELSubtractBusinessFail() {
+ public void testTimerELSubtractBusiness() {
deployJpdlXmlString(
"<process name='Insurance claim' key='ICL'>" +
" <start>" +
@@ -378,7 +378,7 @@
" <state name='a'>" +
" <transition to='b' />" +
" <transition name='timeout' to='escalate'>" +
- " <timer duedate='#{proc_var} - 6 business days' />" +
+ " <timer duedate='#{proc_var} - 5 business days' />" +
" </transition>" +
" </state>" +
" <state name='b' />" +
@@ -388,15 +388,25 @@
Map<String, Object> proc_vars = new HashMap<String, Object>();
Calendar cal = Calendar.getInstance();
- cal.set(2010, 01, 12, 12, 00, 00); // 12 feb 2010 noon
+ cal.set(2012, 01, 17, 12, 00, 00); // 17 feb 2012 noon
proc_vars.put("proc_var", cal);
- try {
- executionService.startProcessInstanceByKey("ICL", proc_vars, "82436");
- fail("Should not happen, exception expected");
- } catch (Exception e) {}
+ ProcessInstance processInstance = executionService.startProcessInstanceByKey("ICL", proc_vars, "82436");
+
+ Job job = managementService.createJobQuery()
+ .processInstanceId(processInstance.getId())
+ .uniqueResult();
+
+ Calendar jobDate = Calendar.getInstance();
+ jobDate.setTime(job.getDuedate());
+
+ // 17 feb is friday, 5 businessdays before is friday 10th
+ assertEquals(10 , jobDate.get(Calendar.DAY_OF_MONTH));
+
+ managementService.executeJob(job.getId());
+ assertProcessInstanceEnded(processInstance);
}
- public void testTimerELSubtractPastFail() {
+ public void testTimerELSubtractBusinessLeap() {
deployJpdlXmlString(
"<process name='Insurance claim' key='ICL'>" +
" <start>" +
@@ -405,6 +415,76 @@
" <state name='a'>" +
" <transition to='b' />" +
" <transition name='timeout' to='escalate'>" +
+ " <timer duedate='#{proc_var} - 5 business days' />" +
+ " </transition>" +
+ " </state>" +
+ " <state name='b' />" +
+ " <end name='escalate' />" +
+ "</process>"
+ );
+
+ Map<String, Object> proc_vars = new HashMap<String, Object>();
+ Calendar cal = Calendar.getInstance();
+ cal.set(2012, 2, 5, 12, 00, 00); // 5 march 2012 noon
+ proc_vars.put("proc_var", cal);
+ ProcessInstance processInstance = executionService.startProcessInstanceByKey("ICL", proc_vars, "82436");
+
+ Job job = managementService.createJobQuery().processInstanceId(processInstance.getId()).uniqueResult();
+
+ Calendar jobDate = Calendar.getInstance();
+ jobDate.setTime(job.getDuedate());
+
+ // 5 mar is monday, 5 businessdays before is monday feb 27th (29-02-12 is leap day)
+ assertEquals(27, jobDate.get(Calendar.DAY_OF_MONTH));
+
+ managementService.executeJob(job.getId());
+ assertProcessInstanceEnded(processInstance);
+ }
+
+ public void testTimerELSubtractBusinessMonthBoundary() {
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start>" +
+ " <transition to='a' />" +
+ " </start>" +
+ " <state name='a'>" +
+ " <transition to='b' />" +
+ " <transition name='timeout' to='escalate'>" +
+ " <timer duedate='#{proc_var} - 10 business days' />" +
+ " </transition>" +
+ " </state>" +
+ " <state name='b' />" +
+ " <end name='escalate' />" +
+ "</process>"
+ );
+
+ Map<String, Object> proc_vars = new HashMap<String, Object>();
+ Calendar cal = Calendar.getInstance();
+ cal.set(2012, 02, 13, 21, 00, 00); // 13 mar 2012
+ proc_vars.put("proc_var", cal);
+ ProcessInstance processInstance = executionService.startProcessInstanceByKey("ICL", proc_vars, "82436");
+
+ Job job = managementService.createJobQuery().processInstanceId(processInstance.getId()).uniqueResult();
+
+ Calendar jobDate = Calendar.getInstance();
+ jobDate.setTime(job.getDuedate());
+
+ // 13 mar is tuesday, 10 businessdays before is tuesday feb 28th (29-02-12 is leap day)
+ assertEquals(28, jobDate.get(Calendar.DAY_OF_MONTH));
+
+ managementService.executeJob(job.getId());
+ assertProcessInstanceEnded(processInstance);
+ }
+
+ public void testTimerELSubtractPast() {
+ deployJpdlXmlString(
+ "<process name='Insurance claim' key='ICL'>" +
+ " <start>" +
+ " <transition to='a' />" +
+ " </start>" +
+ " <state name='a'>" +
+ " <transition to='b' />" +
+ " <transition name='timeout' to='escalate'>" +
" <timer duedate='#{proc_var} - 3 days' />" +
" </transition>" +
" </state>" +
13 years, 10 months
JBoss JBPM SVN: r6591 - in jbpm4/trunk/modules: pvm/src/test/java/org/jbpm/pvm/internal and 2 other directories.
by do-not-reply@jboss.org
Author: rebody
Date: 2010-08-14 22:44:16 -0400 (Sat, 14 Aug 2010)
New Revision: 6591
Added:
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/cal/
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/cal/BusinessCalendarTest.java
Modified:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/BusinessCalendarImpl.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/timer/TimerTest.java
Log:
JBPM-2813 if duration is pass of now, don't throw an exception
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/BusinessCalendarImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/BusinessCalendarImpl.java 2010-08-13 23:21:22 UTC (rev 6590)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cal/BusinessCalendarImpl.java 2010-08-15 02:44:16 UTC (rev 6591)
@@ -28,44 +28,46 @@
import java.util.TimeZone;
import org.jbpm.api.JbpmException;
+import org.jbpm.internal.log.Log;
import org.jbpm.pvm.internal.util.Clock;
/**
* a calendar that knows about business hours.
*/
public class BusinessCalendarImpl implements Serializable, BusinessCalendar {
-
+
private static final long serialVersionUID = 1L;
+ private static Log log = Log.getLog(BusinessCalendarImpl.class.getName());
private static BusinessCalendarImpl instance = null;
-
+
protected long oid = -1;
protected int version = 0;
protected TimeZone timeZone = TimeZone.getDefault();
/** array that contains the weekdays in the index as specified by {@link Calendar#SUNDAY} (=1),
- * {@link Calendar#MONDAY} (=2),... {@link Calendar#SATURDAY} (=7).
- */
+ * {@link Calendar#MONDAY} (=2),... {@link Calendar#SATURDAY} (=7).
+ */
protected Day[] days = null;
protected Holiday[] holidays = null;
-
- protected long secondInMillis = 1000;
- protected long minuteInMillis = 60000;
- protected long hourInMillis = 3600000;
- protected long dayInMillis = 24*hourInMillis;
- protected long weekInMillis = 7*dayInMillis;
- protected long monthInMillis = 30*dayInMillis;
- protected long yearInMillis = 365*dayInMillis;
- protected long businessDayInMillis = 8*hourInMillis;
- protected long businessWeekInMillis = 40*hourInMillis;
- protected long businessMonthInMillis = 21*dayInMillis;
- protected long businessYearInMillis = 220*dayInMillis;
-
+ protected long secondInMillis = 1000;
+ protected long minuteInMillis = 60000;
+ protected long hourInMillis = 3600000;
+ protected long dayInMillis = 24*hourInMillis;
+ protected long weekInMillis = 7*dayInMillis;
+ protected long monthInMillis = 30*dayInMillis;
+ protected long yearInMillis = 365*dayInMillis;
+
+ protected long businessDayInMillis = 8*hourInMillis;
+ protected long businessWeekInMillis = 40*hourInMillis;
+ protected long businessMonthInMillis = 21*dayInMillis;
+ protected long businessYearInMillis = 220*dayInMillis;
+
/** constructor for persistence and creating an empty business calendar */
public BusinessCalendarImpl() {
}
public static synchronized BusinessCalendarImpl getInstance() {
- if (instance==null) {
+ if (instance == null) {
instance = new BusinessCalendarImpl();
}
return instance;
@@ -74,20 +76,23 @@
public Date add(Date date, String duration) {
return add(date, new Duration(duration));
}
-
+
public Date subtract(Date date, String duration) {
- if (duration.contains("business")) {
- throw new JbpmException("Duedate subtraction not supported for business durations");
- }
+ if (duration.contains("business")) {
+ throw new JbpmException("Duedate subtraction not supported for business durations");
+ }
return subtract(date, new Duration(duration));
}
public Date subtract(Date date, Duration duration) {
- Date end = null;
+ Date end = null;
long millis = convertToMillis(duration);
- end = new Date(date.getTime()-millis);
+ end = new Date(date.getTime() - millis);
if (end.before(Clock.getTime())) {
- throw new JbpmException("Duedate "+ end+ " in the past");
+ if (log.isWarnEnabled()) {
+ log.warn("Duedate : [" + end + "] in the past of start : [" + date + "]");
+ }
+ return Clock.getTime();
}
return end;
}
@@ -132,9 +137,9 @@
return millis;
}
- public boolean isInBusinessHours(Date date) {
- return (findDayPart(date)!=null);
- }
+ public boolean isInBusinessHours(Date date) {
+ return (findDayPart(date)!=null);
+ }
public boolean isHoliday(Date date) {
if (holidays!=null) {
@@ -192,25 +197,25 @@
return dayPart;
}
- protected DayPart findNextDayPart(Date date) {
- DayPart nextDayPart = null;
- while(nextDayPart==null) {
- nextDayPart = findDayPart(date);
- if (nextDayPart==null) {
- date = findStartOfNextDay(date);
- Object result[] = new Object[2];
- Day day = findDay(date);
- day.findNextDayPartStart(0, date, result);
- nextDayPart = (DayPart) result[1];
- }
- }
- return nextDayPart;
+ protected DayPart findNextDayPart(Date date) {
+ DayPart nextDayPart = null;
+ while(nextDayPart==null) {
+ nextDayPart = findDayPart(date);
+ if (nextDayPart==null) {
+ date = findStartOfNextDay(date);
+ Object result[] = new Object[2];
+ Day day = findDay(date);
+ day.findNextDayPartStart(0, date, result);
+ nextDayPart = (DayPart) result[1];
+ }
+ }
+ return nextDayPart;
}
-
+
// getters and setters //////////////////////////////////////////////////////
-
+
public long getBusinessDayInMillis() {
return businessDayInMillis;
}
@@ -294,5 +299,5 @@
}
public void setYearInMillis(long yearInMillis) {
this.yearInMillis = yearInMillis;
- }
+ }
}
Added: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/cal/BusinessCalendarTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/cal/BusinessCalendarTest.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/cal/BusinessCalendarTest.java 2010-08-15 02:44:16 UTC (rev 6591)
@@ -0,0 +1,17 @@
+
+package org.jbpm.pvm.internal.cal;
+
+import java.util.*;
+import junit.framework.*;
+import org.jbpm.pvm.internal.model.*;
+
+public class BusinessCalendarTest extends TestCase {
+ public void testSubstract() {
+ BusinessCalendarImpl businessCalendar = new BusinessCalendarImpl();
+
+ Date start = new Date();
+ Date end = businessCalendar.subtract(start, new Duration("1 year"));
+
+ assertEquals(end.getYear(), start.getYear());
+ }
+}
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/timer/TimerTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/timer/TimerTest.java 2010-08-13 23:21:22 UTC (rev 6590)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/timer/TimerTest.java 2010-08-15 02:44:16 UTC (rev 6591)
@@ -417,10 +417,7 @@
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DAY_OF_MONTH, 2);
proc_vars.put("proc_var", cal);
- try {
- executionService.startProcessInstanceByKey("ICL", proc_vars, "82436");
- fail("Should not happen, exception expected");
- } catch (Exception e) {}
+ executionService.startProcessInstanceByKey("ICL", proc_vars, "82436");
}
public void testTimerTimeoutCustom() {
13 years, 10 months
JBoss JBPM SVN: r6590 - in jbpm3/branches/jbpm-3.2-soa: modules/core/scripts and 4 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-08-13 19:21:22 -0400 (Fri, 13 Aug 2010)
New Revision: 6590
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/core/scripts/assembly-config.xml
jbpm3/branches/jbpm-3.2-soa/modules/distribution/scripts/assembly-modules.xml
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/scripts/assembly-config.xml
jbpm3/branches/jbpm-3.2-soa/modules/examples/scripts/assembly-examples.xml
jbpm3/branches/jbpm-3.2-soa/modules/identity/scripts/assembly-config.xml
jbpm3/branches/jbpm-3.2-soa/pom.xml
Log:
JBPM-2916 remove db and userguide modules from distro profile to make builds faster;
introduce release profile that builds everything from source
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/scripts/assembly-config.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/scripts/assembly-config.xml 2010-08-13 01:10:29 UTC (rev 6589)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/scripts/assembly-config.xml 2010-08-13 23:21:22 UTC (rev 6590)
@@ -1,5 +1,15 @@
-<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!-- ====================================================================== -->
+<!-- jBPM: Workflow in Java -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- ====================================================================== -->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>config</id>
<formats>
<format>jar</format>
Modified: jbpm3/branches/jbpm-3.2-soa/modules/distribution/scripts/assembly-modules.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/distribution/scripts/assembly-modules.xml 2010-08-13 01:10:29 UTC (rev 6589)
+++ jbpm3/branches/jbpm-3.2-soa/modules/distribution/scripts/assembly-modules.xml 2010-08-13 23:21:22 UTC (rev 6590)
@@ -7,7 +7,8 @@
<!-- See terms of license at http://www.gnu.org. -->
<!-- ====================================================================== -->
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>modules</id>
<formats>
Modified: jbpm3/branches/jbpm-3.2-soa/modules/enterprise/scripts/assembly-config.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/enterprise/scripts/assembly-config.xml 2010-08-13 01:10:29 UTC (rev 6589)
+++ jbpm3/branches/jbpm-3.2-soa/modules/enterprise/scripts/assembly-config.xml 2010-08-13 23:21:22 UTC (rev 6590)
@@ -1,5 +1,15 @@
-<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!-- ====================================================================== -->
+<!-- jBPM: Workflow in Java -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- ====================================================================== -->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>config</id>
<formats>
<format>jar</format>
Modified: jbpm3/branches/jbpm-3.2-soa/modules/examples/scripts/assembly-examples.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/examples/scripts/assembly-examples.xml 2010-08-13 01:10:29 UTC (rev 6589)
+++ jbpm3/branches/jbpm-3.2-soa/modules/examples/scripts/assembly-examples.xml 2010-08-13 23:21:22 UTC (rev 6590)
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8" ?>
- <!-- ====================================================================== -->
- <!-- jBPM: Workflow in Java -->
- <!-- -->
- <!-- Distributable under LGPL license. -->
- <!-- See terms of license at http://www.gnu.org. -->
- <!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<!-- jBPM: Workflow in Java -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- ====================================================================== -->
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Modified: jbpm3/branches/jbpm-3.2-soa/modules/identity/scripts/assembly-config.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/identity/scripts/assembly-config.xml 2010-08-13 01:10:29 UTC (rev 6589)
+++ jbpm3/branches/jbpm-3.2-soa/modules/identity/scripts/assembly-config.xml 2010-08-13 23:21:22 UTC (rev 6590)
@@ -1,5 +1,15 @@
-<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!-- ====================================================================== -->
+<!-- jBPM: Workflow in Java -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- ====================================================================== -->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>config</id>
<formats>
<format>jar</format>
Modified: jbpm3/branches/jbpm-3.2-soa/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/pom.xml 2010-08-13 01:10:29 UTC (rev 6589)
+++ jbpm3/branches/jbpm-3.2-soa/pom.xml 2010-08-13 23:21:22 UTC (rev 6590)
@@ -388,6 +388,22 @@
</systemProperties>
</configuration>
</plugin>
+
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <quiet>true</quiet>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <releaseProfiles>release</releaseProfiles>
+ <goals>deploy</goals>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ </configuration>
+ </plugin>
</plugins>
<pluginManagement>
@@ -409,6 +425,7 @@
<artifactId>sql-maven-plugin</artifactId>
<version>1.4</version>
</plugin>
+
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-3</version>
@@ -457,6 +474,38 @@
<profile>
<id>distro</id>
<modules>
+ <module>modules/distribution</module>
+ </modules>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
+ Name: release
+ Desc: Prepare for release
+ -->
+ <profile>
+ <id>release</id>
+ <modules>
<module>modules/db</module>
<module>modules/userguide</module>
<module>modules/distribution</module>
@@ -465,18 +514,15 @@
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <quiet>true</quiet>
- </configuration>
<executions>
<execution>
- <id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
+
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
13 years, 10 months
JBoss JBPM SVN: r6589 - in jbpm3/branches/jbpm-3.2-soa/modules/core/src: test/java/org/jbpm/graph/def and 1 other directory.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-08-12 21:10:29 -0400 (Thu, 12 Aug 2010)
New Revision: 6589
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/graph/def/GraphElement.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/graph/def/ExceptionHandlerTest.java
Log:
JBPM-2854 clear exception from executionContext after handling it, allowing executionContext to handle further exceptions
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/graph/def/GraphElement.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/graph/def/GraphElement.java 2010-08-12 10:18:37 UTC (rev 6588)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/graph/def/GraphElement.java 2010-08-13 01:10:29 UTC (rev 6589)
@@ -229,7 +229,8 @@
if (!action.acceptsPropagatedEvents() && isPropagated) continue;
if (action.isAsync()) {
- ExecuteActionJob job = createAsyncActionExecutionJob(executionContext.getToken(), action);
+ ExecuteActionJob job = createAsyncActionExecutionJob(executionContext.getToken(),
+ action);
MessageService messageService = executionContext.getJbpmContext()
.getServices()
.getMessageService();
@@ -333,21 +334,28 @@
*/
public void raiseException(Throwable exception, ExecutionContext executionContext) {
if (isAbleToHandleExceptions(executionContext)) {
- try {
- ExceptionHandler exceptionHandler = findExceptionHandler(exception);
- if (exceptionHandler != null) {
- executionContext.setException(exception);
+ ExceptionHandler exceptionHandler = findExceptionHandler(exception);
+ // was a matching exception handler found?
+ if (exceptionHandler != null) {
+ // make exception available to handler
+ executionContext.setException(exception);
+ try {
exceptionHandler.handleException(this, executionContext);
return;
}
+ catch (Exception e) {
+ // NOTE that Errors are not caught because that might halt the JVM
+ // and mask the original Error
+ exception = e;
+ }
+ finally {
+ // clear exception after handling it, allowing execution to handle further exceptions
+ // see https://jira.jboss.org/browse/JBPM-2854
+ executionContext.setException(null);
+ }
}
- catch (Exception e) {
- // NOTE that Error's are not caught because that might halt the JVM
- // and mask the original Error.
- exception = e;
- }
- // if this graph element has parent
+ // if this graph element is not parentless
GraphElement parent = getParent();
if (parent != null && !equals(parent)) {
// propagate exception to parent
@@ -356,7 +364,7 @@
}
}
- // if exception was not handled, throw delegation exception to client
+ // if exception was not handled, throw delegation exception at client
throw exception instanceof JbpmException ? (JbpmException) exception
: new DelegationException("no applicable exception handler found", exception);
}
@@ -369,18 +377,14 @@
* </ul>
*/
private static boolean isAbleToHandleExceptions(ExecutionContext executionContext) {
- /*
- * if an exception is already set, we are already handling an exception; in this case don't
- * give the exception to the handlers but throw it to the client see
- * https://jira.jboss.org/jira/browse/JBPM-1887
- */
+ // if executionContext has an exception set, it is already handling an exception
+ // in this case, do not offer exception to handlers; throw at client
+ // see https://jira.jboss.org/jira/browse/JBPM-1887
if (executionContext.getException() != null) return false;
- /*
- * check whether the transaction is still active before scanning the exception handlers.
- * that way we can load the exception handlers lazily see
- * https://jira.jboss.org/jira/browse/JBPM-1775
- */
+ // check whether transaction is still active before scanning exception handlers
+ // this way, the exception handlers can be loaded lazily
+ // see https://jira.jboss.org/jira/browse/JBPM-1775
JbpmContext jbpmContext = executionContext.getJbpmContext();
if (jbpmContext != null) {
Service service = jbpmContext.getServices().getPersistenceService();
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/graph/def/ExceptionHandlerTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/graph/def/ExceptionHandlerTest.java 2010-08-12 10:18:37 UTC (rev 6588)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/graph/def/ExceptionHandlerTest.java 2010-08-13 01:10:29 UTC (rev 6589)
@@ -136,4 +136,53 @@
// exception is handled correctly
assertTrue("expected " + pi + " to have ended", pi.hasEnded());
}
+
+ /**
+ * If exception handlers are defined in multiple nodes, only the first one is triggered
+ * during one execution.
+ *
+ * @see <a href="https://jira.jboss.org/browse/JBPM-2854">JBPM-2854</a>
+ */
+ public void testMultipleExceptionHandler() {
+ String xml = "<?xml version='1.0' encoding='UTF-8'?>" +
+ "<process-definition name='TestException'>" +
+ " <start-state name='start'>" +
+ " <transition to='node1' />" +
+ " </start-state> " +
+ " <node name='node1'>" +
+ " <event type='node-enter'>" +
+ " <script>executionContext.setVariable(\"count\", 0)</script>" +
+ " <action class='" +
+ ThrowExceptionAction.class.getName() +
+ "' />" +
+ " </event>" +
+ " <exception-handler>" +
+ " <script>executionContext.setVariable(\"count\", count + 1)</script>" +
+ " </exception-handler>" +
+ " <transition to='node2' />" +
+ " </node>" +
+ " <node name='node2'>" +
+ " <event type='node-enter'>" +
+ " <action class='" +
+ ThrowExceptionAction.class.getName() +
+ "' />" +
+ " </event>" +
+ " <exception-handler>" +
+ " <script>executionContext.setVariable(\"count\", count + 1)</script>" +
+ " </exception-handler>" +
+ " <transition to='end' />" +
+ " </node>" +
+ " <end-state name='end' />" +
+ "</process-definition>";
+
+ ProcessDefinition def = ProcessDefinition.parseXmlString(xml);
+ ProcessInstance pi = def.createProcessInstance();
+
+ // should not throw DelegationException
+ pi.signal();
+
+ // two exceptions are handled
+ Integer count = (Integer) pi.getContextInstance().getVariable("count");
+ assertEquals(2, count.intValue());
+ }
}
13 years, 10 months
JBoss JBPM SVN: r6588 - in jbpm4/trunk/modules/pvm/src: test/java/org/jbpm/pvm/internal/wire and 1 other directory.
by do-not-reply@jboss.org
Author: rebody
Date: 2010-08-12 06:18:37 -0400 (Thu, 12 Aug 2010)
New Revision: 6588
Modified:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/MapBinding.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/MapWireTest.java
Log:
JBPM-2753 simplified map descript
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/MapBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/MapBinding.java 2010-08-12 08:58:39 UTC (rev 6587)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/MapBinding.java 2010-08-12 10:18:37 UTC (rev 6588)
@@ -28,17 +28,19 @@
import org.jbpm.pvm.internal.util.XmlUtil;
import org.jbpm.pvm.internal.wire.Descriptor;
import org.jbpm.pvm.internal.wire.descriptor.MapDescriptor;
+import org.jbpm.pvm.internal.wire.descriptor.StringDescriptor;
import org.jbpm.pvm.internal.wire.xml.WireParser;
import org.jbpm.pvm.internal.xml.Parse;
import org.jbpm.pvm.internal.xml.Parser;
import org.w3c.dom.Element;
/** parses a descriptor for creating a {@link java.util.Map}.
- *
+ *
* See schema docs for more details.
- *
+ *
* @author Tom Baeyens
* @author Guillaume Porcher (documentation)
+ * @author Huisheng Xu
*/
public class MapBinding extends WireDescriptorBinding {
@@ -52,9 +54,9 @@
if (AbstractCollectionBinding.verify(className, Map.class, parse, parser)) {
descriptor.setClassName(className);
}
-
+
Boolean isSynchronized = XmlUtil.attributeBoolean(element, "synchronized", parse);
- if (isSynchronized!=null) {
+ if (isSynchronized != null) {
descriptor.setSynchronized(isSynchronized);
}
@@ -63,25 +65,13 @@
List<Element> elements = XmlUtil.elements(element);
for (Element entryElement: elements) {
if ("entry".equals(entryElement.getLocalName())) {
- // key
- Element keyElement = XmlUtil.element(entryElement, "key");
- Element keyDescriptorElement = (keyElement!=null ? XmlUtil.element(keyElement) : null);
- Descriptor keyDescriptor = (Descriptor) parser.parseElement(keyDescriptorElement, parse, WireParser.CATEGORY_DESCRIPTOR);
- // value
- Element valueElement = XmlUtil.element(entryElement, "value");
- Element valueDescriptorElement = (valueElement!=null ? XmlUtil.element(valueElement) : null);
- Descriptor valueDescriptor = (Descriptor) parser.parseElement(valueDescriptorElement, parse, WireParser.CATEGORY_DESCRIPTOR);
-
- if ( (keyDescriptor!=null)
- && (valueDescriptor!=null)
- ) {
- keyDescriptors.add(keyDescriptor);
- valueDescriptors.add(valueDescriptor);
+ if (XmlUtil.attribute(entryElement, "key") == null) {
+ this.processFullMode(element, entryElement, keyDescriptors, valueDescriptors, parse, parser);
} else {
- parse.addProblem("entry must have key and value element with a single descriptor as contents: "+XmlUtil.toString(entryElement), element);
+ this.processEasyMode(element, entryElement, keyDescriptors, valueDescriptors, parse, parser);
}
} else {
- parse.addProblem("map can only contain entry elements: "+XmlUtil.toString(entryElement));
+ parse.addProblem("map can only contain entry elements: " + XmlUtil.toString(entryElement));
}
}
@@ -89,4 +79,97 @@
descriptor.setValueDescriptors(valueDescriptors);
return descriptor;
}
-}
\ No newline at end of file
+
+ /**
+ * full mode.
+ *
+ * <pre>
+ * <map>
+ * <entry>
+ * <key>
+ * <string value="input_file_a" />
+ * </key>
+ * <value>
+ * <string value="some_filename" />
+ * </value>
+ * </entry>
+ * <entry>
+ * <key>
+ * <string value="another_input" />
+ * </key>
+ * <value>
+ * <string value="1234" />
+ * </value>
+ * </entry>
+ * </map>
+ * </pre>
+ */
+ protected void processFullMode(Element element,
+ Element entryElement,
+ List<Descriptor> keyDescriptors,
+ List<Descriptor> valueDescriptors,
+ Parse parse,
+ Parser parser) {
+ // key
+ Element keyElement = XmlUtil.element(entryElement, "key");
+ Element keyDescriptorElement = (keyElement != null ? XmlUtil.element(keyElement) : null);
+ Descriptor keyDescriptor = (Descriptor) parser.parseElement(keyDescriptorElement, parse, WireParser.CATEGORY_DESCRIPTOR);
+ // value
+ Element valueElement = XmlUtil.element(entryElement, "value");
+ Element valueDescriptorElement = (valueElement != null ? XmlUtil.element(valueElement) : null);
+ Descriptor valueDescriptor = (Descriptor) parser.parseElement(valueDescriptorElement, parse, WireParser.CATEGORY_DESCRIPTOR);
+
+ if ( (keyDescriptor != null)
+ && (valueDescriptor != null)
+ ) {
+ keyDescriptors.add(keyDescriptor);
+ valueDescriptors.add(valueDescriptor);
+ } else {
+ parse.addProblem("entry must have key and value element with a single descriptor as contents: "
+ + XmlUtil.toString(entryElement), element);
+ }
+ }
+
+ /**
+ * easy mode.
+ *
+ * <pre>
+ * <map>
+ * <entry key="input_file_a" value="some_filename" />
+ * <entry key="another_input" value="1234" />
+ * </map>
+ * </pre>
+ */
+ protected void processEasyMode(Element element,
+ Element entryElement,
+ List<Descriptor> keyDescriptors,
+ List<Descriptor> valueDescriptors,
+ Parse parse,
+ Parser parser) {
+ // key
+ String keyAttribute = XmlUtil.attribute(entryElement, "key");
+ Descriptor keyDescriptor = this.createStringDescriptor(keyAttribute);
+ // value
+ String valueAttribute = XmlUtil.attribute(entryElement, "value");
+ Descriptor valueDescriptor = this.createStringDescriptor(valueAttribute);
+
+ if ( (keyDescriptor != null)
+ && (valueDescriptor != null)
+ ) {
+ keyDescriptors.add(keyDescriptor);
+ valueDescriptors.add(valueDescriptor);
+ } else {
+ parse.addProblem("entry must have key and value attributes: "
+ + XmlUtil.toString(entryElement), element);
+ }
+ }
+
+ protected Descriptor createStringDescriptor(String value) {
+ if (value == null) {
+ return null;
+ }
+ StringDescriptor stringDescriptor = new StringDescriptor();
+ stringDescriptor.setValue(value);
+ return stringDescriptor;
+ }
+}
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 2010-08-12 08:58:39 UTC (rev 6587)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/wire/MapWireTest.java 2010-08-12 10:18:37 UTC (rev 6588)
@@ -96,4 +96,20 @@
assertTextPresent("entry must have key and value element with a single descriptor as contents", problems.get(2).getMsg());
assertTextPresent("entry must have key and value element with a single descriptor as contents", problems.get(3).getMsg());
}
+
+ public void testEasyMap() {
+ WireContext wireContext = createWireContext(
+ "<objects>" +
+ " <map name='m'>" +
+ " <entry key='true' value='null'/>" +
+ " <entry key='a' value='5'/>" +
+ " </map>" +
+ "</objects>"
+ );
+
+ Map m = (Map) wireContext.get("m");
+ assertEquals(m.toString(), 2, m.size());
+ assertEquals("null", m.get("true"));
+ assertEquals("5", m.get("a"));
+ }
}
13 years, 10 months
JBoss JBPM SVN: r6587 - jbpm3/branches/jbpm-soa5.1-mavenise/modules/soa-distribution.
by do-not-reply@jboss.org
Author: ryanzhang
Date: 2010-08-12 04:58:39 -0400 (Thu, 12 Aug 2010)
New Revision: 6587
Modified:
jbpm3/branches/jbpm-soa5.1-mavenise/modules/soa-distribution/pom.xml
Log:
Update soa profile, rename soa module artifactId
Modified: jbpm3/branches/jbpm-soa5.1-mavenise/modules/soa-distribution/pom.xml
===================================================================
--- jbpm3/branches/jbpm-soa5.1-mavenise/modules/soa-distribution/pom.xml 2010-08-12 08:58:24 UTC (rev 6586)
+++ jbpm3/branches/jbpm-soa5.1-mavenise/modules/soa-distribution/pom.xml 2010-08-12 08:58:39 UTC (rev 6587)
@@ -14,7 +14,7 @@
<modelVersion>4.0.0</modelVersion>
<name>JBOSS jBPM3- Build distribution for SOA-P </name>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-soa</artifactId>
+ <artifactId>jbpm-soa-distribution</artifactId>
<packaging>pom</packaging>
<!-- Parent -->
13 years, 10 months
JBoss JBPM SVN: r6586 - projects/jsf-console/branches/jsf-console-soa5.1-mavenise/soa-distribution.
by do-not-reply@jboss.org
Author: ryanzhang
Date: 2010-08-12 04:58:24 -0400 (Thu, 12 Aug 2010)
New Revision: 6586
Modified:
projects/jsf-console/branches/jsf-console-soa5.1-mavenise/soa-distribution/pom.xml
Log:
Update soa profile, rename soa module artifactId
Modified: projects/jsf-console/branches/jsf-console-soa5.1-mavenise/soa-distribution/pom.xml
===================================================================
--- projects/jsf-console/branches/jsf-console-soa5.1-mavenise/soa-distribution/pom.xml 2010-08-12 08:54:54 UTC (rev 6585)
+++ projects/jsf-console/branches/jsf-console-soa5.1-mavenise/soa-distribution/pom.xml 2010-08-12 08:58:24 UTC (rev 6586)
@@ -12,7 +12,7 @@
<modelVersion>4.0.0</modelVersion>
<name>JBOSS jBPM3 - Build SOA-P distribution</name>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jsf-console-soa</artifactId>
+ <artifactId>jsf-console-soa-distribution</artifactId>
<packaging>pom</packaging>
<!-- Parent -->
13 years, 10 months