cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti workflow persistence after restarting server

pm_usa1234
Champ in-the-making
Champ in-the-making
I have a question regarding why activiti is not persisting the already started workflow which is waiting on a user task after I restart my tomcat server?

I am using a workflow in which I have a user tasks which is assigned to a group. I am successfully able to connect to our ldap server which recognizes all the users and groups(Thanks to this forums). I am also able to start the bpmn workflow with message start event. One of the task in the flow is a user task with 4 mandatory form fields. After starting the flow, as user task is assigned to a group which I can see in Queued also. After assigning the task to myself,  if I restart the server, user task is no longer waiting and it completes the workflow. As fields are mandatory it throws an exception but still workflow is completed. SO I will not see a task in "My Task" after my server is started. I am using my own oracle db schema. 

Can someone help me with what am I missing? How can I make sure that the workflow which is waiting for user input always waits after restarting the tomcat server?

Thanks in advance,
P M
6 REPLIES 6

pm_usa1234
Champ in-the-making
Champ in-the-making
n

frederikherema1
Star Contributor
Star Contributor
Tasks don't complete themselves after a restart (they never get auto-completed). Is it possible that you DB is drop pen and recreated after a reboot? Or do you you actually see the completed process after restarting (check ACT_HI_PROCINST tables or use HistoryService query API)?

pm_usa1234
Champ in-the-making
Champ in-the-making
Thanks frederikheremans for information. I checked the data and as such I don't see any difference in the entires when workflow is completed(start to end) when server is running or when server is restarted between starting a workflow to ending.

In below example workflow which was started and completed when server was running was Id_=1375. The other workflow is Id_=1413 was started when server was running but then I restarted the server and immediately it completed the workflow.

I don't know whether it is relevant or not but I started with the fresh database schema. When I started the server for the first time, table ACT_HI_PROCINST had 73 rows. After completing the first workflow and starting another workflow it became 75(with ids 1375 and 1413 with end time as null for 1413). After I restarted the server, it added many more rows and now I see 146 rows with completed workflow for 1413(regardless of waiting at user task). Is this an expected behaviors or some where by default it adds some test data? I hope this is not causing the issue I am seeing.

ID_ PROC_INST_ID_ BUSINESS_KEY_ PROC_DEF_ID_ START_TIME_ END_TIME_ DURATION_ START_USER_ID_ START_ACT_ID_ END_ACT_ID_
1375  1375  criteriaCloneFirstCut:1:1373 12-JUN-13 02.13.40.017000000 PM 12-JUN-13 02.15.48.218000000 PM 128201  cloneMessageStartEvent endevent1
1413        1413  criteriaCloneFirstCut:1:1373 12-JUN-13 02.18.22.981000000 PM 12-JUN-13 02.25.43.785000000 PM 440804  cloneMessageStartEvent endevent1

Currently in activiti-standalone-context.xml has following bean properties for demoDataGenerator. I have made createDemoUsersAndGroups as false as I am using ldap.
    <property name="createDemoUsersAndGroups" value="false" />
    <property name="createDemoProcessDefinitions" value="true" />
    <property name="createDemoModels" value="true" />
    <property name="generateReportData" value="true" />

jbarrez
Star Contributor
Star Contributor
The demo data generator does add new stuff. That is why it is a demo data generator.
Could you set all properties to false and see if the problem still persists?

prasobhraj
Star Contributor
Star Contributor
Hi,
I downloaded and installed the latest version. Am facing some issues. user tasks automatically assigning while restarting the server.
am using mysql database. whenever the server restarted some new tasks automatically assigned. but its in a unknown language. some examples like
1.Ut non proident nostrud esse commodo
2. in dolor in aliquip veniam nostrud etc
i already did that demo properties to "false". Kindly help me on this

frederikherema1
Star Contributor
Star Contributor
It's generating world-famous latin example text (google for lorum ipsum)… The main point is that the explorer (as you download it) is intended to use as demo-software to see the capabilities of the engine and expose a lot of the API's. If you want to use it for real, you should alter the configuration/spring-context anyway. So just remove the demo-data generator bean as a whole…