cancel
Showing results for 
Search instead for 
Did you mean: 

Very Simple Process with Timer Start Event throws Exception

ct1
Champ in-the-making
Champ in-the-making
I am seeing the OptimisticLockingException that plagues my use of timers and boundary events.

While trying to use a timer start event, I am getting the OptimisticLockingException.

With this very simple process, I am just trying to start the process at a specified time and log via a script task that it started.  I had no other Process Engines running (although .war files that contain applications that create Process Engines were on the classpath).  I have read and reread the User's Guide and the Activiti In Action sections describing the timers, but still am unable to make even a simple one to work without throwing an exception.

I am running Activiti 5.9, Microsoft SQL Server 2008 R2, jtds-1.2.5, Apache Tomcat 7.0.27 on Windows 7

Would you please have time to point out what I am doing incorrectly?  I am having similar problems using boundary timer events, but I think that if I can get this simple process to work, I might be able to get the boundary timer events to work also.

Here is the BPMN file:


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="timeStartProc01" name="Timer Start Proc 01">
    <startEvent id="timerProc01Start" name="Timer Proc01 Start ">
[b]      <timerEventDefinition>
        <timeDate>2012-06-28T12:01:00</timeDate>
      </timerEventDefinition>[/b]
    </startEvent>
    <scriptTask id="scripttask1" name="Script Task" scriptFormat="groovy">
      <script><![CDATA[Date timerStarted = new Date();
String timerStartedStr = timerStarted.format('yyyy/MM/dd HH:mm:ss SSS');
print "Timer-Start-Proc 01 logged at $timerStartedStr \n";]]></script>
    </scriptTask>
    <endEvent id="timerStartProc01End" name="tTmer Start Proc01 End"></endEvent>
    <sequenceFlow id="flow1" name="" sourceRef="timerProc01Start" targetRef="scripttask1"></sequenceFlow>
    <sequenceFlow id="flow2" name="" sourceRef="scripttask1" targetRef="timerStartProc01End"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_timeStartProc01">
    <bpmndi:BPMNPlane bpmnElement="timeStartProc01" id="BPMNPlane_timeStartProc01">
      <bpmndi:BPMNShape bpmnElement="timerProc01Start" id="BPMNShape_timerProc01Start">
        <omgdc:Bounds height="35" width="35" x="110" y="230"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="scripttask1" id="BPMNShape_scripttask1">
        <omgdc:Bounds height="55" width="105" x="220" y="220"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="timerStartProc01End" id="BPMNShape_timerStartProc01End">
        <omgdc:Bounds height="35" width="35" x="390" y="230"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="145" y="247"></omgdi:waypoint>
        <omgdi:waypoint x="220" y="247"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="325" y="247"></omgdi:waypoint>
        <omgdi:waypoint x="390" y="247"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>


And, this is the activiti.cfg.xml


<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       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.xsd">

  <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
 
    <!– Database configurations –>
    <property name="databaseSchemaUpdate" value="true" />
   
   <property name="databaseType" value="mssql" />
   
    <property name="jdbcUrl" value="jdbc:jtds:sqlserver://lusr1315:1433/Activiti_DB" />
    <property name="jdbcDriver" value="net.sourceforge.jtds.jdbc.Driver" />
    <property name="jdbcUsername" value="xxxxxxxxxxx" />
    <property name="jdbcPassword" value="yyyyyyyyyyyy" />
   
    <property name="jobExecutorActivate" value="true" />
   
   <property name="mailServerHost" value="localhost" />
   <property name="mailServerPort" value="25" />

  </bean>

</beans>

And this is the exception I get at the time the timer start event should begin:


Jun 28, 2012 12:01:00 PM org.activiti.engine.impl.interceptor.CommandContext close
SEVERE: Error while closing command context
org.activiti.engine.ActivitiOptimisticLockingException: TimerEntity[959818] was updated by another t
ransaction concurrently
        at org.activiti.engine.impl.db.DbSqlSession.flushUpdates(DbSqlSession.java:452)
        at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:348)
        at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:149
)
        at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:105)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInte
rceptor.java:49)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
        at org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable.run(AcquireJobsRunnable.java:57)

        at java.lang.Thread.run(Thread.java:662)

Thank you.
10 REPLIES 10

frederikherema1
Star Contributor
Star Contributor
Hi, seems like there are 2 job-executors running:


at org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable.run(AcquireJobsRunnable.java:57)

