提交 5c3e4919 编写于 作者: T tijsrademakers

Merge branch 'master' of https://github.com/Activiti/Activiti

......@@ -95,8 +95,8 @@
</target>
<target name="copy.webapps">
<mkdir dir="target/wars" />
<copy todir="target/wars">
<mkdir dir="${target.distro.root}/wars" />
<copy todir="${target.distro.root}/wars">
<fileset dir="../modules/activiti-webapp-explorer2/target">
<include name="activiti-webapp-explorer*.war" />
</fileset>
......@@ -104,8 +104,8 @@
<include name="activiti-webapp-rest*.war" />
</fileset>
</copy>
<move file="target/wars/activiti-webapp-explorer2-${activiti.version}.war" tofile="target/wars/activiti-explorer.war"/>
<move file="target/wars/activiti-webapp-rest2-${activiti.version}.war" tofile="target/wars/activiti-rest.war"/>
<move file="${target.distro.root}/wars/activiti-webapp-explorer2-${activiti.version}.war" tofile="${target.distro.root}/wars/activiti-explorer.war"/>
<move file="${target.distro.root}/wars/activiti-webapp-rest2-${activiti.version}.war" tofile="${target.distro.root}/wars/activiti-rest.war"/>
</target>
<target name="build.docs" unless="nodocs">
......
......@@ -56,6 +56,15 @@
<p>The files can be found in the <code>activiti-engine-5.11.jar</code> file in directory
<code>org/activiti/db/upgrade/optional</code>.
</p>
<h4>API Change</h4>
<p>The functionality of the repositoryService.suspendProcessDefinitionByXXX has been slightly altered.
Previously, calling this method would stop the execution of jobs related to this process definition.
Now, calling this method will <b>not</b> do this, but rather make sure a process instance
cannot be created from this process definition. We've added a new method with an additional
parameter 'suspendProcessInstances' which can be used to get the same behavior: when set to 'true',
all the associated process instances will be suspended. This will avoid process instance continuation,
including the execution of jobs related to the process instance.</p>
<h3>Release Notes - Activiti - Version 5.10</h3>
......
......@@ -22,11 +22,6 @@
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<!-- required for building with JDK 5 -->
<groupId>org.livetribe</groupId>
<artifactId>livetribe-jsr223</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
......@@ -41,11 +36,6 @@
<artifactId>junit</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
......
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.activiti.engine.impl.ant;
import java.io.File;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.zip.ZipInputStream;
import org.activiti.engine.ActivitiException;
import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngineInfo;
import org.activiti.engine.ProcessEngines;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.impl.util.IoUtil;
import org.activiti.engine.impl.util.LogUtil;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.types.FileSet;
/**
* @author Tom Baeyens
*/
public class DeployBarTask extends Task {
String processEngineName = ProcessEngines.NAME_DEFAULT;
File file;
List<FileSet> fileSets;
public void execute() throws BuildException {
List<File> files = new ArrayList<File>();
if (file!=null) {
files.add(file);
}
if (fileSets!=null) {
for (FileSet fileSet: fileSets) {
DirectoryScanner directoryScanner = fileSet.getDirectoryScanner(getProject());
File baseDir = directoryScanner.getBasedir();
String[] includedFiles = directoryScanner.getIncludedFiles();
String[] excludedFiles = directoryScanner.getExcludedFiles();
List<String> excludedFilesList = Arrays.asList(excludedFiles);
for (String includedFile: includedFiles) {
if (!excludedFilesList.contains(includedFile)) {
files.add(new File(baseDir, includedFile));
}
}
}
}
Thread currentThread = Thread.currentThread();
ClassLoader originalClassLoader = currentThread.getContextClassLoader();
currentThread.setContextClassLoader(DeployBarTask.class.getClassLoader());
LogUtil.readJavaUtilLoggingConfigFromClasspath();
try {
log("Initializing process engine " + processEngineName);
ProcessEngines.init();
ProcessEngine processEngine = ProcessEngines.getProcessEngine(processEngineName);
if (processEngine == null) {
List<ProcessEngineInfo> processEngineInfos = ProcessEngines.getProcessEngineInfos();
if( processEngineInfos != null && processEngineInfos.size() > 0 )
{
// Since no engine with the given name is found, we can't be 100% sure which ProcessEngineInfo
// is causing the error. We should show ALL errors and process engine names / resource URL's.
String message = getErrorMessage(processEngineInfos, processEngineName);
throw new ActivitiException(message);
}
else
throw new ActivitiException("Could not find a process engine with name '" + processEngineName + "', no engines found. " +
"Make sure an engine configuration is present on the classpath");
}
RepositoryService repositoryService = processEngine.getRepositoryService();
log("Starting to deploy " + files.size() + " files");
for (File file: files) {
String path = file.getAbsolutePath();
log("Handling file " + path);
try {
FileInputStream inputStream = new FileInputStream(file);
try {
log("deploying bar "+path);
repositoryService
.createDeployment()
.name(file.getName())
.addZipInputStream(new ZipInputStream(inputStream))
.deploy();
} finally {
IoUtil.closeSilently(inputStream);
}
} catch (Exception e) {
throw new BuildException("couldn't deploy bar "+path+": "+e.getMessage(), e);
}
}
} finally {
currentThread.setContextClassLoader(originalClassLoader);
}
}
private String getErrorMessage(List<ProcessEngineInfo> processEngineInfos, String name) {
StringBuilder builder = new StringBuilder("Could not find a process engine with name ");
builder.append(name).append(", engines loaded:\n");
for (ProcessEngineInfo engineInfo : processEngineInfos) {
String engineName = (engineInfo.getName() != null) ? engineInfo.getName() : "unknown";
builder.append("Process engine name: ").append(engineName);
builder.append(" - resource: ").append(engineInfo.getResourceUrl());
builder.append(" - status: ");
if (engineInfo.getException() != null) {
builder.append("Error while initializing engine. ");
if (engineInfo.getException().indexOf("driver on UnpooledDataSource") != -1) {
builder.append("Exception while initializing process engine! Database or database driver might not have been configured correctly.")
.append("Please consult the user guide for supported database environments or build.properties. Stacktrace: ")
.append(engineInfo.getException());
} else {
builder.append("Stacktrace: ").append(engineInfo.getException());
}
} else {
// Process engine initialised without exception
builder.append("Initialised");
}
builder.append("\n");
}
return builder.toString();
}
public String getProcessEngineName() {
return processEngineName;
}
public void setProcessEngineName(String processEngineName) {
this.processEngineName = processEngineName;
}
public File getFile() {
return file;
}
public void setFile(File file) {
this.file = file;
}
public List<FileSet> getFileSets() {
return fileSets;
}
public void setFileSets(List<FileSet> fileSets) {
this.fileSets = fileSets;
}
}
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.activiti.engine.impl.ant;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
/**
* @author Tom Baeyens
*/
public class LaunchTask extends Task {
private static final String FILESEPARATOR = System.getProperty("file.separator");
File dir;
String script;
String msg;
String args;
public void execute() throws BuildException {
if (dir==null) {
throw new BuildException("dir attribute is required with the launch task");
}
if (script==null) {
throw new BuildException("script attribute is required with the launch task");
}
String[] cmd = null;
String executable = getExecutable();
if (args!=null) {
List<String> pieces = new ArrayList<String>();
pieces.add(executable);
StringTokenizer tokenizer = new StringTokenizer("args", " ");
while (tokenizer.hasMoreTokens()) {
pieces.add(tokenizer.nextToken());
}
cmd = pieces.toArray(new String[pieces.size()]);
} else {
cmd = new String[]{executable};
}
LaunchThread.launch(this,cmd,dir,msg);
}
public String getExecutable() {
String os = System.getProperty("os.name").toLowerCase();
String dirPath = dir.getAbsolutePath();
String base = dirPath+FILESEPARATOR+script;
if (exists(base)) {
return base;
}
if (os.indexOf("windows")!=-1) {
if (exists(base+".exe")) {
return base+".exe";
}
if (exists(base+".bat")) {
return base+".bat";
}
}
if (os.indexOf("linux")!=-1 || os.indexOf("mac")!=-1) {
if (exists(base+".sh")) {
return base+".sh";
}
}
throw new BuildException("couldn't find executable for script "+base);
}
public boolean exists(String path) {
File file = new File(path);
return (file.exists());
}
public void setDir(File dir) {
this.dir = dir;
}
public void setScript(String script) {
this.script = script;
}
public void setMsg(String msg) {
this.msg = msg;
}
public void setArgs(String args) {
this.args = args;
}
}
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.activiti.engine.impl.ant;
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStream;
import java.io.InputStreamReader;
import org.activiti.engine.impl.util.IoUtil;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
/**
* @author Tom Baeyens
*/
public class LaunchThread extends Thread {
Task task;
String[] cmd;
File dir;
String msg;
public LaunchThread(Task task, String[] cmd, File dir, String msg) {
this.task = task;
this.cmd = cmd;
this.dir = dir;
this.msg = msg;
}
public static void launch(Task task, String[] cmd, File dir, String launchCompleteText) {
if (cmd==null) {
throw new BuildException("cmd is null");
}
try {
LaunchThread launchThread = new LaunchThread(task, cmd, dir, launchCompleteText);
launchThread.start();
launchThread.join();
} catch (Exception e) {
throw new BuildException("couldn't launch cmd: "+cmdString(cmd), e);
}
}
private static String cmdString(String[] cmd) {
StringBuilder cmdText = new StringBuilder();
for(String cmdPart: cmd) {
cmdText.append(cmdPart);
cmdText.append(" ");
}
return cmdText.toString();
}
public void run() {
task.log("launching cmd '"+cmdString(cmd)+"' in dir '"+dir+"'");
if (msg!=null) {
task.log("waiting for launch completion msg '"+msg+"'...");
} else {
task.log("not waiting for a launch completion msg.");
}
ProcessBuilder processBuilder = new ProcessBuilder(cmd)
.redirectErrorStream(true)
.directory(dir);
InputStream consoleStream = null;
try {
Process process = processBuilder.start();
consoleStream = process.getInputStream();
BufferedReader consoleReader = new BufferedReader(new InputStreamReader(consoleStream));
String consoleLine = "";
while ( (consoleLine!=null)
&& (msg==null || consoleLine.indexOf(msg)==-1)
) {
consoleLine = consoleReader.readLine();
if (consoleLine!=null) {
task.log(" " + consoleLine);
} else {
task.log("launched process completed");
}
}
} catch (Exception e) {
throw new BuildException("couldn't launch "+cmdString(cmd), e);
} finally {
IoUtil.closeSilently(consoleStream);
}
}
}
......@@ -136,9 +136,14 @@ public class DemoDataGenerator implements ModelDataJsonConstants {
processEngine.getRepositoryService()
.createDeployment()
.name("Demo processes")
.addClasspathResource("org/activiti/explorer/demo/process/testProcess.bpmn20.xml")
.addClasspathResource("org/activiti/explorer/demo/process/oneTaskProcess.bpmn20.xml")
.addClasspathResource("org/activiti/explorer/demo/process/createTimersProcess.bpmn20.xml")
.addClasspathResource("org/activiti/explorer/demo/process/VacationRequest.bpmn20.xml")
.addClasspathResource("org/activiti/explorer/demo/process/VacationRequest.png")
.addClasspathResource("org/activiti/explorer/demo/process/FixSystemFailureProcess.bpmn20.xml")
.addClasspathResource("org/activiti/explorer/demo/process/FixSystemFailureProcess.png")
.addClasspathResource("org/activiti/explorer/demo/process/Helpdesk.bpmn20.xml")
.addClasspathResource("org/activiti/explorer/demo/process/Helpdesk.png")
.addClasspathResource("org/activiti/explorer/demo/process/reviewSalesLead.bpmn20.xml")
.deploy();
}
......
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:activiti="http://activiti.org/bpmn"
targetNamespace="Examples">
<process id="fixSystemFailure" name="Fix system failure">
<startEvent id="theStart" />
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="subProcess" />
<subProcess id="subProcess">
<startEvent id="subProcessStart" />
<sequenceFlow id="flow2" sourceRef="subProcessStart" targetRef="subProcessFork" />
<parallelGateway id="subProcessFork" />
<sequenceFlow id="flow3" sourceRef="subProcessFork" targetRef="task1" />
<sequenceFlow id="flow4" sourceRef="subProcessFork" targetRef="task2" />
<userTask id="task1" name="Investigate hardware" activiti:candidateGroups="engineering" />
<sequenceFlow id="flow5" sourceRef="task1" targetRef="subProcessJoin" />
<userTask id="task2" name="Investigate software" activiti:candidateGroups="engineering" />
<sequenceFlow id="flow6" sourceRef="task2" targetRef="subProcessJoin" />
<parallelGateway id="subProcessJoin" />
<sequenceFlow id="flow7" sourceRef="subProcessJoin" targetRef="subProcessEnd" />
<endEvent id="subProcessEnd" />
</subProcess>
<!-- Timer on subprocess -->
<boundaryEvent id="timer" attachedToRef="subProcess">
<timerEventDefinition>
<timeDuration>PT4H</timeDuration>
</timerEventDefinition>
</boundaryEvent>
<sequenceFlow id="flow8" sourceRef="timer" targetRef="taskAfterTimer" />
<userTask id="taskAfterTimer" name="Hand over to Level 2 support" activiti:candidateGroups="management" />
<sequenceFlow id="flow9" sourceRef="taskAfterTimer" targetRef="theEnd1" />
<endEvent id="theEnd1" />
<sequenceFlow id="flow10" sourceRef="subProcess" targetRef="taskAfterSubProcess" />
<userTask id="taskAfterSubProcess" name="Write report" activiti:candidateGroups="engineering" />
<sequenceFlow id="flow11" sourceRef="taskAfterSubProcess" targetRef="theEnd" />
<endEvent id="theEnd" />
</process>
</definitions>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:activiti="http://activiti.org/bpmn"
targetNamespace="Examples">
<process id="escalationExample" name="Helpdesk process">
<startEvent id="theStart" />
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="firstLineSupport" />
<userTask id="firstLineSupport" name="First line support" activiti:assignee="kermit">
<documentation>Fix issue raised by customer</documentation>
</userTask>
<sequenceFlow id="flow2" sourceRef="firstLineSupport" targetRef="normalEnd" />
<endEvent id="normalEnd" />
<boundaryEvent id="escalationTimer" cancelActivity="true" attachedToRef="firstLineSupport">
<timerEventDefinition>
<timeDuration>PT5M</timeDuration>
</timerEventDefinition>
</boundaryEvent>
<sequenceFlow id="flow3" sourceRef="escalationTimer" targetRef="handleEscalation" />
<userTask id="handleEscalation" name="Handle escalated issue" activiti:candidateGroups="management">
<documentation>Escalation: issue was not fixed in time by first level support</documentation>
</userTask>
<sequenceFlow id="flow4" sourceRef="handleEscalation" targetRef="escalatedEnd" />
<endEvent id="escalatedEnd" />
</process>
</definitions>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<definitions id="definitions"
targetNamespace="http://activiti.org/bpmn20"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:activiti="http://activiti.org/bpmn">
<process id="vacationRequest" name="Vacation request">
<startEvent id="request" activiti:initiator="employeeName">
<extensionElements>
<activiti:formProperty id="numberOfDays" name="Number of days" type="long" value="1" required="true"/>
<activiti:formProperty id="startDate" name="First day of holiday (dd-MM-yyy)" datePattern="dd-MM-yyyy hh:mm" type="date" required="true" />
<activiti:formProperty id="vacationMotivation" name="Motivation" type="string" />
</extensionElements>
</startEvent>
<sequenceFlow id="flow1" sourceRef="request" targetRef="handleRequest" />
<userTask id="handleRequest" name="Handle vacation request" >
<documentation>
${employeeName} would like to take ${numberOfDays} day(s) of vacation (Motivation: ${vacationMotivation}).
</documentation>
<extensionElements>
<activiti:formProperty id="vacationApproved" name="Do you approve this vacation" type="enum" required="true">
<activiti:value id="true" name="Approve" />
<activiti:value id="false" name="Reject" />
</activiti:formProperty>
<activiti:formProperty id="managerMotivation" name="Motivation" type="string" />
</extensionElements>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<sequenceFlow id="flow2" sourceRef="handleRequest" targetRef="requestApprovedDecision" />
<exclusiveGateway id="requestApprovedDecision" name="Request approved?" />
<sequenceFlow id="flow3" sourceRef="requestApprovedDecision" targetRef="sendApprovalMail">
<conditionExpression xsi:type="tFormalExpression">${vacationApproved == 'true'}</conditionExpression>
</sequenceFlow>
<task id="sendApprovalMail" name="Send confirmation e-mail" />
<sequenceFlow id="flow4" sourceRef="sendApprovalMail" targetRef="theEnd1" />
<endEvent id="theEnd1" />
<sequenceFlow id="flow5" sourceRef="requestApprovedDecision" targetRef="adjustVacationRequestTask">
<conditionExpression xsi:type="tFormalExpression">${vacationApproved == 'false'}</conditionExpression>
</sequenceFlow>
<userTask id="adjustVacationRequestTask" name="Adjust vacation request">
<documentation>
Your manager has disapproved your vacation request for ${numberOfDays} days.
Reason: ${managerMotivation}
</documentation>
<extensionElements>
<activiti:formProperty id="numberOfDays" name="Number of days" value="${numberOfDays}" type="long" required="true"/>
<activiti:formProperty id="startDate" name="First day of holiday (dd-MM-yyy)" value="${startDate}" datePattern="dd-MM-yyyy hh:mm" type="date" required="true" />
<activiti:formProperty id="vacationMotivation" name="Motivation" value="${vacationMotivation}" type="string" />
<activiti:formProperty id="resendRequest" name="Resend vacation request to manager?" type="enum" required="true">
<activiti:value id="true" name="Yes" />
<activiti:value id="false" name="No" />
</activiti:formProperty>
</extensionElements>
<humanPerformer>
<resourceAssignmentExpression>
<formalExpression>${employeeName}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<sequenceFlow id="flow6" sourceRef="adjustVacationRequestTask" targetRef="resendRequestDecision" />
<exclusiveGateway id="resendRequestDecision" name="Resend request?" />
<sequenceFlow id="flow7" sourceRef="resendRequestDecision" targetRef="handleRequest">
<conditionExpression xsi:type="tFormalExpression">${resendRequest == 'true'}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow8" sourceRef="resendRequestDecision" targetRef="theEnd2">
<conditionExpression xsi:type="tFormalExpression">${resendRequest == 'false'}</conditionExpression>
</sequenceFlow>
<endEvent id="theEnd2" />
</process>
</definitions>
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:activiti="http://activiti.org/bpmn"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
targetNamespace="Examples"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL http://www.omg.org/spec/BPMN/2.0/20100501/BPMN20.xsd">
<error id="notEnoughInfoError" errorCode="not_enough_info" />
<process id="reviewSaledLead" name="Review sales lead">
<startEvent id="theStart" activiti:initiator="initiator" />
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="provideNewSalesLead"/>
<userTask id="provideNewSalesLead" name="Provide new sales lead" activiti:assignee="${initiator}">
<extensionElements>
<activiti:formProperty id="customerName" name="Customer name" type="string" required="true"/>
<activiti:formProperty id="potentialProfit" name="Potential profit" type="long" />
<activiti:formProperty id="details" name="Details" type="string"/>
</extensionElements>
</userTask>
<sequenceFlow id="flow2" sourceRef="provideNewSalesLead" targetRef="reviewSalesLeadSubProcess"/>
<subProcess id="reviewSalesLeadSubProcess" name="Review sales lead">
<startEvent id="subProcessStart" />
<sequenceFlow id="flow3" sourceRef="subProcessStart" targetRef="fork"/>
<sequenceFlow id="flow4" sourceRef="fork" targetRef="reviewProfitability"/>
<parallelGateway id="fork" />
<sequenceFlow id="flow5" sourceRef="fork" targetRef="reviewCustomerRating"/>
<userTask id="reviewCustomerRating" name="Review customer rating" activiti:candidateGroups="accountancy" />
<sequenceFlow id="flow6" sourceRef="reviewCustomerRating" targetRef="subProcessEnd1"/>
<endEvent id="subProcessEnd1" />
<userTask id="reviewProfitability" name="Review profitability" activiti:candidateGroups="management">
<documentation>
${initiator} has published a new sales lead: ${customerName}. Details: ${details}
</documentation>
<extensionElements>
<activiti:formProperty id="notEnoughInformation" name="Do you believe this customer is profitable?" type="enum" required="true">
<activiti:value id="false" name="Yes" />
<activiti:value id="true" name="No (= request more info)" />
</activiti:formProperty>
</extensionElements>
</userTask>
<sequenceFlow id="flow7" sourceRef="reviewProfitability" targetRef="enoughInformationCheck"/>
<exclusiveGateway id="enoughInformationCheck" name="Enough information?" />
<sequenceFlow id="flow8" sourceRef="enoughInformationCheck" targetRef="notEnoughInformationEnd">
<conditionExpression>${notEnoughInformation == 'true'}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow9" sourceRef="enoughInformationCheck" targetRef="subProcessEnd2">
<conditionExpression>${notEnoughInformation == 'false'}</conditionExpression>
</sequenceFlow>
<endEvent id="subProcessEnd2" />
<endEvent id="notEnoughInformationEnd">
<errorEventDefinition errorRef="notEnoughInfoError" />
</endEvent>
</subProcess>
<sequenceFlow id="flow10" sourceRef="reviewSalesLeadSubProcess" targetRef="storeLeadInCrmSystem"/>
<boundaryEvent attachedToRef="reviewSalesLeadSubProcess" cancelActivity="true" id="catchNotEnoughInformationError" >
<errorEventDefinition errorRef="notEnoughInfoError" />
</boundaryEvent>
<sequenceFlow id="flow11" sourceRef="catchNotEnoughInformationError" targetRef="provideAdditionalDetails"/>
<userTask id="provideAdditionalDetails" name="Provide additional details" activiti:assignee="${initiator}">
<documentation>Provide additional details for ${customerName}.</documentation>
<extensionElements>
<activiti:formProperty id="details" name="Additional details" type="string" required="true"/>
</extensionElements>
</userTask>
<sequenceFlow id="flow12" sourceRef="provideAdditionalDetails" targetRef="reviewSalesLeadSubProcess"/>
<task id="storeLeadInCrmSystem" name="Store lead in CRM system" />
<sequenceFlow id="flow13" sourceRef="storeLeadInCrmSystem" targetRef="processEnd"/>
<endEvent id="processEnd" />
</process>
<bpmndi:BPMNDiagram id="sid-628a8d2c-0009-4da0-9c2a-412cf76015a8">
<bpmndi:BPMNPlane bpmnElement="reviewSaledLead" id="sid-5cb2f8c3-3889-4a12-8a5b-b8f90551695e">
<bpmndi:BPMNShape bpmnElement="theStart" id="theStart_gui">
<omgdc:Bounds height="30.0" width="30.0" x="75.0" y="300.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="provideNewSalesLead" id="provideNewSalesLead_gui">
<omgdc:Bounds height="80.0" width="100.0" x="165.0" y="275.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="reviewSalesLeadSubProcess" id="reviewSalesLeadSubProcess_gui" isExpanded="true">
<omgdc:Bounds height="320.0" width="544.0" x="315.0" y="160.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="subProcessStart" id="subProcessStart_gui">
<omgdc:Bounds height="30.0" width="30.0" x="360.0" y="300.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="fork" id="fork_gui">
<omgdc:Bounds height="40.0" width="40.0" x="435.0" y="295.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="reviewCustomerRating" id="reviewCustomerRating_gui">
<omgdc:Bounds height="80.0" width="100.0" x="517.0" y="210.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="subProcessEnd1" id="subProcessEnd1_gui">
<omgdc:Bounds height="28.0" width="28.0" x="670.0" y="236.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="reviewProfitability" id="reviewProfitability_gui">
<omgdc:Bounds height="80.0" width="100.0" x="517.0" y="360.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="enoughInformationCheck" id="enoughInformationCheck_gui" isMarkerVisible="true">
<omgdc:Bounds height="40.0" width="40.0" x="664.0" y="380.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="subProcessEnd2" id="subProcessEnd2_gui">
<omgdc:Bounds height="28.0" width="28.0" x="765.0" y="386.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="notEnoughInformationEnd" id="notEnoughInformationEnd_gui">
<omgdc:Bounds height="28.0" width="28.0" x="765.0" y="345.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="provideAdditionalDetails" id="provideAdditionalDetails_gui">
<omgdc:Bounds height="80.0" width="100.0" x="660.0" y="525.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="catchNotEnoughInformationError" id="catchNotEnoughInformationError_gui">
<omgdc:Bounds height="30.0" width="30.0" x="783.8620689660311" y="465.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="storeLeadInCrmSystem" id="storeLeadInCrmSystem_gui">
<omgdc:Bounds height="80.0" width="100.0" x="910.0" y="275.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="processEnd" id="processEnd_gui">
<omgdc:Bounds height="28.0" width="28.0" x="1050.0" y="301.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow12" id="flow12_gui">
<omgdi:waypoint x="660.0" y="565.0"/>
<omgdi:waypoint x="587.0" y="565.0"/>
<omgdi:waypoint x="587.0" y="480.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow9" id="flow9_gui">
<omgdi:waypoint x="704.0" y="400.0"/>
<omgdi:waypoint x="765.0" y="400.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow7" id="flow7_gui">
<omgdi:waypoint x="617.0" y="400.0"/>
<omgdi:waypoint x="664.0" y="400.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow8" id="flow8_gui">
<omgdi:waypoint x="684.0" y="380.0"/>
<omgdi:waypoint x="684.5" y="359.0"/>
<omgdi:waypoint x="765.0" y="359.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="flow3_gui">
<omgdi:waypoint x="390.0" y="315.0"/>
<omgdi:waypoint x="435.0" y="315.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow4" id="flow4_gui">
<omgdi:waypoint x="455.0" y="335.0"/>
<omgdi:waypoint x="455.5" y="400.0"/>
<omgdi:waypoint x="517.0" y="400.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow6" id="flow6_gui">
<omgdi:waypoint x="617.0" y="250.0"/>
<omgdi:waypoint x="670.0" y="250.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow1" id="flow1_gui">
<omgdi:waypoint x="105.0" y="315.0"/>
<omgdi:waypoint x="165.0" y="315.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow10" id="flow10_gui">
<omgdi:waypoint x="859.0" y="317.0"/>
<omgdi:waypoint x="910.0" y="315.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow11" id="flow11_gui">
<omgdi:waypoint x="798.0" y="495.0"/>
<omgdi:waypoint x="798.8620689660311" y="565.0"/>
<omgdi:waypoint x="760.0" y="565.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="flow2_gui">
<omgdi:waypoint x="265.0" y="315.0"/>
<omgdi:waypoint x="290.0" y="315.0"/>
<omgdi:waypoint x="315.0" y="316.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow13" id="flow13_gui">
<omgdi:waypoint x="1010.0" y="315.0"/>
<omgdi:waypoint x="1050.0" y="315.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow5" id="flow5_gui">
<omgdi:waypoint x="455.0" y="295.0"/>
<omgdi:waypoint x="455.5" y="250.0"/>
<omgdi:waypoint x="517.0" y="250.0"/>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
......@@ -201,12 +201,6 @@
<artifactId>activiti-cxf</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.7.1</version>
<scope>provided</scope>
</dependency>
<!-- EMAIL -->
<dependency>
<groupId>org.apache.commons</groupId>
......@@ -270,14 +264,6 @@
<artifactId>json</artifactId>
<version>20070829</version>
</dependency>
<dependency>
<!-- required for building with JDK 5 -->
<groupId>org.livetribe</groupId>
<artifactId>livetribe-jsr223</artifactId>
<version>2.0.6</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-cxf</artifactId>
......
......@@ -10,7 +10,8 @@
After downloading the Activiti Explorer WAR file from the <ulink url="http://www.activiti.org">Activiti website</ulink>,
follow these steps to get the demo setup running with default settings.
You'll need a working <ulink url="http://java.sun.com/javase/downloads/index.jsp">Java runtime</ulink> and
<ulink url="http://tomcat.apache.org/download-70.cgi">Apache Tomcat</ulink> installation.
<ulink url="http://tomcat.apache.org/download-70.cgi">Apache Tomcat</ulink> installation (Actually,
any web container would work since we only rely on servlet capablility. But we test on Tomcat primarily).
<itemizedlist>
<listitem>
<para>Copy the downloaded activiti-explorer.war to the webapps directory of Tomcat.</para>
......@@ -103,49 +104,77 @@
</para>
</section>
<section id="database.tables.explained">
<title>Database table names explained</title>
<section id="getting.started.including.libs">
<title>Include the Activiti jar and its dependencies</title>
<para>
The database names of Activiti all start with <emphasis role="bold">ACT_</emphasis>. The
second part is a two-character identification of use case of the table. This use case
will also roughly match the service API.
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">ACT_RE_*</emphasis>: 'RE' stands for <literal>repository</literal>.
Tables with this prefix will contain 'static'' information such as process definitions and,
process resources (images, rules, etc.).
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">ACT_RU_*</emphasis>: 'RU' stands for <literal>runtime</literal>.
These are the runtime tables, that contain the runtime data of process instances,
user tasks,variables, jobs, etc. Activiti only stores the runtime data during process instance
execution, and removes the records when a process instance ends. This keeps
the runtime tables small and fast.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">ACT_ID_*</emphasis>: 'ID' stands for <literal>identity</literal>.
These tables contain identity information, such as users, groups, etc.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">ACT_HI_*</emphasis>: 'HI' stands for <literal>history</literal>.
These are the tables that contain historic data, such as past process instances,
variables, tasks, etc.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">ACT_GE_*</emphasis>: <literal>general</literal> data, which is used
in various use cases.
</para>
</listitem>
</itemizedlist>
To include the Activiti jar and its dependent libraries, we advise using
<ulink url="http://maven.apache.org/">Maven</ulink>Maven (or <ulink url="http://ant.apache.org/ivy/">Ivy</ulink>), as it
simplies dependency management on both our and your side a lot. Follow the instructions
at <ulink url="http://www.activiti.org/community.html#maven.respository"></ulink> to
include the necessary jars in your environment.
</para>
<para>
Alternatively, if you don't want to use Maven you can include the jars in your project
yourself. The Activiti download zip contains a folder <literal>libs</literal> which
contain all the Activiti jars (and the source jars). The dependencies are not shipped this way.
The required dependencies of the Activiti engine are (generated using <literal>mvn dependency:tree</literal>):
<programlisting>
org.activiti:activiti-engine:jar:5.11-SNAPSHOT
+- org.apache.commons:commons-email:jar:1.2:compile
| +- javax.mail:mail:jar:1.4.1:compile
| \- javax.activation:activation:jar:1.1:compile
+- commons-lang:commons-lang:jar:2.4:compile
+- org.mybatis:mybatis:jar:3.1.1:compile
+- org.springframework:spring-beans:jar:3.1.2.RELEASE:compile
| \- org.springframework:spring-core:jar:3.1.2.RELEASE:compile
| +- org.springframework:spring-asm:jar:3.1.2.RELEASE:compile
| \- commons-logging:commons-logging:jar:1.1.1:compile
\- joda-time:joda-time:jar:2.1:compile
</programlisting>
Note: the mail jars are only needed if you are using the <link linkend="bpmnEmailTask">mail service task</link>.
</para>
<para>
All the dependencies can easily be downloaded using <literal>mvn dependency:copy-dependencies</literal>
on a module of the <ulink url="https://github.com/Activiti/Activiti">Activiti source code</ulink>.
</para>
</section>
<section id="getting.started.next.steps">
<title>Next steps</title>
<para>
Playing around with the <link linkend="activitiExplorer">Activiti Explorer</link> web application
is a good way to get familiar with the Activiti concepts and functionality. However, the
main purpose of Activiti is of course to enable powerful BPM and workflow capabilities
in your own application. The following chapters will get you familiar with how to
use Activiti programmatically in your environment:
<itemizedlist>
<listitem>
<para>
<link linkend="configuration">The chapter on configuration</link> will learn you
how to set up Activiti and how to obtain an instance of the <literal>ProcessEngine</literal>
class which is your central access point to all the engine functionality of Activiti.
</para>
</listitem>
<listitem>
<para>
<link linkend="chapterApi">The API chapter</link> will guide you through the
services which form the API of Activiti. These services offer the Activiti engine
functionality in a convienent yet powerful way and can be used in any Java
environment.
</para>
</listitem>
<listitem>
<para>
Interested in getting insight on BPMN 2.0, the format in which process for the
Activiti engine are written? Then continue on to the <link linkend="bpmn20">BPMN 2.0 section</link>.
</para>
</listitem>
</itemizedlist>
</para>
</section>
......
......@@ -265,50 +265,6 @@ ProcessEngine processEngine = ProcessEngineConfiguration.createStandaloneInMemPr
</para>
</section>
<section id="jobExecutorConfiguration">
<title>Job executor activation</title>
<para>The JobExecutor is a component that manages a couple of threads to fire timers (and later also asynchronous messages).
For unit testing scenarios, it is cumbersome to work with multiple threads. Therefor the API allows to query for
(<literal>ManagementService.createJobQuery</literal>) and execute jobs (<literal>ManagementService.executeJob</literal>) through
the API so that job execution can be controlled from within a unit test. To avoid that the job executor interferes, it can be turned off.
</para>
<para>
By default, the JobExecutor is activated when the process engine boots. Specify
<programlisting>&lt;property name=&quot;jobExecutorActivate&quot; value=&quot;false&quot; /></programlisting>
when you don't want the JobExecutor to be activated upon process engine boot.
</para>
</section>
<section id="mailServerConfiguration">
<title>Mail server configuration</title>
<para>
Optional. Activiti supports sending e-mails in business processes. To actually send an e-mail, a valid
SMTP mail server configuration is required. See the
<link linkend="bpmnEmailTaskServerConfiguration">e-mail task</link> for the configuration options.
</para>
</section>
<section id="historyConfiguration">
<title>History configuration</title>
<para>
Optional. Allows to tweak settings that influence the <link linkend="history">history capabilities</link>
of the engine. See <link linkend="historyConfig">history configuration</link> for more details.
<programlisting>&lt;property name=&quot;history&quot; value=&quot;audit&quot; /&gt;</programlisting>
</para>
</section>
<section id="exposingConfigurationBeans">
<title>Exposing configuration beans in expressions and scripts</title>
<para>By default, all beans that you specify in the <literal>activiti.cfg.xml</literal> configuration
or in your own spring configuration file are available to expressions and in the scripts.
If you want to limit the visibility of beans in your configuration file, then you can
configure a property called <literal>beans</literal> in your process engine configuration.
The beans property in ProcessEngineConfiguration is a map. When you specify that property,
only beans specified in that map will be visible to expressions and scripts. The exposed beans
will be exposed with the names as you specify in that map.
</para>
</section>
<section id="supporteddatabases">
<title>Supported databases</title>
<para>Following are the types (case sensitive!) that Activiti uses to refer to databases.</para>
......@@ -404,12 +360,59 @@ ProcessEngine processEngine = ProcessEngineConfiguration.createStandaloneInMemPr
<para><emphasis role="bold">identity:</emphasis> optional tables, when using the default identity management as shipped with the engine.</para>
</listitem>
<listitem>
<para><emphasis role="bold">history:</emphasis> contain the history and audit information. Optional: not needed when history level is set to <emphasis>none</emphasis></para>
<para><emphasis role="bold">history:</emphasis> contain the history and audit information. Optional: not needed when history level is set to <emphasis>none</emphasis>
Note that this will also disable some features such as commenting on tasks which store the data in the history database.</para>
</listitem>
</itemizedlist>
</para>
</section>
<section id="database.tables.explained">
<title>Database table names explained</title>
<para>
The database names of Activiti all start with <emphasis role="bold">ACT_</emphasis>. The
second part is a two-character identification of use case of the table. This use case
will also roughly match the service API.
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">ACT_RE_*</emphasis>: 'RE' stands for <literal>repository</literal>.
Tables with this prefix will contain 'static'' information such as process definitions and,
process resources (images, rules, etc.).
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">ACT_RU_*</emphasis>: 'RU' stands for <literal>runtime</literal>.
These are the runtime tables, that contain the runtime data of process instances,
user tasks,variables, jobs, etc. Activiti only stores the runtime data during process instance
execution, and removes the records when a process instance ends. This keeps
the runtime tables small and fast.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">ACT_ID_*</emphasis>: 'ID' stands for <literal>identity</literal>.
These tables contain identity information, such as users, groups, etc.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">ACT_HI_*</emphasis>: 'HI' stands for <literal>history</literal>.
These are the tables that contain historic data, such as past process instances,
variables, tasks, etc.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">ACT_GE_*</emphasis>: <literal>general</literal> data, which is used
in various use cases.
</para>
</listitem>
</itemizedlist>
</para>
</section>
<section id="databaseUpgrade">
<title>Database upgrade</title>
......@@ -443,4 +446,49 @@ ProcessEngine processEngine = ProcessEngineConfiguration.createStandaloneInMemPr
It's also possible to run the upgrade database scripts, available on the Activiti downloads page.
</para>
</section>
<section id="jobExecutorConfiguration">
<title>Job executor activation</title>
<para>The JobExecutor is a component that manages a couple of threads to fire timers (and later also asynchronous messages).
For unit testing scenarios, it is cumbersome to work with multiple threads. Therefor the API allows to query for
(<literal>ManagementService.createJobQuery</literal>) and execute jobs (<literal>ManagementService.executeJob</literal>) through
the API so that job execution can be controlled from within a unit test. To avoid that the job executor interferes, it can be turned off.
</para>
<para>
By default, the JobExecutor is activated when the process engine boots. Specify
<programlisting>&lt;property name=&quot;jobExecutorActivate&quot; value=&quot;false&quot; /></programlisting>
when you don't want the JobExecutor to be activated upon process engine boot.
</para>
</section>
<section id="mailServerConfiguration">
<title>Mail server configuration</title>
<para>
Optional. Activiti supports sending e-mails in business processes. To actually send an e-mail, a valid
SMTP mail server configuration is required. See the
<link linkend="bpmnEmailTaskServerConfiguration">e-mail task</link> for the configuration options.
</para>
</section>
<section id="historyConfiguration">
<title>History configuration</title>
<para>
Optional. Allows to tweak settings that influence the <link linkend="history">history capabilities</link>
of the engine. See <link linkend="historyConfig">history configuration</link> for more details.
<programlisting>&lt;property name=&quot;history&quot; value=&quot;audit&quot; /&gt;</programlisting>
</para>
</section>
<section id="exposingConfigurationBeans">
<title>Exposing configuration beans in expressions and scripts</title>
<para>By default, all beans that you specify in the <literal>activiti.cfg.xml</literal> configuration
or in your own spring configuration file are available to expressions and in the scripts.
If you want to limit the visibility of beans in your configuration file, then you can
configure a property called <literal>beans</literal> in your process engine configuration.
The beans property in ProcessEngineConfiguration is a map. When you specify that property,
only beans specified in that map will be visible to expressions and scripts. The exposed beans
will be exposed with the names as you specify in that map.
</para>
</section>
</chapter>
......@@ -35,26 +35,6 @@ repositoryService.createDeployment()
See javadocs for more details.</para>
</section>
<section>
<title>Deploying with ant</title>
<para>To deploy a business archive with ant, first the <literal>deploy-bar</literal> task
needs to be defined. Make sure that the configuration jar is on the classpath, as well as the
Activiti jar and all its dependencies:</para>
<programlisting>&lt;taskdef name=&quot;deploy-bar&quot; classname=&quot;org.activiti.engine.impl.ant.DeployBarTask&quot;&gt;
&lt;classpath&gt;
&lt;fileset dir=&quot;...&quot;&gt;
&lt;include name=&quot;activiti-cfg.jar&quot;/&gt;
&lt;include name=&quot;your-db-driver.jar&quot;/&gt;
&lt;/fileset&gt;
&lt;fileset dir=&quot;${activiti.home}/lib&quot;&gt;
&lt;include name=&quot;activiti-engine-${activiti.version}.jar&quot;/&gt;
&lt;include name=&quot;ibatis-sqlmap-*.jar&quot;/&gt;
&lt;/fileset&gt;
&lt;/classpath&gt;
&lt;/taskdef&gt;
&lt;deploy-bar file=&quot;.../yourprocess.bar&quot; /&gt;</programlisting>
</section>
<section id="deploymentWithExplorer">
<title>Deploying with Activiti Explorer</title>
<para>
......
......@@ -572,7 +572,9 @@
the classes that will be used by the Activiti engine during runtime. In your extension you
describe the properties that can be set in Activiti Designer for each shape. From these
shapes, your refer to the runtime class that should be used by the engine. This class
should implement JavaDelegate as for any ServiceTask in Activiti.</para>
should implement <literal>JavaDelegate</literal> as for any ServiceTask in Activiti.
See <link linkend="eclipseDesignerConfiguringRuntime">this section</link> for more
details.</para>
<para>A shape's class is a simple Java class, to which a number of annotations are added.
The class should implement the <literal>CustomServiceTask</literal> interface, but you
shouldn't implement this interface yourself. Extend the
......@@ -692,15 +694,46 @@ public class AcmeMoneyTask extends AbstractCustomServiceTask {
</imageobject>
</mediaobject>
</para>
<para>The final step for your shape is to indicate the class that is instantiated by the
Activiti engine when it reaches your node when executing a process instance. To do this,
you use the <literal>@Runtime</literal> annotation. The <literal>delegationClass</literal>
attribute you return should contain the canonical name of the runtime class. Note that the
runtime class shouldn't be in your extension JAR, as it's dependent on the Activiti
libraries.</para>
<para>
<programlisting>@Runtime(delegationClass = "org.acme.runtime.AcmeMoneyJavaDelegation")</programlisting>
</para>
<section id="eclipseDesignerConfiguringRuntime">
<title>Configuring runtime execution of Custom Service Tasks</title>
<para>
With your fields setup and your extension applied to Designer, users can configure
the properties of the service task when modelling a process. In most cases, you will
want to use these user-configured properties when the process is executed by Activiti.
To do this, you must instruct Activiti which class to instantiate when the process reaches
your <literal>CustomServiceTask</literal>.
</para>
<para>
There is a special annotation for specifying the class to be executed for your <literal>CustomServiceTask</literal>,
the <literal>@Runtime</literal> annotation. Here's an example of how to use it:
</para>
<programlisting>@Runtime(delegationClass = "org.acme.runtime.AcmeMoneyJavaDelegation")</programlisting>
<para>
The <literal>delegationClass</literal>
attribute you provide should contain the canonical name of the runtime class. This is a class that implements
Activiti's <literal>JavaDelegate</literal> interface. You should implement this class in the same manner as any
other <literal>JavaDelegate</literal>. Documentation for this is provided in the <link linkend="bpmnJavaServiceTaskImplementation">userguide here</link>.
</para>
<para>
The user's property values will be injected into the <literal>delegationClass</literal> runtime class
if you provide members in the class for Activiti to inject into. The names should match the names of the members
in your <literal>CustomServiceTask</literal>. For more information, consult <link linkend="serviceTaskFieldInjection">this part</link>
of the userguide.
</para>
<para>
Note that the runtime class shouldn't be in your extension JAR, as it's dependent on the Activiti
libraries. Activiti needs to be able to find it at runtime, so it needs to be on the Activiti engine's
classpath.
</para>
</section>
</section>
<section id="eclipseDesignerPropertyTypes">
<title>Property types </title>
......
......@@ -6,19 +6,23 @@
<title>Activiti Explorer</title>
<para>
Activiti Explorer is a web application that is installed during the <link linkend="demo.setup">demo setup</link>.
Activiti Explorer is a web application that is included when you download Activiti from the
Activiti website. The purpose of Explorer is not a finished, end-user ready application, but
rather to excersise and show the functionality of Activiti. As such, Explorer is meant as a demo,
or maybe inspiration for people using Activti in there own applications. Out of the box, Explorer
uses an in-memory database, but it is easy to switch to your own database (see the applicationContext files in the WEB-INF folder).
</para>
<para>
After logging into the application, you will see three large icons that show the main capabilities.
<mediaobject><imageobject><imagedata align="center" fileref="images/explorer.tabs.png"/></imageobject></mediaobject>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Cases</emphasis>: case and task management functionality.
<emphasis role="bold">Tasks</emphasis>: Task management functionality.
Here you can see user tasks from running processes that are assigned to you, or
see group tasks which you can claim. Note that in Explorer we talk about <emphasis>cases</emphasis>
rather than <emphasis>tasks</emphasis>. As Explorer allows to relate content, divide
work into subtasks, involve people in different roles, etc ... the term <emphasis>case</emphasis>
covers better what is possible. Activiti Explorer as such can be used to create
cases that are not related to processes (i.e. standalone cases).
see group tasks which you can claim. Explorer allows to relate content, divide
work into subtasks, involve people in different roles, etc ... Explorer can also be used
to create standalone tasks that are not related to any process.
</para>
</listitem>
<listitem>
......@@ -39,47 +43,37 @@
<section>
<title>Case overview</title>
<para>
<mediaobject><imageobject><imagedata align="center" fileref="images/explorer.case.overview.png"/></imageobject></mediaobject>
</para>
</section>
<section>
<title>Cases</title>
<title>Tasks</title>
<para>
<mediaobject><imageobject><imagedata align="center" fileref="images/explorer.cases.png"/></imageobject></mediaobject>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Inbox:</emphasis> shows the cases where the logged in user is the assignee.
<emphasis role="bold">Inbox:</emphasis> shows the tasks where the logged in user is the assignee.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">My Cases:</emphasis> shows the cases where the logged in user is the owner.
When you create a standalone case, you are automatically made owner of the case.
<emphasis role="bold">My tasks:</emphasis> shows the tasks where the logged in user is the owner.
When you create a standalone task, you are automatically made owner of the task.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Queued:</emphasis> shows the different groups which you are part
of. Cases here must first be claimed before they can be completed.
of. Tasks here must first be claimed before they can be completed.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Involved:</emphasis> shows the cases where the logged in user is
<emphasis role="bold">Involved:</emphasis> shows the tasks where the logged in user is
involved with (i.e. not assignee or owner).
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Archived</emphasis> contains the past (historical) cases.
<emphasis role="bold">Archived</emphasis> contains the past (historical) tasks.
</para>
</listitem>
</itemizedlist>
......@@ -154,7 +148,7 @@
<para>
<emphasis role="bold">Users and Groups:</emphasis> manage the users and groups: create, edit and delete
users and groups. Relate users to groups such they have more privileges or they can see
cases assigned to specific groups.
tasks assigned to specific groups.
<mediaobject><imageobject><imagedata align="center" fileref="images/explorer.users.png"/></imageobject></mediaobject>
</para>
</listitem>
......
......@@ -3,8 +3,8 @@
<!ENTITY ch01 SYSTEM "chapters/ch01-Introduction.xml">
<!ENTITY ch02 SYSTEM "chapters/ch02-GettingStarted.xml">
<!ENTITY ch03 SYSTEM "chapters/ch03-Configuration.xml">
<!ENTITY ch04 SYSTEM "chapters/ch04-Spring.xml">
<!ENTITY ch05 SYSTEM "chapters/ch05-API.xml">
<!ENTITY ch04 SYSTEM "chapters/ch04-API.xml">
<!ENTITY ch05 SYSTEM "chapters/ch05-Spring.xml">
<!ENTITY ch06 SYSTEM "chapters/ch06-Deployment.xml">
<!ENTITY ch07a SYSTEM "chapters/ch07a-BPMN-Introduction.xml">
<!ENTITY ch07b SYSTEM "chapters/ch07b-BPMN-Constructs.xml">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册