I recently started activiti and found that a scheduled job is created when a scheduled task is used.
The situation is as follows:
First, configure the timer to wear a scheduled task and set the timeout time to 60 seconds.
<Boundaryevent id = "Courier" name = "timer" attachedtoref = "Task 1" cancelactivity = "true"> <timereventdefinition> <timeduration> pt60s </timeduration> </timereventdefinition> </boundaryevent>
When the process is executed to this task node, a job data is generated in the database. The value of the field duedate _ is after the current time 60 s.
However, after 60 seconds, the job is not executed as expected.
After reading the document, we found that activiti's job manager is disabled by default. You need to set <propertyname = "jobexecut1_tivate" value = "false"/> In processenginconfiguration to activate activiti.
After the configuration, retry the above steps and the job is not executed.
Continue to check the document and find that the activiti engine configuration should be managed by spring when activiti is integrated with spring.
Re-configure the bean and processenginconfiguration in activiti. cfg. xml.
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration"> <property name="dataSource" ref="dataSource" /> <property name="databaseSchemaUpdate" value="true" /> <property name="jobExecutorActivate" value="true" /> </bean> <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean"> <property name="processEngineConfiguration" ref="processEngineConfiguration" /> </bean>
Restart the Web Container and run the job successfully. The task is claimed.
Why does activiti Implement Task timeout and the job creation is not executed?