Make sure there are not more activiti.cfg.xml-files on your class path if you are using the ProcessEngines.getDefaultProcessEngine() approach (explorer does this by default). Alternatively, you can try to specify the correct file to load instead of just using ProcessEngines.getDefaultProcessEngine…

ct1
Champ in-the-making
Champ in-the-making
Thank you for reviewing my post. 

Here is a little more information.

I looked in the Activiti Rest classpath for activiti.cfg.xml files and found only one.
(It was in the …webapps\activiti-rest\WEB-INF\classes directory.)  Do you think
there could be one hidden in one of the .jar files?

I used Activiti Explorer to deploy the BPMN20.xml file below.  Then signed out of Explorer.

I stopped Tomcat and restarted the entire workstation.  This should have stopped any
Process Engines that were running.

Then I started the instance of Tomcat that has the activiti-rest.war file in its webapp directory.
Looking at the Log File below, it looks like two Job Executors were started.  Does it look like that to you?
Do you still think this indicates the presence of multiple activiti.cfg.xml files?

When the timer start event was supposed to start, the exception was thrown, as before.  The next task
in the process did run, even though the exception was thrown. 

I do have a general question, in addition to the specific ones above.  If the existance of multiple
ProcessEngines causes a Timer Start Event to throw this exception, would the exception also
be thrown when I have another application that completes tasks in another BPMN process while
this Timer Start Event is waiting to start?  


Log file when starting Tomcat:
    Jun 29, 2012 8:57:41 AM org.activiti.engine.ProcessEngines initProcessEnginFromResource
    INFO: initializing process engine for resource file:/C:/Workflow/Tomcat/apache-tomcat-7.0.27/webapps
    /activiti-rest/WEB-INF/classes/activiti.cfg.xml 
                     <<<<<<<————————————activiti.cfg.xml
    Jun 29, 2012 8:57:41 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefini
    tions
    INFO: Loading XML bean definitions from resource loaded through InputStream
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: Defaulting to no-operation (NOP) logger implementation
    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
    Jun 29, 2012 8:57:43 AM org.activiti.engine.impl.ProcessEngineImpl <init>
    INFO: ProcessEngine default created                                         <<<<<<<<<<<<<<<<<<<<<<<<< ——— One ProcessEngine created???
    Jun 29, 2012 8:57:43 AM org.activiti.engine.impl.jobexecutor.JobExecutor start
    INFO: Starting up the JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor].
    Jun 29, 2012 8:57:43 AM org.activiti.engine.ProcessEngines initProcessEnginFromResource
    INFO: initialised process engine default
    Jun 29, 2012 8:57:43 AM org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable run

    INFO: JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor] starting to acquire jobs
    Jun 29, 2012 8:57:43 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefini
    tions
    INFO: Loading XML bean definitions from URL [file:/C:/Workflow/Tomcat/apache-tomcat-7.0.27/webapps/a
    ctiviti-rest/WEB-INF/classes/activiti-context.xml]

    Jun 29, 2012 8:57:43 AM org.springframework.context.support.AbstractApplicationContext prepareRefres
    h
    INFO: Refreshing org.springframework.context.support.GenericXmlApplicationContext@104b1bcd: startup
    date [Fri Jun 29 08:57:43 CDT 2012]; root of context hierarchy
    Jun 29, 2012 8:57:43 AM org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
    INFO: Loading properties file from class path resource [db.properties]
    Jun 29, 2012 8:57:43 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInst
    antiateSingletons
    INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanF
    actory@610d3d99: defining beans [dbProperties,dataSource,transactionManager,processEngineConfigurati
    on,processEngine]; root of factory hierarchy
    Jun 29, 2012 8:57:43 AM org.activiti.engine.impl.ProcessEngineImpl <init>
    INFO: ProcessEngine default created                      <<<<<<<<<<<<<<<<<<<<<<<<< ————- Second ProcessEngine created??????
    Jun 29, 2012 8:57:43 AM org.activiti.engine.impl.jobexecutor.JobExecutor start
    INFO: Starting up the JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor].
    Jun 29, 2012 8:57:43 AM org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable run

    INFO: JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor] starting to acquire jobs
    Jun 29, 2012 8:57:43 AM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps\docs
    Jun 29, 2012 8:57:43 AM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps\examples
    Jun 29, 2012 8:57:43 AM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps\host-manag
    er
    Jun 29, 2012 8:57:43 AM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps\images
    Jun 29, 2012 8:57:43 AM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps\manager
    Jun 29, 2012 8:57:44 AM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps\ROOT
    Jun 29, 2012 8:57:44 AM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["http-apr-8080"]
    Jun 29, 2012 8:57:44 AM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["ajp-apr-8009"]
    Jun 29, 2012 8:57:44 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 30076 ms
    Jun 29, 2012 9:05:00 AM org.activiti.engine.impl.interceptor.CommandContext close  <<< —— Time the Timer Start Event was scheduled to start.
    SEVERE: Error while closing command context
    org.activiti.engine.ActivitiOptimisticLockingException: TimerEntity[960624] was updated by another t
    ransaction concurrently
            at org.activiti.engine.impl.db.DbSqlSession.flushUpdates(DbSqlSession.java:452)
            at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:348)
            at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:149
    )
            at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:105)
            at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInte
    rceptor.java:49)
            at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInter
    ceptor.java:42)
            at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.j
    ava:130)
            at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.jav
    a:40)
            at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
            at org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable.run(AcquireJobsRunnable.java:57)

            at java.lang.Thread.run(Thread.java:662)
The bpmn20.xml file:

    <?xml version="1.0" encoding="UTF-8"?>
    <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
      <process id="timeStartProc01" name="Timer Start Proc 01">
        <startEvent id="timerProc01Start" name="Timer Proc01 Start ">
          <timerEventDefinition>
            <timeDate>2012-06-29T09:05:00</timeDate>
          </timerEventDefinition>
        </startEvent>
        <scriptTask id="scripttask1" name="Script Task" scriptFormat="groovy">
          <script><![CDATA[Date timerStarted = new Date();
    String timerStartedStr = timerStarted.format('yyyy/MM/dd HH:mm:ss SSS');
    print "Timer-Start-Proc 01 logged at $timerStartedStr \n";]]></script>
        </scriptTask>
        <endEvent id="timerStartProc01End" name="tTmer Start Proc01 End"></endEvent>
        <sequenceFlow id="flow1" name="" sourceRef="timerProc01Start" targetRef="scripttask1"></sequenceFlow>
        <sequenceFlow id="flow2" name="" sourceRef="scripttask1" targetRef="timerStartProc01End"></sequenceFlow>
      </process>
      <bpmndi:BPMNDiagram id="BPMNDiagram_timeStartProc01">
        <bpmndi:BPMNPlane bpmnElement="timeStartProc01" id="BPMNPlane_timeStartProc01">
          <bpmndi:BPMNShape bpmnElement="timerProc01Start" id="BPMNShape_timerProc01Start">
            <omgdc:Bounds height="35" width="35" x="110" y="230"></omgdc:Bounds>
          </bpmndi:BPMNShape>
          <bpmndi:BPMNShape bpmnElement="scripttask1" id="BPMNShape_scripttask1">
            <omgdc:Bounds height="55" width="105" x="220" y="220"></omgdc:Bounds>
          </bpmndi:BPMNShape>
          <bpmndi:BPMNShape bpmnElement="timerStartProc01End" id="BPMNShape_timerStartProc01End">
            <omgdc:Bounds height="35" width="35" x="390" y="230"></omgdc:Bounds>
          </bpmndi:BPMNShape>
          <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
            <omgdi:waypoint x="145" y="247"></omgdi:waypoint>
            <omgdi:waypoint x="220" y="247"></omgdi:waypoint>
          </bpmndi:BPMNEdge>
          <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
            <omgdi:waypoint x="325" y="247"></omgdi:waypoint>
            <omgdi:waypoint x="390" y="247"></omgdi:waypoint>
          </bpmndi:BPMNEdge>
        </bpmndi:BPMNPlane>
      </bpmndi:BPMNDiagram>
    </definitions>

Contents of the webapps directory.  Several of the Projects contain activiti.cfg.xml files, but
activiti-rest would not be looking in any of them for a cfg file, would it?
    Volume in drive C has no label.
    Volume Serial Number is 9A61-2705

    Directory of C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps

    06/29/2012  10:13 AM    <DIR>          .
    06/29/2012  10:13 AM    <DIR>          ..
    05/22/2012  02:31 PM    <DIR>          activiti-explorer
    05/22/2012  02:34 PM    <DIR>          activiti-rest
    05/04/2012  10:04 AM    <DIR>          docs
    05/04/2012  10:04 AM    <DIR>          examples
    06/29/2012  10:13 AM                 0 file1.txt
    05/04/2012  10:04 AM    <DIR>          host-manager
    05/23/2012  09:39 AM    <DIR>          images
    05/04/2012  10:04 AM    <DIR>          manager
    06/28/2012  04:46 PM    <DIR>          orbeon-PE
    06/28/2012  04:37 PM        62,017,859 orbeon-PE.war
    05/23/2012  04:12 PM    <DIR>          ResumeScreenTriggerProj
    05/23/2012  04:12 PM        17,234,411 ResumeScreenTriggerProj.war
    05/04/2012  10:04 AM    <DIR>          ROOT
    05/23/2012  01:17 PM    <DIR>          WF-MgmtConsole
    05/23/2012  09:05 AM        24,388,569 WF-MgmtConsole.war
    06/27/2012  04:19 PM    <DIR>          WF-Proj2-REST
    06/27/2012  04:19 PM        24,324,051 WF-Proj2-REST.war
                   5 File(s)    127,964,890 bytes
                  14 Dir(s)  434,870,206,464 bytes free
For information, here are the contents of the directory containing the activiti.cfg.xml file:
    Volume in drive C has no label.
    Volume Serial Number is 9A61-2705

    Directory of C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps\activiti-rest\WEB-INF\classes

    06/29/2012  10:02 AM    <DIR>          .
    06/29/2012  10:02 AM    <DIR>          ..
    06/13/2012  03:01 PM             2,050 activiti-context.xml
    06/28/2012  11:09 AM             1,031 activiti.cfg.xml
    05/22/2012  02:34 PM               343 db.properties
    06/29/2012  10:02 AM                 0 file1.txt
    05/22/2012  02:34 PM               159 logging.properties
    05/22/2012  02:34 PM    <DIR>          org
    05/22/2012  02:34 PM             2,052 orig-activiti-context.xml-orig
    05/04/2012  11:23 AM               876 orig-activiti.cfg.xml-orig
    05/22/2012  02:34 PM               105 orig-db.properties-orig
    06/13/2012  04:45 PM               979 Ver2-activiti.cfg.xml-Ver2
                   9 File(s)          7,595 bytes
                   3 Dir(s)  434,867,191,808 bytes free
Thank you.

frederikherema1
Star Contributor
Star Contributor
Activiti-explorer uses a separate "java" engine than the REST-webapp… If you point the two configs to the same database, they'll play nicely together.

ct1
Champ in-the-making
Champ in-the-making
Thank you. 

That is good news.  So it is alright to have multiple ProcessEngines pointing to the same database.

However, it does not seem to speak to my situation.  I have both REST and Explorer configured to point to the same database, and both deployed in the same instance of Tomcat.

I am only starting the instance of Tomcat that has the activiti-explorer.war and the activiti-rest.war in its webapp directory.  I do not attempt to use either Activiti Explorer or the REST interface in any application.  The only action anticipated is that the timer start event defined as the first task in a process will start at the specified time and the process will continue until it hits a wait state, in this case, the end event.  Instead of running cleanly, the timer start event seems to cause an exception.

Should this happen?  If not, what should I do to prevent it?

Thank you again.

frederikherema1
Star Contributor
Star Contributor
Since 2 engine's are running, 2 job-executors are active by default. One of them a quires the job together with the second one. The first one will execute the job successfully. The second one, unaware of the job being acquired already (transactions overlap) will execute also and get an exception. This is intended to work this way. The second "execute" is rolled back. So you timer fires correctly and the second job-executor execution is a no-op (due to the rollback).

This is fine when you system integrates with the activiti transactions (or the other way around). The only downside is that you get these exceptions? To overcome this, you can disable the job-executor in one of the engines. This way, only one engine (eg. webapp-rest) is responsible for all timer and async-related operations.

ct1
Champ in-the-making
Champ in-the-making
Thank you.

Your response really made this much clearer.  So, I should put

    <property name="jobExecutorActivate" value="false" />

in the activiti.cfg.xml file in the …/webapps/activiti-explorer/WEB-INF/classes directory?

The, all processes with a timer start event or a timer boundary event will be handled by the Job
Executor defined in the activiti.cfg.xml file in the …activiti-rest/WEB-INF/classes directory.  Right?

Thank you.

frederikherema1
Star Contributor
Star Contributor
spot on!

ct1
Champ in-the-making
Champ in-the-making
I am trying your solution. 

I turned off the jobExecutorActivate (set to "false") in the …\webapps\activiti-explorer\WEB-INF\classes\activiti.cfg.xml file, stopped Tomcat, started Tomcat, used Explorer to redeploy the BPMN20.xml file containing the timer start event.  I then logged off Explorer and waited for the timer start event to execute.  The exception was thrown again.

I have several applications deployed on that instance of Tomcat that use ProcessEngines.  I will next remove each of their war files from the webapps directory and delete the application directories that Tomcat created from each of them.  Then I will try the timer start event again.

Related to the reply you gave above, do I need to be concerned that the …\webapps\activiti-rest\WEB-INF\classes\activiti-context.xml file has the property
'<property name="jobExecutorActivate" value="true" />'
in the bean id processEngineConfiguration?  Will that create another JobExecutor?  I was under the impression that when I use the activiti.cfg.xml to configure Activiti, that the activiti-context.xml would not be used, but I know I could be mistaken.  Do I also need to set that to "false" also?

Thank you.

ct1
Champ in-the-making
Champ in-the-making
Thank you for all your help getting to this point.

I am attempting to implement your suggestion by removing all applications, except activiti-rest, that might create a Job Executor from the Tomcat instance running activiti-rest.

I deployed the BPMN20 process that contains the timer start event using Activiti Explorer.  Then I stopped Tomcat, removed the activiti-explorer directory from the …/webapps directory and then restarted Tomcat.  I got the log shown below which seems to show two Process Engines created but only on JobExecutor started.  The directory listing of the …/webapps directory is below, showing activiti-rest to be the only Activiti application deployed.

This is the log file when I restarted Tomcat:
    Jul 6, 2012 3:39:15 PM org.apache.catalina.core.AprLifecycleListener init
    INFO: Loaded APR based Apache Tomcat Native library 1.1.23.
    Jul 6, 2012 3:39:15 PM org.apache.catalina.core.AprLifecycleListener init
    INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
    Jul 6, 2012 3:39:15 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["http-apr-8080"]
    Jul 6, 2012 3:39:15 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
    Jul 6, 2012 3:39:15 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 609 ms
    Jul 6, 2012 3:39:15 PM org.apache.catalina.core.StandardService startInternal
    INFO: Starting service Catalina
    Jul 6, 2012 3:39:15 PM org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.27
    Jul 6, 2012 3:39:15 PM org.apache.catalina.startup.HostConfig deployWAR
    INFO: Deploying web application archive C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps\orbeon.war
    Starting Orbeon Forms 3.9.1.201202031753 PE
    Initializing Resource Manager with: {oxf.resources.priority.1.oxf.resources.webapp.rootdir=/WEB-INF/
    resources, oxf.resources.factory=org.orbeon.oxf.resources.PriorityResourceManagerFactory, oxf.resour
    ces.priority.2=org.orbeon.oxf.resources.ClassLoaderResourceManagerFactory, oxf.resources.priority.1=
    org.orbeon.oxf.resources.WebAppResourceManagerFactory, org.orbeon.oxf.resources.WebAppResourceManage
    rImplServletContext=org.apache.catalina.core.ApplicationContextFacade@2719f1f}
    This installation of Orbeon Forms 3.9.1.201202031753 PE is licensed to: Charles Thomas / Argo Data R
    esource Corporation / Charles.Thomas@argodata.com and expires on Jul 28, 2012
    Jul 6, 2012 3:39:17 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps\activiti-r
    est
    Jul 6, 2012 3:39:17 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
    INFO: validateJarFile(C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps\activiti-rest\WEB-INF\lib\gero
    nimo-servlet_3.0_spec-1.0.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending clas
    s: javax/servlet/Servlet.class
    Jul 6, 2012 3:39:17 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
    INFO: validateJarFile(C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps\activiti-rest\WEB-INF\lib\serv
    let-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servl
    et/Servlet.class
    Jul 6, 2012 3:39:17 PM org.activiti.engine.ProcessEngines initProcessEnginFromResource
    INFO: initializing process engine for resource file:/C:/Workflow/Tomcat/apache-tomcat-7.0.27/webapps
    /activiti-rest/WEB-INF/classes/activiti.cfg.xml

    Jul 6, 2012 3:39:17 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinit
    ions
    INFO: Loading XML bean definitions from resource loaded through InputStream
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: Defaulting to no-operation (NOP) logger implementation
    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
    Jul 6, 2012 3:39:18 PM org.activiti.engine.impl.ProcessEngineImpl <init>
    INFO: ProcessEngine default created                     <<<<<<<<—————-First Process Engine Starts
    Jul 6, 2012 3:39:18 PM org.activiti.engine.impl.jobexecutor.JobExecutor start
    INFO: Starting up the JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor]. <<<— Job Executor Starts
    Jul 6, 2012 3:39:18 PM org.activiti.engine.ProcessEngines initProcessEnginFromResource
    INFO: initialised process engine default
    Jul 6, 2012 3:39:18 PM org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable run
    INFO: JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor] starting to acquire jobs
    Jul 6, 2012 3:39:18 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinit
    ions
    INFO: Loading XML bean definitions from URL [file:/C:/Workflow/Tomcat/apache-tomcat-7.0.27/webapps/a
    ctiviti-rest/WEB-INF/classes/activiti-context.xml]
    Jul 6, 2012 3:39:18 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh

    INFO: Refreshing org.springframework.context.support.GenericXmlApplicationContext@2e2e1b6c: startup
    date [Fri Jul 06 15:39:18 CDT 2012]; root of context hierarchy
    Jul 6, 2012 3:39:18 PM org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
    INFO: Loading properties file from class path resource [db.properties]
    Jul 6, 2012 3:39:18 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInsta
    ntiateSingletons
    INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanF
    actory@7c30cd64: defining beans [dbProperties,dataSource,transactionManager,processEngineConfigurati
    on,processEngine]; root of factory hierarchy
    Jul 6, 2012 3:39:19 PM org.activiti.engine.impl.ProcessEngineImpl <init>  <<<<<<<—– Second Process Engine Starts
    INFO: ProcessEngine default created                                           <<<<<<< —- No Second Job Executor started
    Jul 6, 2012 3:39:19 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps\docs
    Jul 6, 2012 3:39:19 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps\examples
    Jul 6, 2012 3:39:19 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps\host-manag
    er
    Jul 6, 2012 3:39:19 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps\images
    Jul 6, 2012 3:39:19 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps\manager
    Jul 6, 2012 3:39:19 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps\ROOT
    Jul 6, 2012 3:39:19 PM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["http-apr-8080"]
    Jul 6, 2012 3:39:19 PM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["ajp-apr-8009"]
    Jul 6, 2012 3:39:19 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 3785 ms

