cancel
Showing results for 
Search instead for 
Did you mean: 

error in share-completed tasks

icm76
Champ in-the-making
Champ in-the-making
hi,

i've been playing with Alfresco by deploying custom models and workflows. I get an error when I click More->My Tasks->Completed (other menus work just fine, including Workflows i've started ->completed).

In logs I get the error:
Failed to retrieve tasks assigned to authority {0} in state {1}.
….
Caused by: org.alfresco.service.cmr.workflow.WorkflowException: 04070413 Failed to retrieve tasks assigned to authority {0} in state {1}.
….
Caused by: org.activiti.engine.ActivitiException: no deployed process definition found with id 'RegConducereReg:1:14208'

Please note that I use the workflow console where I issue the following commands:
- delete all workflows i meanit
(- undeploy….RegConducereReg
- deploy…RegConducereReg
)
so there are no active workflows and the definition is active

How can I delete this process definition with that id?

Thank you,
catalin
4 REPLIES 4

jzknitly
Champ in-the-making
Champ in-the-making
I have exactly the same problem with the same version, did you find any solution?

frederikhereman
Champ in-the-making
Champ in-the-making
Seems like the historic task instances, associated with the workflows are not cascade-deleted when the workflow definition is deleted. It's generally a bad idea to delete a workflow-definition, just deploying a new version with the same 'key' is sufficient (the id-attribute in the bpmn20.xml file). User won't be able to start a workflow in the old version anyway, only the new version…

But even though it's not "recommended" to delete them, it should be possible and shouldn't cause any issues. By default, activiti doesn't cascade history (no explicit foreign-keys are put between history and runtime for performance and tracing reasons, so it's perfectly fine to have orphaned historic task instances in default Activiti). Can you report a bug in the JIRA for this? We need to fix this in alfresco, when a worklfow-definition is deleted, since the runtime is used to display history tasks.

For now, as a workaround, you can try to remove the "offending" tasks in your database to have the "completed task" work again (Disclaimer: double check any delete-statement you execute, this is a workaround):

delete from ACT_HI_TASKINST where not exists (select pd.ID_ from ACT_RE_PROCDEF pd where pd.ID_ = PROC_DEF_ID_);

Your workaround worked.

Thank you for sharing it

сougar
Champ in-the-making
Champ in-the-making
Hi.
I caught this problem too.(4.2.f Community)
I'm not good at working with databases.
Could you explain this requist to db more details for this example:

Caused bySmiley Surprisedrg.activiti.engine.ActivitiObjectNotFoundException: no deployed process definition found with id 'activitiInvitationModerated:1:23'

Thanks.