Why does activiti Implement Task timeout and the job creation is not executed?

Source: Internet
Author: User

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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.