…/webapps directory:
    C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps>dir
    Volume in drive C has no label.
    Volume Serial Number is 9A61-2705

    Directory of C:\Workflow\Tomcat\apache-tomcat-7.0.27\webapps

    07/06/2012  03:38 PM    <DIR>          .
    07/06/2012  03:38 PM    <DIR>          ..
    05/22/2012  02:34 PM    <DIR>          activiti-rest    <<<<<<<<<<—- Only app with a JobExecutor
    05/04/2012  10:04 AM    <DIR>          docs
    05/04/2012  10:04 AM    <DIR>          examples
    05/04/2012  10:04 AM    <DIR>          host-manager
    05/23/2012  09:39 AM    <DIR>          images
    05/04/2012  10:04 AM    <DIR>          manager
    06/29/2012  11:11 AM    <DIR>          orbeon
    02/03/2012  09:59 AM        52,832,737 orbeon.war
    05/04/2012  10:04 AM    <DIR>          ROOT
                   1 File(s)     52,832,737 bytes
                  10 Dir(s)  439,027,814,400 bytes free
At the time the timer start event was configured to start, this was logged:

    Jul 6, 2012 4:00:00 PM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
    INFO: Processing resource Timer-Start-Proc01.timeStartProc01.png
    Jul 6, 2012 4:00:00 PM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
    INFO: Processing resource Timer-Start-Proc01.bpmn20.xml
    Jul 6, 2012 4:00:00 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
    INFO: XMLSchema currently not supported as typeLanguage
    Jul 6, 2012 4:00:00 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
    INFO: XPath currently not supported as expressionLanguage
    Timer-Start-Proc 01 logged at 2012/07/06 16:00:00 848
The timer start event ran as scheduled and did not throw an exception.

Now, my question is, is this a reasonable configuration (one instance of the activiti.cfg.xml file with the "JobExecutorActivate=true") considering that we may need instances of Tomcat running activiti-rest on multiple servers accessing the same database?  If we run like that and the server that created the JobExecutor goes down, won't we then miss executing all the timer events scheduled for the time the JobExecutor is down?

Thank you again for helping.