JBoss JBPM SVN: r5428 - in jbpm4/trunk/modules/bpmn/src: main/java/org/jbpm/bpmn/model and 6 other directories.
by do-not-reply@jboss.org
Author: kukeltje
Date: 2009-08-04 19:31:39 -0400 (Tue, 04 Aug 2009)
New Revision: 5428
Added:
jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/ActivityResource.java
jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/Resource.java
jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/ResourceParameter.java
jbpm4/trunk/modules/bpmn/src/main/resources/META-INF/
jbpm4/trunk/modules/bpmn/src/main/resources/META-INF/services/
jbpm4/trunk/modules/bpmn/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory
jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/UserTaskGroup.bpmn.xml
jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/UserTaskSequenceFlowCondition.bpmn.xml
jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/forkWithUncontrolledSequenceFlowCondition.bpmn.xml
Modified:
jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/AbstractTaskBinding.java
jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/BpmnActivity.java
jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/UserTaskActivity.java
jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/UserTaskBinding.java
jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/model/BpmnProcessDefinition.java
jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/parser/BpmnParser.java
jbpm4/trunk/modules/bpmn/src/test/java/org/jbpm/bpmn/flownodes/UserTaskTest.java
jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/UserTaskSimple.bpmn.xml
jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/scriptTask.bpmn.xml
Log:
- Initial Resources
- Group assignment
- conditionExpression on userTask (uncontrolled flow)
- user jbpm_outcome as condition on userTask
Modified: jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/AbstractTaskBinding.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/AbstractTaskBinding.java 2009-08-04 21:29:31 UTC (rev 5427)
+++ jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/AbstractTaskBinding.java 2009-08-04 23:31:39 UTC (rev 5428)
@@ -1,20 +1,28 @@
package org.jbpm.bpmn.flownodes;
+import java.util.List;
+
+import org.jbpm.bpmn.model.BpmnProcessDefinition;
+import org.jbpm.pvm.internal.task.TaskDefinitionImpl;
+import org.jbpm.pvm.internal.util.XmlUtil;
import org.jbpm.pvm.internal.xml.Parse;
import org.jbpm.pvm.internal.xml.Parser;
import org.w3c.dom.Element;
/**
- * The AbstractTask is the task superclass and doesn't define own
- * Behavior.
+ * The AbstractTask is the task superclass and doesn't define own Behavior.
*
- * Spec: A Task which is not further specified is called Abstract
- * Task (this was referred to as the None Task in BPMN 1.2).
+ * Spec: A Task which is not further specified is called Abstract Task (this was
+ * referred to as the None Task in BPMN 1.2).
*
* @author bernd.ruecker(a)camunda.com
*/
public class AbstractTaskBinding extends BpmnBinding {
+ protected static final String HUMAN_PERFORMER = "humanPerformer";
+ protected static final String PERFORMER = "performer";
+ protected static final String POTENTIAL_OWNER = "potentialOwner";
+
public AbstractTaskBinding(String tagName) {
super(tagName);
}
@@ -23,5 +31,53 @@
return new ManualTaskActivity();
}
+ protected void addActivityResources(TaskDefinitionImpl taskDefinition, BpmnActivity taskActivity, Element element, Parse parse) {
+ Element performer = XmlUtil.element(element, PERFORMER, false, parse);
+ if (performer != null) {
+ taskActivity.addActivityResource(addPerformer(taskDefinition, PERFORMER, performer, parse));
+ }
+ // Overrides 'performer'
+ Element humanPerformer = XmlUtil.element(element, HUMAN_PERFORMER, false, parse);
+ if (humanPerformer != null) {
+ taskActivity.addActivityResource(addPerformer(taskDefinition, HUMAN_PERFORMER, humanPerformer, parse));
+ }
+
+ List<Element> potentialOwners = XmlUtil.elements(element, "potentialOwner");
+ for (Element potentialOwner : potentialOwners) {
+ taskActivity.addActivityResource(addPerformer(taskDefinition, POTENTIAL_OWNER, potentialOwner, parse));
+ }
+ }
+
+ private ActivityResource addPerformer(TaskDefinitionImpl taskDefinition, String type, Element performer, Parse parse) {
+
+ String resourceRef = XmlUtil.attribute(performer, "resourceRef", true, parse);
+
+ BpmnProcessDefinition bpmnProcessDefinition = parse.findObject(BpmnProcessDefinition.class);
+
+ ActivityResource activityResource = new ActivityResource();
+ activityResource.setResourceRef(bpmnProcessDefinition.getResource(resourceRef));
+
+ String scope = XmlUtil.attribute(performer, "type", false, parse);
+
+ Element rae = XmlUtil.element(performer, "resourceAssignmentExpression", false, parse);
+ if (rae != null) {
+ String formalExpression = XmlUtil.element(rae, "formalExpression", true, parse).getTextContent().trim();
+ String lang = XmlUtil.attribute(rae, "language", false, parse);
+ if (PERFORMER.equals(type) || HUMAN_PERFORMER.equals(type)) {
+ taskDefinition.setAssigneeExpression(formalExpression);
+ taskDefinition.setAssigneeExpressionLanguage(lang);
+ } else if (POTENTIAL_OWNER.equals(type) && "group".equals(scope)) {
+ taskDefinition.setCandidateGroupsExpression(formalExpression);
+ taskDefinition.setCandidateGroupsExpressionLanguage(lang);
+ } else {
+ taskDefinition.setCandidateUsersExpression(formalExpression);
+ taskDefinition.setCandidateUsersExpressionLanguage(lang);
+ }
+ }
+
+ return activityResource;
+
+ }
+
}
\ No newline at end of file
Added: jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/ActivityResource.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/ActivityResource.java (rev 0)
+++ jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/ActivityResource.java 2009-08-04 23:31:39 UTC (rev 5428)
@@ -0,0 +1,36 @@
+package org.jbpm.bpmn.flownodes;
+
+import org.jbpm.pvm.internal.wire.descriptor.ExpressionEvaluatorDescriptor;
+
+public class ActivityResource {
+
+ String id;
+ Resource resourceRef;
+ ExpressionEvaluatorDescriptor resourceAssignmentExpression;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Resource getResourceRef() {
+ return resourceRef;
+ }
+
+ public void setResourceRef(Resource resourceRef) {
+ this.resourceRef = resourceRef;
+ }
+
+
+ public ExpressionEvaluatorDescriptor getResourceAssignmentExpression() {
+ return resourceAssignmentExpression;
+ }
+
+ public void setResourceAssignmentExpression(ExpressionEvaluatorDescriptor resourceAssignmentExpression) {
+ this.resourceAssignmentExpression = resourceAssignmentExpression;
+ }
+
+}
Modified: jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/BpmnActivity.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/BpmnActivity.java 2009-08-04 21:29:31 UTC (rev 5427)
+++ jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/BpmnActivity.java 2009-08-04 23:31:39 UTC (rev 5428)
@@ -24,8 +24,6 @@
import java.util.ArrayList;
import java.util.List;
-import javax.xml.xpath.XPathFactory;
-
import org.jbpm.api.Execution;
import org.jbpm.api.JbpmException;
import org.jbpm.api.activity.ActivityBehaviour;
@@ -35,6 +33,7 @@
import org.jbpm.pvm.internal.model.Condition;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.model.Transition;
+import org.jbpm.pvm.internal.model.TransitionImpl;
/**
* Basic activity for BPMN activities (tasks, gateways and event)
@@ -53,9 +52,9 @@
private static final boolean CONDITIONS_CHECKED = true;
private static final boolean CONDITIONS_IGNORED = !CONDITIONS_CHECKED;
- private final XPathFactory xpathFactory = XPathFactory.newInstance();
+ //protected String default_;
+ protected List<ActivityResource> activvityResources = new ArrayList();
-
protected void leaveBpmnActivity(ExecutionImpl execution) {
proceedForkedIfAllowed(execution, FORK_ALLOWED, CONDITIONS_CHECKED, null);
@@ -81,9 +80,6 @@
private void proceedForkedIfAllowed(ExecutionImpl execution, boolean forkAllowed, boolean checkConditions, String default_) {
log.debug("Proceeding");
Activity activity = execution.getActivity();
-
-// xpathFactory.setXPathFunctionResolver(new BpmnFunctionResolver());
-// xpath
// evaluate the conditions and find the transitions that should be forked
List<Transition> forkingTransitions = new ArrayList<Transition>();
@@ -165,4 +161,18 @@
return forkingTransitions;
}
+
+// public String getDefault_ () {
+// return this.default_;
+// }
+//
+// public void setDefault_ (String default_) {
+// this.default_ = default_;
+// }
+
+ public void addActivityResource(ActivityResource activityResource) {
+ this.activvityResources.add(activityResource);
+ }
+
+
}
\ No newline at end of file
Added: jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/Resource.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/Resource.java (rev 0)
+++ jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/Resource.java 2009-08-04 23:31:39 UTC (rev 5428)
@@ -0,0 +1,35 @@
+package org.jbpm.bpmn.flownodes;
+
+import java.util.Map;
+
+public class Resource {
+
+ String id;
+ String name;
+ Map<String, ResourceParameter> parameters;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Map<String, ResourceParameter> getParameters() {
+ return parameters;
+ }
+
+ public void setParameters(Map<String, ResourceParameter> parameters) {
+ this.parameters = parameters;
+ }
+
+}
Added: jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/ResourceParameter.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/ResourceParameter.java (rev 0)
+++ jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/ResourceParameter.java 2009-08-04 23:31:39 UTC (rev 5428)
@@ -0,0 +1,37 @@
+package org.jbpm.bpmn.flownodes;
+
+import javax.xml.namespace.QName;
+
+import org.jbpm.pvm.internal.model.VariableDefinitionImpl;
+
+
+public class ResourceParameter extends VariableDefinitionImpl {
+
+ String id;
+ QName type;
+ boolean required;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public QName getType() {
+ return type;
+ }
+
+ public void setType(QName type) {
+ this.type = type;
+ }
+
+ public boolean isRequired() {
+ return required;
+ }
+
+ public void setRequired(boolean required) {
+ this.required = required;
+ }
+}
Modified: jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/UserTaskActivity.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/UserTaskActivity.java 2009-08-04 21:29:31 UTC (rev 5427)
+++ jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/UserTaskActivity.java 2009-08-04 23:31:39 UTC (rev 5428)
@@ -32,7 +32,9 @@
import org.jbpm.pvm.internal.history.HistoryEvent;
import org.jbpm.pvm.internal.history.events.TaskActivityStart;
import org.jbpm.pvm.internal.model.Activity;
+import org.jbpm.pvm.internal.model.Condition;
import org.jbpm.pvm.internal.model.ExecutionImpl;
+import org.jbpm.pvm.internal.model.ExpressionEvaluator;
import org.jbpm.pvm.internal.model.Transition;
import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.task.ParticipationImpl;
@@ -40,21 +42,22 @@
import org.jbpm.pvm.internal.task.SwimlaneImpl;
import org.jbpm.pvm.internal.task.TaskDefinitionImpl;
import org.jbpm.pvm.internal.task.TaskImpl;
+import org.jbpm.pvm.internal.wire.WireContext;
+import org.jbpm.pvm.internal.wire.descriptor.ExpressionEvaluatorDescriptor;
-
/**
* @author Tom Baeyens
*/
public class UserTaskActivity extends BpmnExternalActivity {
private static final long serialVersionUID = 1L;
-
+
private static final Log log = Log.getLog(UserTaskActivity.class.getName());
protected TaskDefinitionImpl taskDefinition;
-
+
public void execute(ActivityExecution execution) {
- execute((ExecutionImpl)execution);
+ execute((ExecutionImpl) execution);
}
public void execute(ExecutionImpl execution) {
@@ -64,9 +67,16 @@
task.setExecution(execution);
task.setProcessInstance(execution.getProcessInstance());
task.setSignalling(true);
-
+
+ if (taskDefinition.getAssigneeExpression() != null) {
+ ExpressionEvaluatorDescriptor eed = new ExpressionEvaluatorDescriptor(taskDefinition.getAssigneeExpression(), taskDefinition
+ .getAssigneeExpressionLanguage());
+ ExpressionEvaluator ee = (ExpressionEvaluator) WireContext.create(eed);
+ task.setAssignee((String) ee.evaluateExpression(execution));
+ }
+
// initialize the name
- if (taskDefinition.getName()!=null) {
+ if (taskDefinition.getName() != null) {
task.setName(taskDefinition.getName());
} else {
task.setName(execution.getActivityName());
@@ -75,71 +85,49 @@
task.setDescription(taskDefinition.getDescription());
task.setPriority(taskDefinition.getPriority());
task.setFormResourceName(taskDefinition.getFormResourceName());
-
- // save task so that TaskDbSession.findTaskByExecution works for assign event listeners
+
+ // save task so that TaskDbSession.findTaskByExecution works for assign
+ // event listeners
dbSession.save(task);
- SwimlaneDefinitionImpl swimlaneDefinition = taskDefinition.getSwimlaneDefinition();
- if (swimlaneDefinition!=null) {
- SwimlaneImpl swimlane = execution.getInitializedSwimlane(swimlaneDefinition);
- task.setSwimlane(swimlane);
-
- // copy the swimlane assignments to the task
- task.setAssignee(swimlane.getAssignee());
- for (ParticipationImpl participant: swimlane.getParticipations()) {
- task.addParticipation(participant.getUserId(), participant.getGroupId(), participant.getType());
- }
- }
+// SwimlaneDefinitionImpl swimlaneDefinition = taskDefinition.getSwimlaneDefinition();
+// if (swimlaneDefinition != null) {
+// SwimlaneImpl swimlane = execution.getInitializedSwimlane(swimlaneDefinition);
+// task.setSwimlane(swimlane);
+//
+// // copy the swimlane assignments to the task
+// task.setAssignee(swimlane.getAssignee());
+// for (ParticipationImpl participant : swimlane.getParticipations()) {
+// task.addParticipation(participant.getUserId(), participant.getGroupId(), participant.getType());
+// }
+// }
execution.initializeAssignments(taskDefinition, task);
-
+
HistoryEvent.fire(new TaskActivityStart(task), execution);
execution.waitForSignal();
}
-
- public void signal(ActivityExecution execution, String signalName, Map<String, ?> parameters) throws Exception {
- signal((ExecutionImpl)execution, signalName, parameters);
+ public void signal(ActivityExecution execution, String signalName, Map<String, ? > parameters) throws Exception {
+ signal((ExecutionImpl) execution, signalName, parameters);
}
- public void signal(ExecutionImpl execution, String signalName, Map<String, ?> parameters) throws Exception {
+ public void signal(ExecutionImpl execution, String signalName, Map<String, ? > parameters) throws Exception {
Activity activity = execution.getActivity();
-
- if (parameters!=null) {
+
+ if (parameters != null) {
execution.setVariables(parameters);
}
-
+
execution.fire(signalName, activity);
- DbSession taskDbSession = Environment
- .getFromCurrent(DbSession.class);
+ DbSession taskDbSession = Environment.getFromCurrent(DbSession.class);
TaskImpl task = (TaskImpl) taskDbSession.findTaskByExecution(execution);
task.setSignalling(false);
+
+ execution.setVariable("jbpm_outcome", signalName);
+ leaveBpmnActivity(execution);
- Transition transition = null;
- List<Transition> outgoingTransitions = activity.getOutgoingTransitions();
- if ( (outgoingTransitions!=null)
- && (!outgoingTransitions.isEmpty())
- ) {
- transition = activity.findOutgoingTransition(signalName);
- if (transition==null) {
- if (Task.STATE_COMPLETED.equals(signalName)) {
- if (outgoingTransitions.size()==1) {
- transition = outgoingTransitions.get(0);
- } else {
- transition = activity.getDefaultOutgoingTransition();
- }
- } else {
- // if a user specified outcome was provided and it doesn't
- // match with an outgoing transition name, then an exception is
- // thrown since this is likely a programmatic error.
- throw new JbpmException("No outcome named '" + signalName + "' was found.");
- }
- }
- if (transition!=null) {
- execution.take(transition);
- }
- }
}
public TaskDefinitionImpl getTaskDefinition() {
Modified: jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/UserTaskBinding.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/UserTaskBinding.java 2009-08-04 21:29:31 UTC (rev 5427)
+++ jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/UserTaskBinding.java 2009-08-04 23:31:39 UTC (rev 5428)
@@ -21,15 +21,20 @@
*/
package org.jbpm.bpmn.flownodes;
+import java.util.List;
+
+import org.jbpm.bpmn.model.BpmnProcessDefinition;
import org.jbpm.bpmn.parser.BpmnParser;
import org.jbpm.pvm.internal.model.ScopeElementImpl;
import org.jbpm.pvm.internal.task.TaskDefinitionImpl;
+import org.jbpm.pvm.internal.util.XmlUtil;
import org.jbpm.pvm.internal.xml.Parse;
import org.jbpm.pvm.internal.xml.Parser;
import org.w3c.dom.Element;
/**
* @author Tom Baeyens
+ * @author Ronald van Kuijk (kukeltje)
*/
public class UserTaskBinding extends AbstractTaskBinding {
@@ -44,8 +49,21 @@
ScopeElementImpl scopeElement = parse.findObject(ScopeElementImpl.class);
TaskDefinitionImpl taskDefinition = BpmnParser.parseTaskDefinition(element, parse, scopeElement);
+
+ BpmnProcessDefinition bpmnProcessDefinition = parse.findObject(BpmnProcessDefinition.class);
+
+ //bpmnProcessDefinition.getResource(ref)
+ addActivityResources(taskDefinition, taskActivity, element, parse);
+
+ Element rendering = XmlUtil.element(element, "rendering", false, parse);
+ if (rendering != null) {
+ Element jBPMForm = XmlUtil.element(rendering, "form", false, parse);
+ taskDefinition.setFormResourceName(jBPMForm != null ? jBPMForm.getTextContent().trim() : null);
+ }
+
taskActivity.setTaskDefinition(taskDefinition);
return taskActivity;
}
+
}
Modified: jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/model/BpmnProcessDefinition.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/model/BpmnProcessDefinition.java 2009-08-04 21:29:31 UTC (rev 5427)
+++ jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/model/BpmnProcessDefinition.java 2009-08-04 23:31:39 UTC (rev 5428)
@@ -26,6 +26,7 @@
import java.util.List;
import java.util.Map;
+import org.jbpm.bpmn.flownodes.Resource;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.internal.model.VariableDefinitionImpl;
@@ -34,38 +35,42 @@
public class BpmnProcessDefinition extends ProcessDefinitionImpl {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L;
- Map<String, TaskDefinitionImpl> taskDefinitions = new HashMap<String, TaskDefinitionImpl>();
- List<VariableDefinitionImpl> processVariableDefinitions = new ArrayList<VariableDefinitionImpl>();
- Map<String, Element> messages = new HashMap<String, Element>();
- Map<String, String> itemDefinitions = new HashMap<String, String>();
- Map<String, Element> interfaces = new HashMap<String, Element>();
- Map<String, String> resources = new HashMap<String, String>();
+ Map<String, TaskDefinitionImpl> taskDefinitions = new HashMap<String, TaskDefinitionImpl>();
+ List<VariableDefinitionImpl> processVariableDefinitions = new ArrayList<VariableDefinitionImpl>();
+ Map<String, Element> messages = new HashMap<String, Element>();
+ Map<String, String> itemDefinitions = new HashMap<String, String>();
+ Map<String, Element> interfaces = new HashMap<String, Element>();
+ Map<String, Resource> resources = new HashMap<String, Resource>();
- protected ExecutionImpl newProcessInstance() {
- return new ExecutionImpl();
- }
+ protected ExecutionImpl newProcessInstance() {
+ return new ExecutionImpl();
+ }
- public TaskDefinitionImpl createTaskDefinition(String name) {
- TaskDefinitionImpl taskDefinition = new TaskDefinitionImpl();
- taskDefinitions.put(name, taskDefinition);
- return taskDefinition;
- }
+ public TaskDefinitionImpl createTaskDefinition(String name) {
+ TaskDefinitionImpl taskDefinition = new TaskDefinitionImpl();
+ taskDefinitions.put(name, taskDefinition);
+ return taskDefinition;
+ }
- public Map<String, TaskDefinitionImpl> getTaskDefinitions() {
- return taskDefinitions;
- }
+ public Map<String, TaskDefinitionImpl> getTaskDefinitions() {
+ return taskDefinitions;
+ }
- public String getType(String typeRef) {
- return itemDefinitions.get(typeRef);
- }
+ public String getType(String typeRef) {
+ return itemDefinitions.get(typeRef);
+ }
- public void setVariableDefinition(List<VariableDefinitionImpl> variableDefinitions) {
- this.processVariableDefinitions = variableDefinitions;
- }
+ public void setVariableDefinition(List<VariableDefinitionImpl> variableDefinitions) {
+ this.processVariableDefinitions = variableDefinitions;
+ }
- public String getResource(String ref) {
- return resources.get(ref);
- }
+ public Resource getResource(String ref) {
+ return resources.get(ref);
+ }
+
+ public Map<String, Resource> getResources() {
+ return resources;
+ }
}
Modified: jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/parser/BpmnParser.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/parser/BpmnParser.java 2009-08-04 21:29:31 UTC (rev 5427)
+++ jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/parser/BpmnParser.java 2009-08-04 23:31:39 UTC (rev 5428)
@@ -26,11 +26,20 @@
import java.util.Enumeration;
import java.util.List;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.dom4j.DocumentFactory;
import org.jbpm.api.activity.ActivityBehaviour;
import org.jbpm.bpmn.flownodes.BpmnBinding;
+import org.jbpm.bpmn.flownodes.ExclusiveGatewayActivity;
+import org.jbpm.bpmn.flownodes.Resource;
+import org.jbpm.bpmn.flownodes.ResourceParameter;
import org.jbpm.bpmn.model.BpmnProcessDefinition;
-import org.jbpm.internal.log.Log; //import org.jbpm.jpdl.internal.activity.JpdlBinding;
-//import org.jbpm.jpdl.internal.xml.BindingsParser;
+
+import org.jbpm.internal.log.Log;
+
+import org.jbpm.pvm.internal.model.Activity;
import org.jbpm.pvm.internal.model.ActivityImpl;
import org.jbpm.pvm.internal.model.CompositeElementImpl;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
@@ -49,6 +58,7 @@
import org.jbpm.pvm.internal.xml.Bindings;
import org.jbpm.pvm.internal.xml.Parse;
import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Document;
import org.w3c.dom.Element;
/**
@@ -111,6 +121,9 @@
processDefinition.setDescription(description);
}
+ // TODO: hack, should be done in a different way
+ parseResources(processElement, parse, processDefinition);
+
parseDataObjects(processElement, parse, processDefinition);
// activities
@@ -211,22 +224,30 @@
log.trace(transitionId + ": " + sourceRef + " -> " + targetRef);
Element conditionElement = XmlUtil.element(transitionElement, "conditionExpression");
log.trace(" with " + ((conditionElement == null) ? "0" : "1") + " conditionExpression");
-
+
TransitionImpl transition = compositeElement.findActivity(sourceRef).createOutgoingTransition();
-
+// Activity a = compositeElement.findActivity(sourceRef);
+// if (a.getType().equals("exclusiveGateway")) {
+// if (transitionId.equals(((ExclusiveGatewayActivity) a).getDefault())) {
+// compositeElement.findActivity(sourceRef).setDefaultOutgoingTransition(transition);
+// }
+// }
+
// 8.2.5 of the spec document
if (conditionElement != null) {
String type = conditionElement.getAttributeNS("http://www.w3.org/2001/XMLSchema-instance", "type");
if ("bpmn:tFormalExpression".equals(type)) {
-
+
String expr = conditionElement.getTextContent();
String lang = XmlUtil.attribute(conditionElement, "language");
- // TODO: add looking up the default language in the document if lang is null.
+ // TODO: add looking up the default language in the document if lang
+ // is null.
ExpressionEvaluatorDescriptor expressionDescriptor = new ExpressionEvaluatorDescriptor(expr, lang);
transition.setConditionDescriptor(expressionDescriptor);
-
+
} else {
- parse.addProblem("Type of the conditionExpression on sequenceFlow with id=" + transitionId + " is of onsupported type 'bpmn:tExpression'", transitionElement);
+ parse.addProblem("Type of the conditionExpression on sequenceFlow with id=" + transitionId + " is of onsupported type 'bpmn:tExpression'",
+ transitionElement);
}
}
@@ -241,7 +262,7 @@
parseItemDefinitions(documentElement, parse);
parseMessages(documentElement, parse);
parseInterfaces(documentElement, parse);
- parseResources(documentElement, parse);
+ // parseResources(documentElement, parse);
}
// public static void parseAssignmentAttributes(Element element,
@@ -304,13 +325,37 @@
if (potentialOwner != null) {
String potentialOwnerRef = XmlUtil.attribute(potentialOwner, "resourceRef");
// set to fixed expression, more evaluation needed for real BPMN 2.0
- taskDefinition.setCandidateGroupsExpression(processDefinition.getResource(potentialOwnerRef));
+ // taskDefinition.setCandidateGroupsExpression(processDefinition.getResource(potentialOwnerRef));
}
return taskDefinition;
}
- private void parseResources(Element documentElement, Parse parse) {
+ // private void parseDataObjects(Element element, Parse parse,
+ // BpmnProcessDefinition processDefinition) {
+ private void parseResources(Element documentElement, Parse parse, BpmnProcessDefinition processDefinition) {
+ List<Resource> resources = new ArrayList<Resource>();
+
+ for (Element resourceElement : XmlUtil.elements(documentElement, "resource")) {
+
+ Resource resource = new Resource();
+
+ resource.setId(XmlUtil.attribute(resourceElement, "id"));
+ resource.setName(XmlUtil.attribute(resourceElement, "name"));
+
+ for (Element resourceParameterElement : XmlUtil.elements(documentElement, "resourceParameter")) {
+
+ ResourceParameter resourceParameter = new ResourceParameter();
+ resourceParameter.setId(XmlUtil.attribute(resourceParameterElement, "id"));
+ resourceParameter.setName(XmlUtil.attribute(resourceParameterElement, "name"));
+ resourceParameter.setType(QName.valueOf(XmlUtil.attribute(resourceParameterElement, "name")));
+
+ resource.getParameters().put(XmlUtil.attribute(resourceParameterElement, "name"), resourceParameter);
+ }
+
+ processDefinition.getResources().put(resource.getName(), resource);
+ }
+
}
private void parseInterfaces(Element documentElement, Parse parse) {
Added: jbpm4/trunk/modules/bpmn/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory
===================================================================
--- jbpm4/trunk/modules/bpmn/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory (rev 0)
+++ jbpm4/trunk/modules/bpmn/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory 2009-08-04 23:31:39 UTC (rev 5428)
@@ -0,0 +1 @@
+com.sun.script.xpath.XPathScriptEngineFactory
\ No newline at end of file
Modified: jbpm4/trunk/modules/bpmn/src/test/java/org/jbpm/bpmn/flownodes/UserTaskTest.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/test/java/org/jbpm/bpmn/flownodes/UserTaskTest.java 2009-08-04 21:29:31 UTC (rev 5427)
+++ jbpm4/trunk/modules/bpmn/src/test/java/org/jbpm/bpmn/flownodes/UserTaskTest.java 2009-08-04 23:31:39 UTC (rev 5428)
@@ -21,7 +21,9 @@
*/
package org.jbpm.bpmn.flownodes;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import org.jbpm.api.ProcessInstance;
import org.jbpm.api.TaskQuery;
@@ -38,99 +40,213 @@
*/
public class UserTaskTest extends JbpmTestCase {
- static BpmnParser bpmnParser = new BpmnParser();
+ static BpmnParser bpmnParser = new BpmnParser();
- public void testParsing() {
- Parse parse = bpmnParser.createParse().setResource("org/jbpm/bpmn/flownodes/UserTaskSimple.bpmn.xml").execute();
+ public void testParsing() {
+ Parse parse = bpmnParser.createParse().setResource("org/jbpm/bpmn/flownodes/UserTaskSimple.bpmn.xml").execute();
- if (!parse.getProblems().isEmpty()) {
- fail("No problems should have occured. Problems: " + parse.getProblems());
- }
+ if (!parse.getProblems().isEmpty()) {
+ fail("No problems should have occured. Problems: " + parse.getProblems());
+ }
- List<BpmnProcessDefinition> processDefinitions = (List<BpmnProcessDefinition>) parse.getDocumentObject();
+ List<BpmnProcessDefinition> processDefinitions = (List<BpmnProcessDefinition>) parse.getDocumentObject();
- assertEquals(1, processDefinitions.size());
+ assertEquals(1, processDefinitions.size());
- BpmnProcessDefinition pd = processDefinitions.get(0);
- assertNotNull(pd);
- assertEquals("UserTaskSimpleProcess", pd.getKey());
+ BpmnProcessDefinition pd = processDefinitions.get(0);
+ assertNotNull(pd);
+ assertEquals("UserTaskSimpleProcess", pd.getKey());
+ }
+
+ public void testNormalUserAssignment() {
+ String deploymentId = repositoryService.createDeployment().addResourceFromClasspath("org/jbpm/bpmn/flownodes/UserTaskSimple.bpmn.xml").deploy();
+
+ try {
+ Map variables = new HashMap();
+ variables.put("assignedUser", "User1");
+ ProcessInstance pi = executionService.startProcessInstanceByKey("UserTaskSimpleProcess", variables);
+ assertEquals("UserTask", ((ExecutionImpl) pi).getActivityName());
+
+ TaskQuery taskQuery = taskService.createTaskQuery();
+ List<Task> allTasks = taskQuery.list();
+ assertEquals(1, allTasks.size());
+ assertEquals("UserTask", allTasks.get(0).getActivityName());
+ assertEquals("User1", allTasks.get(0).getAssignee());
+ assertEquals("MyForm.ftl", allTasks.get(0).getFormResourceName());
+
+ // speciifiing a transition is unnecessary, BPMN has outgoing AND
+ // semantic!
+ // TODO: fix
+ taskService.completeTask(allTasks.get(0).getId(), "flow2");
+
+ assertEquals(0, taskQuery.list().size());
+
+ // process instance is ended
+ pi = executionService.findProcessInstanceById(pi.getId());
+ // One way or another I would also expect this to work... pi is gone from
+ // database immediately when ended. Only in History DB
+ // assertEquals(true, pi.isEnded());
+ assertNull(pi);
+ } finally {
+ repositoryService.deleteDeploymentCascade(deploymentId);
}
+ }
- public void testNormal() {
- String deploymentId = repositoryService.createDeployment().addResourceFromClasspath("org/jbpm/bpmn/flownodes/UserTaskSimple.bpmn.xml").deploy();
+ public void testNormalGroupAssignment() {
+ String deploymentId = repositoryService.createDeployment().addResourceFromClasspath("org/jbpm/bpmn/flownodes/UserTaskGroup.bpmn.xml").deploy();
- try {
- ProcessInstance pi = executionService.startProcessInstanceByKey("UserTaskSimpleProcess");
- assertEquals("UserTask", ((ExecutionImpl)pi).getActivityName());
-
- TaskQuery taskQuery = taskService.createTaskQuery();
- List<Task> allTasks = taskQuery.list();
- assertEquals(1, allTasks.size());
- assertEquals("UserTask", allTasks.get(0).getActivityName());
-// assertEquals("UserTask", allTasks.get(0));
-//
-//
-// List<Task> groupTasks = taskService.findGroupTasks("sampleResource");
-// assertEquals(1, groupTasks.size());
-// assertEquals("UserTask", groupTasks.get(0).getActivityName());
-
- // speciifiing a transition is unnecessary, BPMN has outgoing AND semantic!
- // TODO: fix
- taskService.completeTask( allTasks.get(0).getId(), "flow2" );
+ try {
+ Map variables = new HashMap();
+ variables.put("assignedGroup", "Group1");
+ ProcessInstance pi = executionService.startProcessInstanceByKey("UserTaskGroupProcess", variables);
- assertEquals(0, taskQuery.list().size());
-
- // process instance is ended
- pi = executionService.findProcessInstanceById(pi.getId());
- // One way or another I would also expect this to work... pi is gone from database immediately when ended. Only in History DB
- //assertEquals(true, pi.isEnded());
- assertNull(pi);
- }
- finally {
- repositoryService.deleteDeploymentCascade(deploymentId);
- }
+ assertEquals("UserTask", ((ExecutionImpl) pi).getActivityName());
+
+ TaskQuery taskQuery = taskService.createTaskQuery();
+ List<Task> allTasks = taskQuery.list();
+ assertEquals(1, allTasks.size());
+
+ List<Task> groupTasks = taskService.findGroupTasks("Group1");
+ assertEquals(1, groupTasks.size());
+ assertEquals("UserTask", groupTasks.get(0).getActivityName());
+
+ assertEquals("UserTask", allTasks.get(0).getActivityName());
+
+ assertNull(allTasks.get(0).getAssignee());
+
+ taskService.takeTask(allTasks.get(0).getId(), "User1");
+
+ groupTasks = taskService.findGroupTasks("Group1");
+ assertEquals(0, groupTasks.size());
+
+ List<Task> userTasks = taskService.findPersonalTasks("User1");
+ assertEquals(1, userTasks.size());
+ assertEquals("UserTask", userTasks.get(0).getActivityName());
+
+ taskService.completeTask(userTasks.get(0).getId(), "flow2");
+
+ assertEquals(0, taskQuery.list().size());
+
+ // process instance is ended
+ pi = executionService.findProcessInstanceById(pi.getId());
+ assertNull(pi);
+ } finally {
+ repositoryService.deleteDeploymentCascade(deploymentId);
}
-
- /**
- * check that multiple outgoing sequence flows will be handled as fork, like specified in BPMN
- *
- * Check with user tasks, sicne the engine stops there for sure.
- */
- public void testUncontrolledSequenceFlowAsFork() {
- String deploymentId = repositoryService.createDeployment().addResourceFromClasspath("org/jbpm/bpmn/flownodes/forkWithUncontrolledSequenceFlow.bpmn.xml").deploy();
+ }
- try {
- ProcessInstance pi = executionService.startProcessInstanceByKey("ForkWithUncontrolledSequenceFlowProcess");
-
- String pid = pi.getId();
-
- TaskQuery taskQuery = taskService.createTaskQuery();
- List<Task> allTasks = taskQuery.list();
+ public void testNormalSequenceFlowCondition() {
+ String deploymentId = repositoryService.createDeployment().addResourceFromClasspath("org/jbpm/bpmn/flownodes/UserTaskSequenceFlowCondition.bpmn.xml").deploy();
- // since the uncontrolled sequence flow OUT of the activity behaves as a fork
- // we now have two tasks
- assertEquals(2, allTasks.size());
- assertEquals("UserTaskLeg1", allTasks.get(0).getActivityName());
- assertEquals("UserTaskLeg2", allTasks.get(1).getActivityName());
-
- // specifying a transition is unnecessary, BPMN has outgoing AND semantic!
- // TODO: fix
- // Currently not passing any 'outcome'
- taskService.completeTask( allTasks.get(0).getId()); // define output / flow?
- taskService.completeTask( allTasks.get(1).getId());
+ try {
+ Map variables = new HashMap();
+ ProcessInstance pi = executionService.startProcessInstanceByKey("UserTaskSequenceFlowConditionProcess");
- assertEquals(0, taskQuery.list().size());
-
- pi = executionService.findProcessInstanceById(pid);
- // process instance is ended
- assertNull(pi);
-
-
- }
- finally {
- repositoryService.deleteDeploymentCascade(deploymentId);
- }
+ assertEquals("UserTask", ((ExecutionImpl) pi).getActivityName());
+ TaskQuery taskQuery = taskService.createTaskQuery();
+ List<Task> allTasks = taskQuery.list();
+ assertEquals(1, allTasks.size());
+
+ // Flow does not exist so task should be ended hence process endded since it is the only execution
+ taskService.completeTask(allTasks.get(0).getId(), "NoFlow");
+
+ assertEquals(0, taskQuery.list().size());
+
+ // process instance is ended
+ pi = executionService.findProcessInstanceById(pi.getId());
+ assertNull(pi);
+ } finally {
+ repositoryService.deleteDeploymentCascade(deploymentId);
+ }
}
+
+
+ /**
+ * check that multiple outgoing sequence flows will be handled as fork, like
+ * specified in BPMN
+ *
+ * Check with user tasks, sicne the engine stops there for sure.
+ */
+ public void testUncontrolledSequenceFlowAsFork() {
+ String deploymentId = repositoryService.createDeployment().addResourceFromClasspath("org/jbpm/bpmn/flownodes/forkWithUncontrolledSequenceFlow.bpmn.xml")
+ .deploy();
+
+ try {
+
+ ProcessInstance pi = executionService.startProcessInstanceByKey("ForkWithUncontrolledSequenceFlowProcess");
+
+ String pid = pi.getId();
+
+ TaskQuery taskQuery = taskService.createTaskQuery();
+ List<Task> allTasks = taskQuery.list();
+
+ // since the uncontrolled sequence flow OUT of the activity behaves as a
+ // fork
+ // we now have two tasks
+ assertEquals(2, allTasks.size());
+ assertEquals("UserTaskLeg1", allTasks.get(0).getActivityName());
+ assertEquals("UserTaskLeg2", allTasks.get(1).getActivityName());
+
+ // specifying a transition is unnecessary, BPMN has outgoing AND semantic!
+ // TODO: fix
+ // Currently not passing any 'outcome'
+ taskService.completeTask(allTasks.get(0).getId()); // define output /
+ // flow?
+ taskService.completeTask(allTasks.get(1).getId());
+
+ assertEquals(0, taskQuery.list().size());
+
+ pi = executionService.findProcessInstanceById(pid);
+ // process instance is ended
+ assertNull(pi);
+
+ } finally {
+ repositoryService.deleteDeploymentCascade(deploymentId);
+ }
+
+ }
+
+ /**
+ * check that multiple outgoing sequence flows will be handled as fork, like
+ * specified in BPMN
+ *
+ * Check with user tasks, sicne the engine stops there for sure.
+ */
+ public void testUncontrolledSequenceFlowConditionAsFork() {
+ String deploymentId = repositoryService.createDeployment().addResourceFromClasspath("org/jbpm/bpmn/flownodes/forkWithUncontrolledSequenceFlowCondition.bpmn.xml")
+ .deploy();
+
+ try {
+
+ ProcessInstance pi = executionService.startProcessInstanceByKey("ForkWithUncontrolledSequenceFlowConditionProcess");
+
+ String pid = pi.getId();
+
+ TaskQuery taskQuery = taskService.createTaskQuery();
+ List<Task> allTasks = taskQuery.list();
+
+ assertEquals(1, allTasks.size());
+ assertEquals("forkingTask", allTasks.get(0).getActivityName());
+ taskService.completeTask(allTasks.get(0).getId(), "NoFlow");
+
+ // Even though the 'uncontrolled sequence flow' OUT of the activity behaves as a
+ // fork we now have one task since one sequenceflow has a condition that evaluates to false
+
+ allTasks = taskQuery.list();
+ assertEquals(1, allTasks.size());
+ assertEquals("UserTaskLeg2", allTasks.get(0).getActivityName());
+ taskService.completeTask(allTasks.get(0).getId());
+
+ pi = executionService.findProcessInstanceById(pid);
+ // process instance is ended
+ assertNull(pi);
+
+ } finally {
+ repositoryService.deleteDeploymentCascade(deploymentId);
+ }
+
+ }
+
}
Added: jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/UserTaskGroup.bpmn.xml
===================================================================
--- jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/UserTaskGroup.bpmn.xml (rev 0)
+++ jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/UserTaskGroup.bpmn.xml 2009-08-04 23:31:39 UTC (rev 5428)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions id="UserTaskGroup"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://schema.omg.org/spec/BPMN/2.0 ../../../../../../main/resources/BPMN20.xsd"
+ xmlns:bpmn="http://schema.omg.org/spec/BPMN/2.0" typeLanguage="http://www.w3.org/2001/XMLSchema"
+ expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://sample.bpmn.camunda.com/"
+ xmlns:jbpm="jbpm.org:bpmn:form">
+
+ <bpmn:resource name="sampleHumanResource" />
+
+ <bpmn:process id="UserTaskGroupProcess" name="Simple process with user task for group">
+
+
+ <bpmn:startEvent id="Start" />
+
+ <bpmn:sequenceFlow id="flow1" name="fromStartToUserTask"
+ sourceRef="Start" targetRef="UserTask" />
+
+ <bpmn:userTask id="UserTask" name="user task"
+ implementation="other">
+ <!-- use jbpm internal task management -->
+ <bpmn:potentialOwner id="myPerformer" resourceRef="sampleResource" jbpm:type="group">
+ <bpmn:resourceAssignmentExpression
+ id="rae">
+ <bpmn:formalExpression language="juel">
+ ${assignedGroup}</bpmn:formalExpression>
+ </bpmn:resourceAssignmentExpression>
+ </bpmn:potentialOwner>
+ <bpmn:potentialOwner id="myPerformer2" resourceRef="sampleResource">
+ <bpmn:resourceAssignmentExpression
+ id="rae2">
+ <bpmn:formalExpression language="juel">
+ ${assignedGroup}</bpmn:formalExpression>
+ </bpmn:resourceAssignmentExpression>
+ </bpmn:potentialOwner>
+ <bpmn:rendering id="myRendering">
+ <jbpm:form>MyForm.ftl</jbpm:form>
+ </bpmn:rendering>
+ </bpmn:userTask>
+
+ <bpmn:sequenceFlow id="flow2" name="fromUserTaskToEnd"
+ sourceRef="UserTask" targetRef="End" />
+
+ <bpmn:endEvent id="End" name="End" />
+ </bpmn:process>
+</bpmn:definitions>
Added: jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/UserTaskSequenceFlowCondition.bpmn.xml
===================================================================
--- jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/UserTaskSequenceFlowCondition.bpmn.xml (rev 0)
+++ jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/UserTaskSequenceFlowCondition.bpmn.xml 2009-08-04 23:31:39 UTC (rev 5428)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions id="UserTaskSequenceFlowCondition"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://schema.omg.org/spec/BPMN/2.0 ../../../../../../main/resources/BPMN20.xsd"
+ xmlns:bpmn="http://schema.omg.org/spec/BPMN/2.0" typeLanguage="http://www.w3.org/2001/XMLSchema"
+ expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://sample.bpmn.camunda.com/"
+ xmlns:jbpm="jbpm.org:bpmn:form">
+
+ <bpmn:resource name="sampleHumanResource" />
+
+ <bpmn:process id="UserTaskSequenceFlowConditionProcess"
+ name="Simple process with user task and condition on sequenceFlow">
+
+ <bpmn:startEvent id="Start" />
+
+ <bpmn:sequenceFlow id="flow1" name="fromStartToUserTask"
+ sourceRef="Start" targetRef="UserTask" />
+
+ <bpmn:userTask id="UserTask" name="user task"
+ implementation="other">
+ <!-- use jbpm internal task management -->
+ <bpmn:performer id="myPerformer" resourceRef="sampleResource" />
+ </bpmn:userTask>
+
+ <bpmn:sequenceFlow id="flow2" name="fromUserTaskToUSerTask2"
+ sourceRef="UserTask" targetRef="UserTask2">
+ <bpmn:conditionExpression id="flow2Cond"
+ xsi:type="bpmn:tFormalExpression">${jbpm_outcome == 'flow'}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+
+ <bpmn:userTask id="UserTask2" name="another user task"
+ implementation="other">
+ <!-- use jbpm internal task management -->
+ <bpmn:performer id="myPerformer2" resourceRef="sampleResource" />
+ </bpmn:userTask>
+
+ <bpmn:sequenceFlow id="flow3" name="fromUserTask2ToEnd"
+ sourceRef="UserTask2" targetRef="End">
+ </bpmn:sequenceFlow>
+
+ <bpmn:endEvent id="End" name="End" />
+ </bpmn:process>
+</bpmn:definitions>
Modified: jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/UserTaskSimple.bpmn.xml
===================================================================
--- jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/UserTaskSimple.bpmn.xml 2009-08-04 21:29:31 UTC (rev 5427)
+++ jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/UserTaskSimple.bpmn.xml 2009-08-04 23:31:39 UTC (rev 5428)
@@ -2,28 +2,36 @@
<bpmn:definitions id="UserTaskSimple"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schema.omg.org/spec/BPMN/2.0 ../../../../../../main/resources/BPMN20.xsd"
- xmlns:bpmn="http://schema.omg.org/spec/BPMN/2.0"
- typeLanguage="http://www.w3.org/2001/XMLSchema"
- expressionLanguage="http://www.w3.org/1999/XPath"
- targetNamespace="http://sample.bpmn.camunda.com/">
-
- <bpmn:resource name="sampleResource" />
+ xmlns:bpmn="http://schema.omg.org/spec/BPMN/2.0" typeLanguage="http://www.w3.org/2001/XMLSchema"
+ expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://sample.bpmn.camunda.com/"
+ xmlns:jbpm="jbpm.org:bpmn:form">
+ <bpmn:resource name="sampleHumanResource" />
+
<bpmn:process id="UserTaskSimpleProcess" name="Simple process with user task">
+
<bpmn:startEvent id="Start" />
- <bpmn:sequenceFlow id="flow1" name="fromStartToUserTask"
- sourceRef="Start"
- targetRef="UserTask" />
+ <bpmn:sequenceFlow id="flow1" name="fromStartToUserTask"
+ sourceRef="Start" targetRef="UserTask" />
- <bpmn:userTask id="UserTask" name="user task" implementation="other"> <!-- use jbpm internal task management -->
- <bpmn:potentialOwner resourceRef="sampleResource">
- </bpmn:potentialOwner>
+ <bpmn:userTask id="UserTask" name="user task"
+ implementation="other">
+ <!-- use jbpm internal task management -->
+ <bpmn:performer id="myPerformer" resourceRef="sampleResource">
+ <bpmn:resourceAssignmentExpression
+ id="rae">
+ <bpmn:formalExpression language="juel">
+ ${assignedUser}</bpmn:formalExpression>
+ </bpmn:resourceAssignmentExpression>
+ </bpmn:performer>
+ <bpmn:rendering id="myRendering">
+ <jbpm:form>MyForm.ftl</jbpm:form>
+ </bpmn:rendering>
</bpmn:userTask>
- <bpmn:sequenceFlow id="flow2" name="fromUserTaskToEnd"
- sourceRef="UserTask"
- targetRef="End" />
+ <bpmn:sequenceFlow id="flow2" name="fromUserTaskToEnd"
+ sourceRef="UserTask" targetRef="End" />
<bpmn:endEvent id="End" name="End" />
</bpmn:process>
Added: jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/forkWithUncontrolledSequenceFlowCondition.bpmn.xml
===================================================================
--- jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/forkWithUncontrolledSequenceFlowCondition.bpmn.xml (rev 0)
+++ jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/forkWithUncontrolledSequenceFlowCondition.bpmn.xml 2009-08-04 23:31:39 UTC (rev 5428)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions id="ForkWithUncontrolledSequenceFlowCondition"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://schema.omg.org/spec/BPMN/2.0 ../../../../../../main/resources/BPMN20.xsd"
+ xmlns:bpmn="http://schema.omg.org/spec/BPMN/2.0" typeLanguage="http://www.w3.org/2001/XMLSchema"
+ expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://sample.bpmn.camunda.com/">
+
+ <bpmn:resource name="sampleResource" />
+
+ <bpmn:process id="ForkWithUncontrolledSequenceFlowConditionProcess"
+ name="ForkWithUncontrolledSequenceFlowCondition">
+ <bpmn:startEvent id="Start" />
+
+ <bpmn:sequenceFlow id="flow1" name="fromStartToForkingTask"
+ sourceRef="Start" targetRef="forkingTask" />
+
+ <bpmn:userTask id="forkingTask" name="The Fork" />
+
+ <bpmn:sequenceFlow id="flow2a" name="Leg 1"
+ sourceRef="forkingTask" targetRef="UserTaskLeg1">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${jbpm_outcome == 'flow'}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+
+ <bpmn:userTask id="UserTaskLeg1" name="user task leg1"
+ implementation="other">
+ <bpmn:potentialOwner resourceRef="sampleResource" />
+ </bpmn:userTask>
+
+ <bpmn:sequenceFlow id="flow2b" name="Leg 1 -> Join"
+ sourceRef="UserTaskLeg1" targetRef="parallelGatewayJoin" />
+
+ <bpmn:sequenceFlow id="flow3a" name="Leg 2"
+ sourceRef="forkingTask" targetRef="UserTaskLeg2" />
+ <bpmn:userTask id="UserTaskLeg2" name="user task leg2"
+ implementation="other">
+ <bpmn:potentialOwner resourceRef="sampleResource" />
+ </bpmn:userTask>
+
+ <bpmn:sequenceFlow id="flow3b" name="Leg 2 -> Join"
+ sourceRef="UserTaskLeg2" targetRef="parallelGatewayJoin" />
+
+
+ <bpmn:parallelGateway id="parallelGatewayJoin"
+ name="The Join" gatewayDirection="converging" />
+ <bpmn:sequenceFlow id="flow4" sourceRef="parallelGatewayJoin"
+ targetRef="End">
+ </bpmn:sequenceFlow>
+
+ <bpmn:endEvent id="End" name="End" />
+ </bpmn:process>
+</bpmn:definitions>
Modified: jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/scriptTask.bpmn.xml
===================================================================
--- jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/scriptTask.bpmn.xml 2009-08-04 21:29:31 UTC (rev 5427)
+++ jbpm4/trunk/modules/bpmn/src/test/resources/org/jbpm/bpmn/flownodes/scriptTask.bpmn.xml 2009-08-04 23:31:39 UTC (rev 5428)
@@ -5,6 +5,8 @@
xmlns:bpmn="http://schema.omg.org/spec/BPMN/2.0" typeLanguage="http://www.w3.org/2001/XMLSchema"
expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://sample.bpmn.camunda.com/">
+
+
<bpmn:process id="ScriptTask" name="ScriptTask">
<!-- Start-Event -->
<bpmn:startEvent id="Start" />
@@ -13,7 +15,7 @@
targetRef="scriptTask" name="Start->ScriptTask" />
<bpmn:scriptTask id="scriptTask" name="Script Task"
- scriptLanguage="bsh">
+ scriptLanguage="bsh" >
<bpmn:script><![CDATA[
for(int i=0;i<5;i++){
System.out.println((i+1) + test[i] + " universe");
16 years, 9 months
JBoss JBPM SVN: r5427 - jbpm4/trunk/modules/test-cactus/src/test/java/org/jbpm/test.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-08-04 17:29:31 -0400 (Tue, 04 Aug 2009)
New Revision: 5427
Added:
jbpm4/trunk/modules/test-cactus/src/test/java/org/jbpm/test/AllIntegrationTests.java
Log:
JBPM-2409 JBPM-2411 introducing the test-cactus module
Added: jbpm4/trunk/modules/test-cactus/src/test/java/org/jbpm/test/AllIntegrationTests.java
===================================================================
--- jbpm4/trunk/modules/test-cactus/src/test/java/org/jbpm/test/AllIntegrationTests.java (rev 0)
+++ jbpm4/trunk/modules/test-cactus/src/test/java/org/jbpm/test/AllIntegrationTests.java 2009-08-04 21:29:31 UTC (rev 5427)
@@ -0,0 +1,48 @@
+package org.jbpm.test;
+
+import junit.framework.Test;
+import org.apache.cactus.ServletTestSuite;
+
+public class AllIntegrationTests {
+
+ public static Test suite() {
+ Test suite = new ServletTestSuite();
+ suite.addTestSuite(org.jbpm.examples.async.activity.AsyncActivityTest);
+ suite.addTestSuite(org.jbpm.examples.async.fork.AsyncForkTest);
+ suite.addTestSuite(org.jbpm.examples.concurrency.graphbased.ConcurrencyGraphBasedTest);
+ suite.addTestSuite(org.jbpm.examples.custom.CustomTest);
+ suite.addTestSuite(org.jbpm.examples.decision.conditions.DecisionConditionsTest);
+ suite.addTestSuite(org.jbpm.examples.decision.expression.DecisionExpressionTest);
+ suite.addTestSuite(org.jbpm.examples.decision.handler.DecisionHandlerTest);
+ suite.addTestSuite(org.jbpm.examples.end.multiple.EndMultipleTest);
+ suite.addTestSuite(org.jbpm.examples.end.processinstance.EndProcessInstanceTest);
+ suite.addTestSuite(org.jbpm.examples.end.state.EndStateTest);
+ suite.addTestSuite(org.jbpm.examples.eventlistener.EventListenerTest);
+ suite.addTestSuite(org.jbpm.examples.hql.HqlTest);
+ suite.addTestSuite(org.jbpm.examples.java.JavaInstantiateTest);
+ suite.addTestSuite(org.jbpm.examples.mail.inline.InlineMailTest);
+ suite.addTestSuite(org.jbpm.examples.mail.template.TemplateMailTest);
+ suite.addTestSuite(org.jbpm.examples.script.expression.ScriptExpressionTest);
+ suite.addTestSuite(org.jbpm.examples.script.text.ScriptTextTest);
+ suite.addTestSuite(org.jbpm.examples.services.ServicesTest);
+ suite.addTestSuite(org.jbpm.examples.sql.SqlTest);
+ suite.addTestSuite(org.jbpm.examples.state.choice.StateChoiceTest);
+ suite.addTestSuite(org.jbpm.examples.state.sequence.StateSequenceTest);
+ suite.addTestSuite(org.jbpm.examples.subprocess.outcomeactivity.SubProcessOutcomeActivityTest);
+ suite.addTestSuite(org.jbpm.examples.subprocess.outcomevalue.SubProcessOutcomeValueTest);
+ suite.addTestSuite(org.jbpm.examples.subprocess.variables.SubProcessVariablesTest);
+ suite.addTestSuite(org.jbpm.examples.task.assignee.TaskAssigneeTest);
+ suite.addTestSuite(org.jbpm.examples.task.assignmenthandler.TaskAssignmentHandlerTest);
+ suite.addTestSuite(org.jbpm.examples.task.candidates.TaskCandidatesTest);
+ suite.addTestSuite(org.jbpm.examples.task.comments.TaskCommentsTest);
+ suite.addTestSuite(org.jbpm.examples.task.notification.TaskNotificationTest);
+ suite.addTestSuite(org.jbpm.examples.task.reminder.TaskReminderTest);
+ suite.addTestSuite(org.jbpm.examples.task.swimlane.TaskSwimlaneTest);
+ suite.addTestSuite(org.jbpm.examples.task.variables.TaskVariablesTest);
+ suite.addTestSuite(org.jbpm.examples.timer.businesstime.TimerBusinessTimeTest);
+ suite.addTestSuite(org.jbpm.examples.timer.event.TimerEventTest);
+ suite.addTestSuite(org.jbpm.examples.timer.repeat.TimerRepeatTest);
+ suite.addTestSuite(org.jbpm.examples.timer.transition.TimerTransitionTest);
+ return suite;
+ }
+}
Property changes on: jbpm4/trunk/modules/test-cactus/src/test/java/org/jbpm/test/AllIntegrationTests.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 9 months
JBoss JBPM SVN: r5425 - in jbpm4/trunk: modules and 12 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-08-04 17:23:42 -0400 (Tue, 04 Aug 2009)
New Revision: 5425
Added:
jbpm4/trunk/modules/test-cactus/
jbpm4/trunk/modules/test-cactus/.classpath
jbpm4/trunk/modules/test-cactus/.project
jbpm4/trunk/modules/test-cactus/pom.xml
jbpm4/trunk/modules/test-cactus/src/
jbpm4/trunk/modules/test-cactus/src/main/
jbpm4/trunk/modules/test-cactus/src/main/java/
jbpm4/trunk/modules/test-cactus/src/main/java/org/
jbpm4/trunk/modules/test-cactus/src/main/java/org/jbpm/
jbpm4/trunk/modules/test-cactus/src/main/java/org/jbpm/cactustool/
jbpm4/trunk/modules/test-cactus/src/main/java/org/jbpm/cactustool/CactusTestGenerator.java
jbpm4/trunk/modules/test-cactus/src/main/resources/
jbpm4/trunk/modules/test-cactus/src/test/
jbpm4/trunk/modules/test-cactus/src/test/java/
jbpm4/trunk/modules/test-cactus/src/test/java/org/
jbpm4/trunk/modules/test-cactus/src/test/java/org/jbpm/
jbpm4/trunk/modules/test-cactus/src/test/java/org/jbpm/test/
jbpm4/trunk/modules/test-cactus/src/test/resources/
jbpm4/trunk/modules/test-cactus/target/
Modified:
jbpm4/trunk/modules/examples/pom.xml
jbpm4/trunk/pom.xml
Log:
JBPM-2409 JBPM-2411 introducing the test-cactus module
Modified: jbpm4/trunk/modules/examples/pom.xml
===================================================================
--- jbpm4/trunk/modules/examples/pom.xml 2009-08-04 16:17:15 UTC (rev 5424)
+++ jbpm4/trunk/modules/examples/pom.xml 2009-08-04 21:23:42 UTC (rev 5425)
@@ -67,6 +67,32 @@
<scope>test</scope>
</dependency>
</dependencies>
+
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-test-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ <configuration>
+ <excludes>
+ <exclude>jbpm.cfg.xml</exclude>
+ <exclude>jbpm.hibernate.cfg.xml</exclude>
+ <exclude>jbpm.mail.properties</exclude>
+ <exclude>logging.properties</exclude>
+ </excludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
<profiles>
<!-- -Ddatabase= -->
Added: jbpm4/trunk/modules/test-cactus/.classpath
===================================================================
--- jbpm4/trunk/modules/test-cactus/.classpath (rev 0)
+++ jbpm4/trunk/modules/test-cactus/.classpath 2009-08-04 21:23:42 UTC (rev 5425)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Property changes on: jbpm4/trunk/modules/test-cactus/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/test-cactus/.project
===================================================================
--- jbpm4/trunk/modules/test-cactus/.project (rev 0)
+++ jbpm4/trunk/modules/test-cactus/.project 2009-08-04 21:23:42 UTC (rev 5425)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>test-cactus</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Property changes on: jbpm4/trunk/modules/test-cactus/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/test-cactus/pom.xml
===================================================================
--- jbpm4/trunk/modules/test-cactus/pom.xml (rev 0)
+++ jbpm4/trunk/modules/test-cactus/pom.xml 2009-08-04 21:23:42 UTC (rev 5425)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id: pom.xml 5319 2009-07-17 10:03:46Z tom.baeyens(a)jboss.com $ -->
+
+<project 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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>jBPM 4 - Cactus</name>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-cactus</artifactId>
+ <packaging>war</packaging>
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm</artifactId>
+ <version>4.1-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-examples</artifactId>
+ <version>4.1-SNAPSHOT</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>cactus</groupId>
+ <artifactId>cactus</artifactId>
+ <version> 13-1.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ </dependencies>
+
+ <!-- Plugins -->
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-cactus-test-suite</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="test_classpath" refid="maven.test.classpath"/>
+ <echo message="${test_classpath}" />
+ <java classname="org.jbpm.cactustool.CactusTestGenerator">
+ <classpath path="${test_classpath}"/>
+ <arg line="src/test/java ../examples/src/test/java" />
+ </java>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Property changes on: jbpm4/trunk/modules/test-cactus/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/test-cactus/src/main/java/org/jbpm/cactustool/CactusTestGenerator.java
===================================================================
--- jbpm4/trunk/modules/test-cactus/src/main/java/org/jbpm/cactustool/CactusTestGenerator.java (rev 0)
+++ jbpm4/trunk/modules/test-cactus/src/main/java/org/jbpm/cactustool/CactusTestGenerator.java 2009-08-04 21:23:42 UTC (rev 5425)
@@ -0,0 +1,96 @@
+/*
+ * 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.cactustool;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.PrintWriter;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class CactusTestGenerator {
+
+ public static void main(String[] args) {
+ try {
+ if (args==null) {
+ log("syntax: java -cp ... org.jbpm.cactustool.CactusTestGenerator testdestroot testsrcroot1 testsrcroot2 ...");
+ }
+
+ String testFileName = args[0]+"/org/jbpm/test/AllIntegrationTests.java";
+ File testFile = new File(testFileName);
+ FileOutputStream fos = new FileOutputStream(testFile);
+ PrintWriter out = new PrintWriter(fos);
+ log("generating java class "+testFile.getCanonicalPath());
+
+ out.println("package org.jbpm.test;");
+ out.println();
+ out.println("import junit.framework.Test;");
+ out.println("import org.apache.cactus.ServletTestSuite;");
+ out.println();
+ out.println("public class AllIntegrationTests {");
+ out.println();
+ out.println(" public static Test suite() {");
+ out.println(" Test suite = new ServletTestSuite();");
+
+ for (int i=1; i<args.length; i++) {
+ String testSrcRoot = args[i];
+ scanForTestClasses(testSrcRoot, "", out);
+ }
+
+ out.println(" return suite;");
+ out.println(" }");
+ out.println("}");
+
+ out.close();
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ private static void scanForTestClasses(String dirPath, String packageName, PrintWriter out) throws Exception {
+ File dirFile = new File(dirPath);
+ log("scanning dir "+dirFile.getCanonicalPath());
+ File[] dirContentFiles = dirFile.listFiles();
+ if (dirContentFiles!=null) {
+ for (File file : dirContentFiles) {
+ String fileName = file.getName();
+ if (file.isFile() && file.getName().endsWith("Test.java")) {
+ String className = packageName + "." + fileName.substring(0, fileName.length()-5);
+ log(" adding "+className);
+ out.println(" suite.addTestSuite(" + className + ");");
+
+ } else if (file.isDirectory()) {
+ String subDirPath = dirPath+"/"+fileName;
+ String subPackageName = ("".equals(packageName) ? fileName : packageName+"."+fileName);
+ scanForTestClasses(subDirPath, subPackageName, out);
+ }
+ }
+ }
+ }
+
+ private static void log(String msg) {
+ System.out.println(msg);
+ }
+}
Property changes on: jbpm4/trunk/modules/test-cactus/src/main/java/org/jbpm/cactustool/CactusTestGenerator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: jbpm4/trunk/pom.xml
===================================================================
--- jbpm4/trunk/pom.xml 2009-08-04 16:17:15 UTC (rev 5424)
+++ jbpm4/trunk/pom.xml 2009-08-04 21:23:42 UTC (rev 5425)
@@ -396,13 +396,22 @@
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
- </manifest>
- </archive>
- </configuration>
+ <executions>
+ <execution>
+ <id>generate-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ </archive>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
16 years, 9 months
JBoss JBPM SVN: r5424 - jbpm4/trunk/modules/distro/src/main/files/install.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-08-04 12:17:15 -0400 (Tue, 04 Aug 2009)
New Revision: 5424
Modified:
jbpm4/trunk/modules/distro/src/main/files/install/
Log:
JBPM-2409 JBPM-2411 started installer refactoring to support tomcat and ci script cleanup
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install
___________________________________________________________________
Name: svn:ignore
+ generated
16 years, 9 months
JBoss JBPM SVN: r5423 - in jbpm4/trunk/modules/distro/src/main/files/install: src and 1 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-08-04 12:16:05 -0400 (Tue, 04 Aug 2009)
New Revision: 5423
Added:
jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/
jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/hsqldb.properties
jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/mysql.properties
jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/oracle.properties
jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/postgresql.properties
jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/sybase.properties
Removed:
jbpm4/trunk/modules/distro/src/main/files/install/generated/
Log:
JBPM-2409 JBPM-2411 started installer refactoring to support tomcat and ci script cleanup
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/hsqldb.properties
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/hsqldb.properties (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/hsqldb.properties 2009-08-04 16:16:05 UTC (rev 5423)
@@ -0,0 +1,4 @@
+jdbc.driver=org.hsqldb.jdbcDriver
+jdbc.url=jdbc:hsqldb:hsql://localhost:1701
+jdbc.username=sa
+jdbc.password=
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/hsqldb.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/mysql.properties
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/mysql.properties (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/mysql.properties 2009-08-04 16:16:05 UTC (rev 5423)
@@ -0,0 +1,4 @@
+jdbc.driver=com.mysql.jdbc.Driver
+jdbc.url=jdbc:mysql://localhost:3306/jbpmdb
+jdbc.username=jbpm
+jdbc.password=jbpm
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/mysql.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/oracle.properties
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/oracle.properties (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/oracle.properties 2009-08-04 16:16:05 UTC (rev 5423)
@@ -0,0 +1,4 @@
+jdbc.driver=oracle.jdbc.driver.OracleDriver
+jdbc.url=jdbc:oracle:thin:@localhost:1521:jbpmdb
+jdbc.username=jbpm
+jdbc.password=jbpm
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/oracle.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/postgresql.properties
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/postgresql.properties (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/postgresql.properties 2009-08-04 16:16:05 UTC (rev 5423)
@@ -0,0 +1,7 @@
+jdbc.driver=org.postgresql.Driver
+jdbc.port=5432
+jdbc.server=localhost
+jdbc.databasename=jbpmdb
+jdbc.url=jdbc:postgresql://localhost:5432/jbpmdb
+jdbc.username=jbpm
+jdbc.password=jbpm
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/postgresql.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/sybase.properties
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/sybase.properties (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/sybase.properties 2009-08-04 16:16:05 UTC (rev 5423)
@@ -0,0 +1,5 @@
+jdbc.driver=net.sourceforge.jtds.jdbc.Driver
+# jdbc.driver=com.sybase.jdbc3.jdbc.SybDriver
+jdbc.url=jdbc:sybase:Tds:localhost:5000/jbpmdb
+jdbc.username=jbpm
+jdbc.password=jbpm
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/jdbc/sybase.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 9 months
JBoss JBPM SVN: r5422 - in jbpm4/trunk/modules/distro/src/main/files/install/src/cfg: mail and 1 other directory.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-08-04 12:14:24 -0400 (Tue, 04 Aug 2009)
New Revision: 5422
Added:
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/jbpm/jta.jbpm.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/jbpm/spring.jbpm.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/jbpm/standalone.jbpm.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/mail/jbpm.mail.properties
Log:
JBPM-2409 JBPM-2411 started installer refactoring to support tomcat and ci script cleanup
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/jbpm/jta.jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/jbpm/jta.jbpm.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/jbpm/jta.jbpm.cfg.xml 2009-08-04 16:14:24 UTC (rev 5422)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbpm-configuration>
+
+ <import resource="jbpm.default.cfg.xml" />
+ <import resource="jbpm.tx.jta.cfg.xml" />
+ <import resource="jbpm.jpdl.cfg.xml" />
+ <import resource="jbpm.identity.cfg.xml" />
+ <import resource="jbpm.businesscalendar.cfg.xml" />
+ <import resource="jbpm.jobexecutor.cfg.xml" />
+
+</jbpm-configuration>
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/jbpm/jta.jbpm.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/jbpm/spring.jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/jbpm/spring.jbpm.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/jbpm/spring.jbpm.cfg.xml 2009-08-04 16:14:24 UTC (rev 5422)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbpm-configuration>
+
+ <import resource="jbpm.default.cfg.xml" />
+ <import resource="jbpm.tx.spring.cfg.xml" />
+ <import resource="jbpm.jpdl.cfg.xml" />
+ <import resource="jbpm.identity.cfg.xml" />
+ <import resource="jbpm.businesscalendar.cfg.xml" />
+ <import resource="jbpm.jobexecutor.cfg.xml" />
+
+</jbpm-configuration>
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/jbpm/spring.jbpm.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/jbpm/standalone.jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/jbpm/standalone.jbpm.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/jbpm/standalone.jbpm.cfg.xml 2009-08-04 16:14:24 UTC (rev 5422)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbpm-configuration>
+
+ <import resource="jbpm.default.cfg.xml" />
+ <import resource="jbpm.tx.hibernate.cfg.xml" />
+ <import resource="jbpm.jpdl.cfg.xml" />
+ <import resource="jbpm.identity.cfg.xml" />
+ <import resource="jbpm.businesscalendar.cfg.xml" />
+ <import resource="jbpm.jobexecutor.cfg.xml" />
+
+</jbpm-configuration>
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/jbpm/standalone.jbpm.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/mail/jbpm.mail.properties
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/mail/jbpm.mail.properties (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/mail/jbpm.mail.properties 2009-08-04 16:14:24 UTC (rev 5422)
@@ -0,0 +1,3 @@
+mail.smtp.host=(a)mail.smtp.host@
+mail.smtp.port=25
+mail.from=noreply(a)jbpm.org
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/mail/jbpm.mail.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 9 months
JBoss JBPM SVN: r5421 - in jbpm4/trunk/modules: distro/src/main/files/install and 10 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-08-04 12:12:13 -0400 (Tue, 04 Aug 2009)
New Revision: 5421
Added:
jbpm4/trunk/modules/distro/src/main/files/install/
jbpm4/trunk/modules/distro/src/main/files/install/build.xml
jbpm4/trunk/modules/distro/src/main/files/install/generated/
jbpm4/trunk/modules/distro/src/main/files/install/src/
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/hsqldb.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/mysql.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/oracle.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/postgresql.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/sybase.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/hsqldb.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/mysql.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/oracle.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/postgresql.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/sybase.hibernate.cfg.xml
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/jbpm/
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/logging/
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/logging/jdk/
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/logging/jdk/logging.properties
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/logging/provided/
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/mail/
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/spring/
jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/spring/applicationContext.xml
jbpm4/trunk/modules/distro/src/main/files/install/src/demo/
jbpm4/trunk/modules/distro/src/main/files/install/src/demo/example.identities.sql
jbpm4/trunk/modules/distro/src/main/files/install/src/jboss/
jbpm4/trunk/modules/distro/src/main/files/install/src/tomcat/
jbpm4/trunk/modules/pvm/src/main/resources/jbpm.tx.spring.cfg.xml
Log:
JBPM-2409 JBPM-2411 started installer refactoring to support tomcat and ci script cleanup
Added: jbpm4/trunk/modules/distro/src/main/files/install/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/build.xml (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2009-08-04 16:12:13 UTC (rev 5421)
@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="jbpm.install">
+
+ <!-- DEVELOPER SPECIFIC CONFIGURATIONS -->
+ <property file="${user.home}/.jbpm4/build.properties" />
+
+ <!-- USER CUSTOMIZABLE PROPERTIES -->
+ <property name="database" value="hsqldb" /> <!-- hsqldb | mysql | oracle | postgresql} -->
+ <echo message="database......... ${database}" />
+ <property name="tx" value="standalone" /> <!-- standalone | jta | spring} -->
+ <echo message="tx............... ${tx}" />
+ <property name="mail.smtp.host" value="localhost" />
+ <echo message="mail.smtp.host... ${mail.smtp.host}" />
+
+ <!-- INTERNAL PROPERTY DEFAULTS -->
+ <property name="jbpm.version" value="4.1-SNAPSHOT" />
+ <property name="jbpm.parent.dir" value="../.." />
+ <property name="jbpm.home" value="${jbpm.parent.dir}/jbpm-${jbpm.version}" />
+
+ <property name="hibernate.connection.type" value="jdbc" /> <!-- jdbc | datasource -->
+ <property name="logging" value="jdk" /> <!-- jdk | provided -->
+
+ <property name="tomcat.version" value="6.0.20" />
+ <property name="tomcat.parent.dir" value="generated" />
+ <property name="tomcat.home" value="${tomcat.parent.dir}/apache-tomcat-${tomcat.version}" />
+ <property name="tomcat.filename" value="apache-tomcat-${tomcat.version}.zip" />
+ <property name="tomcat.distro.dir" value="downloads" />
+ <property name="tomcat.distro.url" value="http://www.apache.org/dist/tomcat/tomcat-6/v${tomcat.version}/bin/${tomca..." />
+ <property name="tomcat.distro.path" value="${tomcat.distro.dir}/${tomcat.filename}" />
+
+ <property name="jboss.version" value="5.1.0" />
+ <property name="jboss.parent.dir" value="generated" />
+ <property name="jboss.home" value="${jboss.parent.dir}/jboss-${jboss.version}" />
+ <property name="jboss.filename" value="jboss-${jboss.version}.zip" />
+ <property name="jboss.distro.dir" value="downloads" />
+ <property name="jboss.distro.url" value="http://downloads.sourceforge.net/jboss/${jboss.filename}" />
+ <property name="jboss.distro.path" value="${jboss.distro.dir}/${jboss.filename}" />
+ <property name="jboss.server.configuration" value="default" />
+ <property name="jboss.server.config.dir" value="${jboss.home}/server/${jboss.server.configuration}" />
+ <property name="jboss.server.data.dir" value="${jboss.home}/server/${jboss.server.configuration}/data" />
+
+ <!-- ### CREATE CONFIGURATION ########################################### -->
+ <target name="generate.cfg" description="Generates a configuration in dir generated/cfg">
+ <delete dir="generated/cfg" />
+ <mkdir dir="generated/cfg" />
+ <copy tofile="generated/cfg/jbpm.cfg.xml"
+ file="src/cfg/jbpm/${tx}.jbpm.cfg.xml" />
+ <copy tofile="generated/cfg/jbpm.hibernate.cfg.xml"
+ file="src/cfg/hibernate/${hibernate.connection.type}/${database}.hibernate.cfg.xml">
+ <filterset filtersfile="src/jdbc/${database}.properties" />
+ </copy>
+ <copy todir="generated/cfg">
+ <fileset dir="src/cfg/logging/${logging}" />
+ </copy>
+ <copy tofile="generated/cfg/jbpm.mail.properties"
+ file="src/cfg/mail/jbpm.mail.properties">
+ <filterset>
+ <filter token="mail.smtp.host" value="${mail.smtp.host}" />
+ </filterset>
+ </copy>
+ </target>
+
+ <!-- ### REINSTALL JBOSS ################################################ -->
+ <target name="reinstall.jboss"
+ depends="delete.jboss, install.jboss"
+ description="Deletes the previous jboss installation and re-installs jboss" />
+
+ <!-- ### DELETE JBOSS ################################################### -->
+ <target name="delete.jboss"
+ description="Deletes jboss installation">
+ <delete dir="${jboss.home}" />
+ </target>
+
+ <!-- ### INSTALL JBOSS ################################################## -->
+ <target name="install.jboss"
+ depends="get.jboss"
+ description="Downloads jboss to ${jboss.distro.dir} if its not available and then unzips jboss">
+ <unzip src="${jboss.distro.path}" dest="${jboss.parent.dir}" />
+ <chmod perm="a+x" file="${jboss.home}/bin/run.sh" os="Linux, Mac OS X" />
+ <chmod perm="a+x" file="${jboss.home}/bin/shutdown.sh" os="Linux, Mac OS X" />
+ </target>
+
+ <!-- ### GET JBOSS ###################################################### -->
+ <condition property="is.jboss.distro.available">
+ <available file="${jboss.distro.path}" />
+ </condition>
+ <target name="get.jboss"
+ unless="is.jboss.distro.available"
+ description="Downloads jboss into ${jboss.distro.dir}">
+ <mkdir dir="${jboss.distro.dir}" />
+ <get src="${jboss.distro.url}" dest="${jboss.distro.path}" />
+ </target>
+
+ <!-- ### REINSTALL TOMCAT ################################################ -->
+ <target name="reinstall.tomcat"
+ depends="delete.tomcat, install.tomcat"
+ description="Deletes the previous tomcat installation and re-installs tomcat" />
+
+ <!-- ### DELETE TOMCAT ################################################### -->
+ <target name="delete.tomcat"
+ description="Deletes tomcat installation">
+ <delete dir="${tomcat.home}" />
+ </target>
+
+ <!-- ### INSTALL TOMCAT ################################################## -->
+ <target name="install.tomcat"
+ depends="get.tomcat"
+ description="Downloads tomcat to ${tomcat.distro.dir} if its not available and then unzips tomcat">
+ <unzip src="${tomcat.distro.path}" dest="${tomcat.parent.dir}" />
+ <chmod perm="a+x" file="${tomcat.home}/bin/startup.sh" os="Linux, Mac OS X" />
+ <chmod perm="a+x" file="${tomcat.home}/bin/shutdown.sh" os="Linux, Mac OS X" />
+ </target>
+
+ <!-- ### GET TOMCAT ###################################################### -->
+ <condition property="is.tomcat.distro.available">
+ <available file="${tomcat.distro.path}" />
+ </condition>
+ <target name="get.tomcat"
+ unless="is.tomcat.distro.available"
+ description="Downloads tomcat into ${tomcat.distro.dir} if it is not available">
+ <mkdir dir="${tomcat.distro.dir}" />
+ <get src="${tomcat.distro.url}" dest="${tomcat.distro.path}" />
+ </target>
+
+ <!-- ### INSTALL JBPM INTO TOMCAT ####################################### -->
+ <target name="install.jbpm.into.tomcat"
+ depends="generate.cfg"
+ description="Installs jBPM into tomcat">
+
+ <!-- create the jbpm configuration jar file -->
+ <jar destfile="${tomcat.home}/lib/jbpm.cfg.jar">
+ <fileset dir="generated/cfg">
+ <exclude name="logging.properties"/>
+ </fileset>
+ </jar>
+
+ <copy todir="${tomcat.home}/lib" overwrite="true">
+ <fileset dir="${jbpm.home}">
+ <include name="jbpm.jar" />
+ </fileset>
+ <fileset dir="${jbpm.home}/lib">
+ <include name="gwt-console-server-integration.jar" />
+ <include name="gwt-console-rpc.jar" />
+ <include name="jbpm-console-integration.jar" />
+ <include name="jbpm-console-form-plugin.jar" />
+ <include name="jbpm-console-graphView-plugin.jar"/>
+ <include name="freemarker.jar" />
+ <include name="livetribe-jsr223.jar" />
+ <include name="juel*.jar" />
+ </fileset>
+ </copy>
+
+ <copy todir="${tomcat.home}/webapps" overwrite="true">
+ <fileset dir="${jbpm.home}/lib">
+ <include name="gwt-console.war" />
+ <include name="gwt-console-server.war" />
+ </fileset>
+ </copy>
+
+ <!-- reporting -->
+ <property name="birt.dir" value="${jboss.server.data.dir}/birt"/>
+ <mkdir dir="${birt.dir}"/>
+ <unzip src="${jbpm.home}/lib/report-engine.zip" dest="${birt.dir}"/>
+ <unzip src="${jbpm.home}/lib/jbpm-console-reports.jar" dest="${birt.dir}"/>
+
+ <!-- copy database driver -->
+ <property name="container.lib.dir" value="${tomcat.home}/" />
+ <antcall target="internal.copy.database.driver" />
+ </target>
+
+ <!-- ### START TOMCAT ################################################### -->
+ <target name="start.tomcat"
+ description="Starts Tomcat and waits till it is booted, then lets Tomcat run in the background">
+ <taskdef name="start-tomcat"
+ classname="org.jbpm.pvm.internal.ant.StartTomcatTask">
+ <classpath>
+ <fileset dir="${jbpm.home}">
+ <include name="jbpm.jar" />
+ </fileset>
+ </classpath>
+ </taskdef>
+ <start-jboss tomcathome="${jboss.home}" />
+ </target>
+
+ <!-- ### STOP TOMCAT ################################################### -->
+ <target name="stop.tomcat"
+ description="Signals Tomcat to stop, but doesn't wait till its finished">
+ <exec executable="${jboss.home}/bin/shutdown.bat" os="Windows Vista, Windows XP,Windows 2000,Windows 98">
+ <arg line="-S"/>
+ </exec>
+ <exec executable="${jboss.home}/bin/shutdown.sh" os="Linux, Unix, Mac">
+ <arg line="-S"/>
+ </exec>
+ </target>
+
+
+ <!-- ### INSTALL JBPM INTO JBOSS ######################### -->
+ <target name="install.jbpm.into.jboss"
+ description="Installs jBPM into JBoss">
+ <!-- copy static configuration files -->
+ <copy todir="${jboss.server.config.dir}" overwrite="true">
+ <fileset dir="${jbpm.home}/jboss/config.common" />
+ </copy>
+
+ <!-- copy the right hibernate configuration file -->
+ <copy file="${jbpm.home}/jboss/hibernate.cfg/${database}.hibernate.cfg.xml"
+ tofile="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar/jbpm.hibernate.cfg.xml"
+ overwrite="true" />
+
+ <!-- copy the right datasource configuration file and replace the jdbc properties with
+ the values in the jdbc/${database}.properties file -->
+ <copy todir="${jboss.server.config.dir}/deploy/jbpm" overwrite="true">
+ <filterset filtersfile="${jbpm.home}/db/jdbc/${database}.properties" />
+ <fileset dir="${jbpm.home}/jboss/datasources">
+ <include name="jbpm-${database}-ds.xml"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${jboss.server.config.dir}/lib" overwrite="true">
+ <fileset dir="${jbpm.home}">
+ <include name="jbpm.jar" />
+ </fileset>
+ <fileset dir="${jbpm.home}/lib">
+ <include name="gwt-console-server-integration.jar" />
+ <include name="gwt-console-rpc.jar" />
+ </fileset>
+ </copy>
+
+ <copy todir="${jboss.server.config.dir}/deploy/jbpm" overwrite="true">
+ <fileset dir="${jbpm.home}/lib">
+ <include name="gwt-console.war" />
+ <include name="gwt-console-server.war" />
+ </fileset>
+ </copy>
+
+ <copy todir="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" overwrite="true">
+ <fileset dir="${jbpm.home}/lib">
+ <include name="jbpm-console-integration.jar" />
+ <include name="jbpm-console-form-plugin.jar" />
+ <include name="jbpm-console-graphView-plugin.jar"/>
+ <include name="freemarker.jar" />
+ <include name="livetribe-jsr223.jar" />
+ <include name="juel*.jar" />
+ </fileset>
+ </copy>
+
+ <mkdir dir="${jboss.home}/docs/examples/jbpm" />
+ <copy todir="${jboss.home}/docs/examples/jbpm" overwrite="true">
+ <fileset dir="${jbpm.home}/jboss/datasources" />
+ </copy>
+
+ <!-- reporting -->
+ <property name="birt.dir" value="${jboss.server.data.dir}/birt"/>
+ <mkdir dir="${birt.dir}"/>
+ <unzip src="${jbpm.home}/lib/report-engine.zip" dest="${birt.dir}"/>
+ <unzip src="${jbpm.home}/lib/jbpm-console-reports.jar" dest="${birt.dir}"/>
+
+ <!-- copy static configuration files -->
+ <copy todir="${jboss.server.config.dir}" overwrite="true">
+ <fileset dir="${jbpm.home}/jboss/config.jboss5" />
+ </copy>
+
+ <copy todir="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" overwrite="true">
+ <fileset dir="${jbpm.home}/lib">
+ <include name="jbpm-spi.jar"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${jboss.server.config.dir}/deployers/jbpm.deployer" overwrite="true">
+ <fileset dir="${jbpm.home}/lib">
+ <include name="jbpm-jboss5.jar"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${jboss.server.config.dir}/deployers/jbpm.deployer" overwrite="true">
+ <fileset dir="${jbpm.home}/lib">
+ <include name="jbpm-spi.jar"/>
+ </fileset>
+ </copy>
+
+ <property name="container.lib.dir" value="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" />
+ <antcall target="internal.copy.database.driver}" />
+ </target>
+
+ <!-- ### START JBOSS ################################################### -->
+ <target name="start.jboss"
+ description="starts jboss and waits till jboss is booted, then lets jboss run in the background">
+ <taskdef name="start-jboss"
+ classname="org.jbpm.pvm.internal.ant.StartJBossTask">
+ <classpath>
+ <fileset dir="${jbpm.home}">
+ <include name="jbpm.jar" />
+ </fileset>
+ </classpath>
+ </taskdef>
+ <start-jboss jbosshome="${jboss.home}" />
+ </target>
+
+ <!-- ### STOP JBOSS ################################################### -->
+ <target name="stop.jboss"
+ description="signals jboss to stop, but doesn't wait till its finished">
+ <exec executable="${jboss.home}/bin/shutdown.bat" os="Windows Vista, Windows XP,Windows 2000,Windows 98">
+ <arg line="-S"/>
+ </exec>
+ <exec executable="${jboss.home}/bin/shutdown.sh" os="Linux, Unix, Mac">
+ <arg line="-S"/>
+ </exec>
+ </target>
+
+ <!-- ### COPY DATABASE DRIVER ######################################### -->
+ <target name="internal.copy.database.driver" if="database.driver">
+ <condition property="database.driver" value="mysql-connector-java.jar">
+ <equals arg1="${database}" arg2="mysql" />
+ </condition>
+ <condition property="database.driver" value="ojdbc14.jar">
+ <equals arg1="${database}" arg2="oracle" />
+ </condition>
+ <condition property="database.driver" value="mysql-connector-java.jar">
+ <equals arg1="${database}" arg2="mysql" />
+ </condition>
+ <condition property="database.driver" value="postgresql.jar">
+ <equals arg1="${database}" arg2="postgresql" />
+ </condition>
+ <available file="${jbpm.home}/lib/${database.driver}" property="database.driver.jar.available" />
+ <fail message="please download the ${database} driver jar and put it in the ${jbpm.home}/lib directory" unless="database.driver.jar.available" />
+ <copy file="${jbpm.home}/lib/${database.driver}" todir="${container.lib.dir}" />
+ </target>
+
+</project>
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/build.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/hsqldb.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/hsqldb.hibernate.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/hsqldb.hibernate.cfg.xml 2009-08-04 16:12:13 UTC (rev 5421)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ <property name="hibernate.connection.datasource">java:JbpmDS</property>
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property name="jta.UserTransaction">UserTransaction</property>
+
+ <mapping resource="jbpm.repository.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
+
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/hsqldb.hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/mysql.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/mysql.hibernate.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/mysql.hibernate.cfg.xml 2009-08-04 16:12:13 UTC (rev 5421)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
+ <property name="hibernate.connection.datasource">java:JbpmDS</property>
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property name="jta.UserTransaction">UserTransaction</property>
+
+ <mapping resource="jbpm.repository.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
+
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/mysql.hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/oracle.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/oracle.hibernate.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/oracle.hibernate.cfg.xml 2009-08-04 16:12:13 UTC (rev 5421)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.Oracle9iDialect</property>
+ <property name="hibernate.connection.datasource">java:JbpmDS</property>
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property name="jta.UserTransaction">UserTransaction</property>
+
+ <mapping resource="jbpm.repository.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
+
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/oracle.hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/postgresql.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/postgresql.hibernate.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/postgresql.hibernate.cfg.xml 2009-08-04 16:12:13 UTC (rev 5421)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+ <property name="hibernate.connection.datasource">java:JbpmDS</property>
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property name="jta.UserTransaction">UserTransaction</property>
+
+ <mapping resource="jbpm.repository.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
+
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/postgresql.hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/sybase.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/sybase.hibernate.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/sybase.hibernate.cfg.xml 2009-08-04 16:12:13 UTC (rev 5421)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.SybaseDialect</property>
+ <property name="hibernate.connection.datasource">java:JbpmDS</property>
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property name="jta.UserTransaction">UserTransaction</property>
+
+ <mapping resource="jbpm.repository.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
+
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/datasource/sybase.hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/hsqldb.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/hsqldb.hibernate.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/hsqldb.hibernate.cfg.xml 2009-08-04 16:12:13 UTC (rev 5421)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ <property name="hibernate.connection.driver_class">@jdbc.driver@</property>
+ <property name="hibernate.connection.url">@jdbc.url@</property>
+ <property name="hibernate.connection.username">@jdbc.username@</property>
+ <property name="hibernate.connection.password">@jdbc.password@</property>
+ <property name="hibernate.format_sql">true</property>
+
+ <mapping resource="jbpm.repository.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
+
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/hsqldb.hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/mysql.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/mysql.hibernate.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/mysql.hibernate.cfg.xml 2009-08-04 16:12:13 UTC (rev 5421)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
+ <property name="hibernate.connection.driver_class">@jdbc.driver@</property>
+ <property name="hibernate.connection.url">@jdbc.url@</property>
+ <property name="hibernate.connection.username">@jdbc.username@</property>
+ <property name="hibernate.connection.password">@jdbc.password@</property>
+ <property name="hibernate.format_sql">true</property>
+
+ <mapping resource="jbpm.repository.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
+
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/mysql.hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/oracle.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/oracle.hibernate.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/oracle.hibernate.cfg.xml 2009-08-04 16:12:13 UTC (rev 5421)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
+ <property name="hibernate.connection.driver_class">@jdbc.driver@</property>
+ <property name="hibernate.connection.url">@jdbc.url@</property>
+ <property name="hibernate.connection.username">@jdbc.username@</property>
+ <property name="hibernate.connection.password">@jdbc.password@</property>
+ <property name="hibernate.format_sql">true</property>
+
+ <mapping resource="jbpm.repository.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
+
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/oracle.hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/postgresql.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/postgresql.hibernate.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/postgresql.hibernate.cfg.xml 2009-08-04 16:12:13 UTC (rev 5421)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+ <property name="hibernate.connection.driver_class">@jdbc.driver@</property>
+ <property name="hibernate.connection.url">@jdbc.url@</property>
+ <property name="hibernate.connection.username">@jdbc.username@</property>
+ <property name="hibernate.connection.password">@jdbc.password@</property>
+ <property name="hibernate.format_sql">true</property>
+
+ <mapping resource="jbpm.repository.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
+
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/postgresql.hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/sybase.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/sybase.hibernate.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/sybase.hibernate.cfg.xml 2009-08-04 16:12:13 UTC (rev 5421)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.SybaseDialect</property>
+ <property name="hibernate.connection.driver_class">@jdbc.driver@</property>
+ <property name="hibernate.connection.url">@jdbc.url@</property>
+ <property name="hibernate.connection.username">@jdbc.username@</property>
+ <property name="hibernate.connection.password">@jdbc.password@</property>
+ <property name="hibernate.format_sql">true</property>
+
+ <mapping resource="jbpm.repository.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
+
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/hibernate/jdbc/sybase.hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/logging/jdk/logging.properties
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/logging/jdk/logging.properties (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/logging/jdk/logging.properties 2009-08-04 16:12:13 UTC (rev 5421)
@@ -0,0 +1,18 @@
+handlers= java.util.logging.ConsoleHandler
+redirect.commons.logging = enabled
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = org.jbpm.internal.log.LogFormatter
+
+org.jbpm.level=FINE
+# org.jbpm.pvm.internal.tx.level=FINE
+# org.jbpm.pvm.internal.wire.level=FINE
+# org.jbpm.pvm.internal.util.level=FINE
+
+org.hibernate.level=INFO
+org.hibernate.cfg.SettingsFactory.level=SEVERE
+org.hibernate.cfg.HbmBinder.level=SEVERE
+# org.hibernate.SQL.level=FINEST
+# org.hibernate.type.level=FINEST
+# org.hibernate.tool.hbm2ddl.SchemaExport.level=FINEST
+# org.hibernate.transaction.level=FINEST
\ No newline at end of file
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/logging/jdk/logging.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/spring/applicationContext.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/spring/applicationContext.xml (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/spring/applicationContext.xml 2009-08-04 16:12:13 UTC (rev 5421)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
+
+ <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
+ <property name="configLocation" value="classpath:jbpm.hibernate.cfg.xml" />
+ <!-- A best practice should be to keep split the config into multiple files
+ <property name="configLocations" value="hibernate.cfg.xml, hibernate.jbpm.cfg.xml" />
+ -->
+ </bean>
+
+ <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
+ <property name="sessionFactory" ref="sessionFactory" />
+ <property name="dataSource" ref="dataSource" />
+ </bean>
+
+ <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:mem:." />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </bean>
+
+</beans>
\ No newline at end of file
Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/src/cfg/spring/applicationContext.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/trunk/modules/distro/src/main/files/install/src/demo/example.identities.sql
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/demo/example.identities.sql (rev 0)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/demo/example.identities.sql 2009-08-04 16:12:13 UTC (rev 5421)
@@ -0,0 +1,16 @@
+INSERT INTO JBPM4_ID_GROUP VALUES (1,0,'manager','manager','security-role',NULL);
+INSERT INTO JBPM4_ID_GROUP VALUES (2,0,'administrator','administrator','security-role',NULL);
+INSERT INTO JBPM4_ID_GROUP VALUES (3,0,'user','user','security-role',NULL);
+INSERT INTO JBPM4_ID_GROUP VALUES(4,0,'sales','sales',NULL,NULL);
+
+INSERT INTO JBPM4_ID_USER VALUES (1,0,'alex','password','Alex',NULL,'alex(a)jbpm.org');
+INSERT INTO JBPM4_ID_USER VALUES (2,0,'mike','password','Mike',NULL,'mike(a)jbpm.org');
+INSERT INTO JBPM4_ID_USER VALUES (3,0,'peter','password','Peter',NULL,'peter(a)jbpm.org');
+INSERT INTO JBPM4_ID_USER VALUES (4,0,'mary','password','Mary',NULL,'mary(a)jbpm.org');
+
+INSERT INTO JBPM4_ID_MEMBERSHIP VALUES (1,0,1,2,NULL);
+INSERT INTO JBPM4_ID_MEMBERSHIP VALUES (2,0,2,1,NULL);
+INSERT INTO JBPM4_ID_MEMBERSHIP VALUES (3,0,3,3,NULL);
+INSERT INTO JBPM4_ID_MEMBERSHIP VALUES (4,0,3,4,NULL);
+INSERT INTO JBPM4_ID_MEMBERSHIP VALUES (5,0,4,3,NULL);
+INSERT INTO JBPM4_ID_MEMBERSHIP VALUES (6,0,4,4,NULL);
Added: jbpm4/trunk/modules/pvm/src/main/resources/jbpm.tx.spring.cfg.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/resources/jbpm.tx.spring.cfg.xml (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/resources/jbpm.tx.spring.cfg.xml 2009-08-04 16:12:13 UTC (rev 5421)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbpm-configuration>
+
+ <process-engine-context>
+ <command-service>
+ <retry-interceptor />
+ <environment-interceptor />
+ <spring-transaction-interceptor />
+ </command-service>
+ </process-engine-context>
+
+ <transaction-context>
+ <transaction />
+ <hibernate-session />
+ </transaction-context>
+
+</jbpm-configuration>
Property changes on: jbpm4/trunk/modules/pvm/src/main/resources/jbpm.tx.spring.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 9 months
JBoss JBPM SVN: r5420 - jbpm4/trunk/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert.
by do-not-reply@jboss.org
Author: jbarrez
Date: 2009-08-04 06:13:28 -0400 (Tue, 04 Aug 2009)
New Revision: 5420
Modified:
jbpm4/trunk/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReaderTest.java
Log:
Quick fix for failing Hudson. Contact JimMa to understand how the task-reminder template will be used in migration tool.
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-08-04 08:49:06 UTC (rev 5419)
+++ jbpm4/trunk/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReaderTest.java 2009-08-04 10:13:28 UTC (rev 5420)
@@ -171,6 +171,7 @@
}
private void validate(Document convertedDoc) throws Exception {
+ System.out.println(convertedDoc.asXML());
List<Problem> problems = new JpdlParser().createParse().setString(convertedDoc.asXML()).execute().getProblems();
Assert.assertEquals(problems.toString(), 0, problems.size());
}
@@ -194,7 +195,12 @@
+ " <subject>rectify ${newspaper}</subject>"
+ " <text>${newspaper} ${date} ${details}</text>"
+ " </mail-template>"
-
+ + " <mail-template name='task-reminder'> "
+ + " <to addresses='${addressee}' />"
+ + " <subject>Task reminder</subject>"
+ + " <text>Task reminder</text>"
+ + " </mail-template>"
+
+ " </process-engine-context> </jbpm-configuration>");
environmentFactory.openEnvironment();
16 years, 9 months
JBoss JBPM SVN: r5419 - in jbpm4/trunk/modules/bpmn/src/main/java: org/jbpm/bpmn/flownodes and 1 other directory.
by do-not-reply@jboss.org
Author: kukeltje
Date: 2009-08-04 04:49:06 -0400 (Tue, 04 Aug 2009)
New Revision: 5419
Modified:
jbpm4/trunk/modules/bpmn/src/main/java/com/sun/script/xpath/XPathScriptEngine.java
jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/BpmnActivity.java
Log:
Remove unused import
Modified: jbpm4/trunk/modules/bpmn/src/main/java/com/sun/script/xpath/XPathScriptEngine.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/main/java/com/sun/script/xpath/XPathScriptEngine.java 2009-08-04 08:05:17 UTC (rev 5418)
+++ jbpm4/trunk/modules/bpmn/src/main/java/com/sun/script/xpath/XPathScriptEngine.java 2009-08-04 08:49:06 UTC (rev 5419)
@@ -46,7 +46,6 @@
import org.dom4j.DocumentFactory;
import org.dom4j.io.SAXReader;
import org.dom4j.io.SAXWriter;
-import org.jbpm.bpmn.xpath.BpmnFunctionResolver;
import org.jbpm.pvm.internal.util.IoUtil;
import org.jbpm.pvm.internal.util.XmlUtil;
import org.w3c.dom.Document;
Modified: jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/BpmnActivity.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/BpmnActivity.java 2009-08-04 08:05:17 UTC (rev 5418)
+++ jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/BpmnActivity.java 2009-08-04 08:49:06 UTC (rev 5419)
@@ -30,7 +30,6 @@
import org.jbpm.api.JbpmException;
import org.jbpm.api.activity.ActivityBehaviour;
import org.jbpm.bpmn.parser.BindingsParser;
-import org.jbpm.bpmn.xpath.BpmnFunctionResolver;
import org.jbpm.internal.log.Log;
import org.jbpm.pvm.internal.model.Activity;
import org.jbpm.pvm.internal.model.Condition;
16 years, 9 months