Project

General

Profile

Actions

Task #287

closed

Workflow error when is run without user task

Added by Vít Švanda over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Vít Švanda
Category:
Workflow
Target version:
Start date:
01/25/2017
Due date:
% Done:

100%

Estimated time:
Owner:

Description

When workflow process starts and have in process is some userTask acitivity everything works fine.
But when is in process route only service task (without user task ... process is not asynchrone), then is throw error below.

org.activiti.engine.ActivitiObjectNotFoundException: Cannot find process instance with id 59013
    at org.activiti.engine.impl.cmd.AddIdentityLinkForProcessInstanceCmd.execute(AddIdentityLinkForProcessInstanceCmd.java:67)
    at org.activiti.engine.impl.cmd.AddIdentityLinkForProcessInstanceCmd.execute(AddIdentityLinkForProcessInstanceCmd.java:26)
    at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
    at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
    at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
    at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
    at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
    at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
    at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
    at org.activiti.engine.impl.RuntimeServiceImpl.addUserIdentityLink(RuntimeServiceImpl.java:235)
    at eu.bcvsolutions.idm.core.workflow.service.impl.DefaultWorkflowProcessInstanceService.startProcess(DefaultWorkflowProcessInstanceService.java:96)
    at eu.bcvsolutions.idm.acc.service.impl.DefaultSynchronizationService.startWorkflow(DefaultSynchronizationService.java:1343)
    at eu.bcvsolutions.idm.acc.service.impl.DefaultSynchronizationService.doItemSynchronization(DefaultSynchronizationService.java:411)
    at sun.reflect.GeneratedMethodAccessor432.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at 
Actions #1

Updated by Vít Švanda over 7 years ago

  • % Done changed from 0 to 50

I found a temporary solution. In workflow process I set End activity on asynchrone.

Actions #2

Updated by Vít Švanda about 7 years ago

  • I tried new Activiti engine version (5.22.0) ... problem not solved.
  • I tried remove our custom workflow configuration ... problem not solved.
  • I tried use inner localization system, but I was not successed. During deploy activiti throw exception "java.lang.NullPointerException: null at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.isEqualToCurrentLocalizationValue(BpmnDeployer.java:582)". I didn't found solution yet. Example how defines localization in workflow definition (official "example"):
<userTask id="theTask" name="my task">
        <documentation>My Task Description</documentation>

        <extensionElements>
          <activiti:localization locale="es" name="Mi Tarea">
            <activiti:documentation>Mi Tarea Descripción</activiti:documentation>
          </activiti:localization>

            <activiti:localization locale="it" name="Il mio compito">
                <activiti:documentation>Il mio compito Descrizione</activiti:documentation>
            </activiti:localization>
        </extensionElements>
    </userTask>
Actions #3

Updated by Vít Švanda about 7 years ago

Very similar problem is in subprocess. Problem is bigger, because work around with set END activity as asynchrone = true, not work in this case.
  • I tried turn off, audit, audit listener, task spring ... without success.
  • I tried versions of activiti, 5.19.0, 5.19.1, 5.18.0, 5.21, 5.22, 6.0.0.Beta4 ... without success. Problem is in all version, but with different symptoms.
Actions #4

Updated by Vít Švanda about 7 years ago

  • % Done changed from 50 to 60

I found work around for subprocess. In version activiti 5.22.0, must have subprocess set END activity as async=true. Parent process must have set on "call activity" property "sequential=true".

Actions #5

Updated by Vít Švanda about 7 years ago

  • % Done changed from 60 to 100
Solved, problem was in start process.
  • After process is started, we have to set applicant and implementer to workflow process instance (we need rights for data). If is process running without UserTask, then is process instance delete (this is Activiti property). In this case, call set applicant and implementer to workflow process cause throw exception " Cannot find process instance with id ...".
  • Now I set applicant and implementer only to async process (not ended process).
  • I removed async end from all WF definition in Core and Acc module.
  • I completed tests for change permissions.
Actions #6

Updated by Vít Švanda about 7 years ago

  • Status changed from In Progress to Resolved
Actions #7

Updated by Vít Švanda about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF