Skip to content

Commit

Permalink
correct simple typos, capitalization, etc. in userguide
Browse files Browse the repository at this point in the history
  • Loading branch information
David Malkovsky authored and David Malkovsky committed Feb 2, 2015
1 parent 5365e50 commit 9e548e7
Show file tree
Hide file tree
Showing 12 changed files with 7,262 additions and 53 deletions.
12 changes: 6 additions & 6 deletions userguide/src/en/ch03-Configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ As an optional step, you can now delete the unused db.properties files in both t

Configuration of the JNDI datasource will differ depending on what servlet container application you are using. The instructions below will work for Tomcat, but for other container applications, please refer to the documentation for your container app.

If using Tomcat, the JNDI resource is configured within $CATALINA_BASE/conf/[enginename]/[hostname]/[warname].xml (for Activiti Explorer this will usually be $CATALINA_BASE/conf/Catalina/localhost/activiti-explorer.war). The default context is copied from the Activiti war file when the application is first deployed, so if it already exists, you will need to replace it. To change the JNDI resource so that the application connects to MySql instead of H2, for example, change the file to the following:
If using Tomcat, the JNDI resource is configured within $CATALINA_BASE/conf/[enginename]/[hostname]/[warname].xml (for Activiti Explorer this will usually be $CATALINA_BASE/conf/Catalina/localhost/activiti-explorer.war). The default context is copied from the Activiti war file when the application is first deployed, so if it already exists, you will need to replace it. To change the JNDI resource so that the application connects to MySQL instead of H2, for example, change the file to the following:

[source,xml,linenums]
----
Expand Down Expand Up @@ -362,7 +362,7 @@ To upgrade, you have to start with putting the following configuration property
</beans>
----

*Also, include a suitable database driver for your database to the classpath.* pgrade the Activiti libraries in your application. Or start up a new version of Activiti and point it to a database that contains an older version. With +databaseSchemaUpdate+ set to +true+, Activiti will automatically upgrade the DB schema to the newer version the first time when it notices that libraries and DB schema are out of sync.
*Also, include a suitable database driver for your database to the classpath.* Upgrade the Activiti libraries in your application. Or start up a new version of Activiti and point it to a database that contains an older version. With +databaseSchemaUpdate+ set to +true+, Activiti will automatically upgrade the DB schema to the newer version the first time when it notices that libraries and DB schema are out of sync.

*As an alternative you can also run the upgrade DDL statements.* It's also possible to run the upgrade database scripts, available on the Activiti downloads page.

Expand Down Expand Up @@ -518,7 +518,7 @@ Example when using Maven (version omitted):
=== Mapped Diagnostic Contexts


As of version 5.13, activiti supports Mapped Diagnostic Contexts feature of sl4j. These basic information are passed to the underlying logger along with what is going to be logged:
As of version 5.13, Activiti supports Mapped Diagnostic Contexts feature of sl4j. These basic information are passed to the underlying logger along with what is going to be logged:

* processDefinition Id as mdcProcessDefinitionID
* processInstance Id as mdcProcessInstanceID
Expand Down Expand Up @@ -587,7 +587,7 @@ public class MyEventListener implements ActivitiEventListener {

The +isFailOnException()+ method determines the behaviour in case the +onEvent(..)+ method throws an exception when an event is dispatched. In case +false+ is returned, the exception is ignored. When +true+ is returned, the exception is not ignored and bubbles up, effectively failing the current ongoing command. In case the event was part of an API-call (or any other transactional operation, eg. job-execution), the transaction will be rolled back. In case the behaviour in the event-listener is not business-critical, it's recommended to return +false+.

There are a few base implementations provided by activiti to facilitate common usecases of event-listeners. These can be used as base-class or as an example listener implementation:
There are a few base implementations provided by Activiti to facilitate common usecases of event-listeners. These can be used as base-class or as an example listener implementation:

* *org.activiti.engine.delegate.event.BaseEntityEventListener*: An event-listener base-class that can be used to listen for entity-related events for a specific type of entity or for all entities. It hides away the type-checking and offers 4 methods that should be overridden: +onCreate(..)+, +onUpdate(..)+ and +onDelete(..)+ when an entity is created, updated or deleted. For all other entity-related events, the ++onEntityEvent(..)++is called.

Expand Down Expand Up @@ -734,7 +734,7 @@ Supported values for the +entityType+ are: +attachment+, +comment+, +execution+,
<<experimental, [EXPERIMENTAL] >>


Another way of handling events being dispatched is to throw a BPMN event. Please bare in mind that it only makes sense to throw BPMN-events with certain kinds of activiti event types. For example, throwing a BPMN event when the process-instance is deleted will result in an error. The snippet below shows how to throw a signal inside process-instance, throw a signal to an external process (global), throw a message-event inside the process-instance and throw an error-event inside the process-instance. Instead of using the +class+ or +delegateExpression+, the attribute +throwEvent+ is used, along with an additional attribute, specific to the type of event being thrown.
Another way of handling events being dispatched is to throw a BPMN event. Please bare in mind that it only makes sense to throw BPMN-events with certain kinds of Activiti event types. For example, throwing a BPMN event when the process-instance is deleted will result in an error. The snippet below shows how to throw a signal inside process-instance, throw a signal to an external process (global), throw a message-event inside the process-instance and throw an error-event inside the process-instance. Instead of using the +class+ or +delegateExpression+, the attribute +throwEvent+ is used, along with an additional attribute, specific to the type of event being thrown.

[source,xml,linenums]
----
Expand Down Expand Up @@ -781,7 +781,7 @@ If additional logic is needed to decide whether or not to throw the BPMN-event,
* Event-listeners can only be declared on the +process+ element, as a child-element of the +extensionElements+. Listeners cannot be defined on individual activities in the process.
* Expressions used in the +delegateExpression+ do not have access to the execution-context, as other expressions (eg. in gateways) have. They can only reference beans defined in the +beans+ property of the process engine configuration or when using spring (and the beans property is absent) to any spring-bean that implements the listener interface.
* When using the +class+ attribute of a listener, there will only be a single instance of that class created. Make sure the listener implementations do not rely on member-fields or ensure safe usage from multiple threads/contexts.
* When an illegal event-type is used in the +events+ attribute or illegal +throwEvent+ value is used, an exception will be thrown when the process-definition is deployed (effectively failing the deployment). When an illegal value for +class+ or +delegateExecution+ is supplied (either unexisting class, unexisting bean referenced or delegate not implementing listener interface), an exception will be thrown when the process is started (or when the first valid event for that process-definition is dispatched to the listener). Make sure the referenced classes are on the classpath and that the expressions resolve to a valid instance.
* When an illegal event-type is used in the +events+ attribute or illegal +throwEvent+ value is used, an exception will be thrown when the process-definition is deployed (effectively failing the deployment). When an illegal value for +class+ or +delegateExecution+ is supplied (either a nonexistent class, a nonexistent bean reference or a delegate not implementing listener interface), an exception will be thrown when the process is started (or when the first valid event for that process-definition is dispatched to the listener). Make sure the referenced classes are on the classpath and that the expressions resolve to a valid instance.


[[eventDispatcherCustomEvents]]
Expand Down
2 changes: 1 addition & 1 deletion userguide/src/en/ch04-API.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ Log.info("Number of process instances: " + runtimeService.createProcessInstanceQ
----


[[api.services.tasls]]
[[api.services.tasks]]


==== Completing tasks
Expand Down
2 changes: 1 addition & 1 deletion userguide/src/en/ch05-Spring.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ public DataSource database() {
}
----

Remove H2 from the Maven dependencies and add the Mysql driver and the Tomcat connection pooling to the classpath:
Remove H2 from the Maven dependencies and add the MySQL driver and the Tomcat connection pooling to the classpath:

[source,xml,linenums]
----
Expand Down
2 changes: 1 addition & 1 deletion userguide/src/en/ch07a-BPMN-Introduction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Now we can start a new process instance using the +id+ we defined in the proces
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("financialReport");
----

This will create a process instance thatwill first go through the start event. After the start event, it follows all the outgoing sequence flows (only one in this case) and the first task ('write monthly financial report') is reached. The Activiti engine will now store a task in the persistent database. At this point, the user or group assignments attached to the task are resolved and also stored in the database. It's important to note that the Activiti engine will continue process execution steps until it reaches a _wait state_, such as the user task. At such a wait state, the current state of the process instance is stored in the database. It remains in that state until a user decides to complete their task. At that point, the engine will continue until it reaches a new wait state or the end of the process. When the engine reboots or crashes in the meantime, the state of the process is safe and well in the database.
This will create a process instance that will first go through the start event. After the start event, it follows all the outgoing sequence flows (only one in this case) and the first task ('write monthly financial report') is reached. The Activiti engine will now store a task in the persistent database. At this point, the user or group assignments attached to the task are resolved and also stored in the database. It's important to note that the Activiti engine will continue process execution steps until it reaches a _wait state_, such as the user task. At such a wait state, the current state of the process instance is stored in the database. It remains in that state until a user decides to complete their task. At that point, the engine will continue until it reaches a new wait state or the end of the process. When the engine reboots or crashes in the meantime, the state of the process is safe and well in the database.

After the task is created, the +startProcessInstanceByKey+ method will return since the user task activity is a _wait state_. In this case, the task is assigned to a group, which means that every member of the group is a *candidate* to perform the task.

Expand Down
20 changes: 10 additions & 10 deletions userguide/src/en/ch07b-BPMN-Constructs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ A message event definition is declared using the +messageEventDefinition+ elemen
===== Throwing a Message Event


As an embeddable process engine, activiti is not concerned with actually receiving a message. This would be environment dependent and entail platform-specific activities like connecting to a JMS (Java Messaging Service) Queue/Topic or processing a Webservice or REST request. The reception of messages is therefore something you have to implement as part of the application or infrastructure into which the process engine is embedded.
As an embeddable process engine, Activiti is not concerned with actually receiving a message. This would be environment dependent and entail platform-specific activities like connecting to a JMS (Java Messaging Service) Queue/Topic or processing a Webservice or REST request. The reception of messages is therefore something you have to implement as part of the application or infrastructure into which the process engine is embedded.

After you have received a message inside your application, you must decide what to do with it. If the message should trigger the start of a new process instance, choose between the following methods offered by the runtime service:

Expand Down Expand Up @@ -607,7 +607,7 @@ The XML representation of a message start event is the normal start event declar

===== Description

A <<bpmnSignalEventDefinition,signal>> start event can be used to start a process instance using a named signal. The signal can be 'fired' from within a process instance using the intermediary signal throw event or through the API (__runtimService.signalEventReceivedXXX__ methods). In both cases, all process definitions that have a signal start event with the same name will be started.
A <<bpmnSignalEventDefinition,signal>> start event can be used to start a process instance using a named signal. The signal can be 'fired' from within a process instance using the intermediary signal throw event or through the API (__runtimeService.signalEventReceivedXXX__ methods). In both cases, all process definitions that have a signal start event with the same name will be started.

Note that in both cases, it is also possible to chose between a synchronous and asynchronous starting of the process instances.

Expand Down Expand Up @@ -1858,7 +1858,7 @@ A parallel gateway is visualized as a gateway (diamond shape) with the 'plus' sy

image::images/bpmn.parallel.gateway.png[align="center"]

[[bpmnParallelGatewayyXML]]
[[bpmnParallelGatewayXML]]


===== XML representation
Expand Down Expand Up @@ -3404,7 +3404,7 @@ The process definition itself needs nothing else then the camel type definition
</camelContext>
----

For more documentation about Camel routes you can look on the link:$$http://camel.apache.org/$$[Camel website]. The basic concepts are demonstrated through a few small samples here in this document. In the first sample, we will do the simplest form of Camel call from an activiti workflow. Let's call it SimpleCamelCall.
For more documentation about Camel routes you can look on the link:$$http://camel.apache.org/$$[Camel website]. The basic concepts are demonstrated through a few small samples here in this document. In the first sample, we will do the simplest form of Camel call from an Activiti workflow. Let's call it SimpleCamelCall.

If you want to define multiple Camel context beans and/or want to use a different bean name, this can be overridden on the Camel task definition like this:

Expand Down Expand Up @@ -3557,17 +3557,17 @@ the following table provides an overview of three available camel behaviours:
|Behaviour|In Url|Description
|CamelBehaviorDefaultImpl|copyVariablesToProperties|Copy Activiti variables as Camel properties
|CamelBehaviorCamelBodyImpl|copyCamelBodyToBody|Copy only Activiti variable named "camelBody" as camel message body
|CamelBehaviorBodyAsMapImpl|copyVariablesToBodyAsMap|Copy all the activiti variables in a map as Camel message body
|CamelBehaviorBodyAsMapImpl|copyVariablesToBodyAsMap|Copy all the Activiti variables in a map as Camel message body

|===============


The above table explains how activiti variables are going to be transfered to Camel. The following table explains how the Camel variables are returned back to Activiti. This can only be configured in route URLs.
The above table explains how Activiti variables are going to be transferred to Camel. The following table explains how the Camel variables are returned back to Activiti. This can only be configured in route URLs.

[options="header"]
|===============
|Url|Description
|Default|If Camel body is a map, copy each element as Activiti variable, otherwise copy the whole Camel body as "camelBody" activiti variable
|Default|If Camel body is a map, copy each element as Activiti variable, otherwise copy the whole Camel body as "camelBody" Activiti variable
|copyVariablesFromProperties|Copy Camel properties as Activiti variables of the same name
|copyCamelBodyToBodyAsString|like default, but if camel Body is not a map, first convert it to String and then copy it in "camelBody"
|copyVariablesFromHeader|Additionally copy camel headers to Activiti variables of the same names
Expand All @@ -3580,7 +3580,7 @@ The above table explains how activiti variables are going to be transfered to Ca

===== Asynchronous Ping Pong example

Previous examples were all synchronous. The workflow stops, until the camel route is concluded and returned. In some cases, we might need the activiti workflow to continue. For such purposes the asynchronous capability of the Camel service task is useful. You can make use of this feature by setting the async property of the Camel service task to true.
Previous examples were all synchronous. The workflow stops, until the camel route is concluded and returned. In some cases, we might need the Activiti workflow to continue. For such purposes the asynchronous capability of the Camel service task is useful. You can make use of this feature by setting the async property of the Camel service task to true.

[source,xml,linenums]
----
Expand All @@ -3595,7 +3595,7 @@ By setting this feature the specified Camel route is activated asynchronously by
<receiveTask id="receiveAsyncPing" name="Wait State" />
----

The process instance will wait until a signal is received, for example from Camel. In Camel you can send a signal to the process instance by sending a message to the proper activiti endpoint.
The process instance will wait until a signal is received, for example from Camel. In Camel you can send a signal to the process instance by sending a message to the proper Activiti endpoint.

[source,java,linenums]
----
Expand Down Expand Up @@ -4063,7 +4063,7 @@ These values can be retrieved by calling the +execution.getVariable(x)+ method.

Additionally, each of the created executions will have an execution-local variable (i.e. not visible for the other executions, and not stored on process instance level) :

* *loopCounter*: indicates the _index in the for-each loop_ of that particular instance. loopCounter variable can be renamed by activiti *elementIndexVariable* attribute.
* *loopCounter*: indicates the _index in the for-each loop_ of that particular instance. loopCounter variable can be renamed by Activiti *elementIndexVariable* attribute.


[[bpmnMultiInstanceGraphicalNotation]]
Expand Down
2 changes: 1 addition & 1 deletion userguide/src/en/ch12-Explorer.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

== Activiti Explorer

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 excercise and show the functionality of Activiti. As such, Explorer is meant as a demo, or maybe inspiration for people using Activiti 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).
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 exercise and show the functionality of Activiti. As such, Explorer is meant as a demo, or maybe inspiration for people using Activiti 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).

After logging into the application, you will see three large icons that show the main capabilities.

Expand Down
Loading

0 comments on commit 9e548e7

Please sign in to comment.