cancel
Showing results for 
Search instead for 
Did you mean: 

null pointer exception when finishing user task

chrisokelly
Champ on-the-rise
Champ on-the-rise
Hi,

I know I have posted several topics in this forum in the past few days, so sorry for what may be seen by some as spam. I am attempting to create an advanced workflow in activiti to manage document expiry.

I have removed most of the actual logic from the definition, replacing it with log messages so I can get the flow working first. I am now finally progressing past the start task and have hit an issue whereby whenever I try to complete the first user task I get a Java.lang.nullPointerException. The diagram looks like -
[img]http://i.imgur.com/2DrdJ.png[/img]

and the definition looks like:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="corporateDocumentExpiry" name="corporateDocumentExpiry">
    <startEvent id="startEvent" name="Start" activiti:formKey="mcwf:submitCorporateDocumentTask"></startEvent>
    <endEvent id="endEvent" name="End"></endEvent>
    <userTask id="twoWeekReminder_userTask" name="2 week reminder" activiti:candidateGroups="GROUP_site_corporate" activiti:formKey="mcwf:corporateDocumentOutcomeTask">
      <extensionElements>
        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>execution.setVariable('mcwf_extend_bool',( task.getVariableLocal('mcwf_extendExpireOutcome')== "Extend"));</activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
    </userTask>
    <boundaryEvent id="cancelReminderOnExpire_timer" name="" cancelActivity="true" attachedToRef="twoWeekReminder_userTask">
      <timerEventDefinition>
        <timeDuration>PT20M</timeDuration>
      </timerEventDefinition>
    </boundaryEvent>
    <exclusiveGateway id="extendExpireGateway_exclusiveGateway" name="Exclusive Gateway"></exclusiveGateway>
    <serviceTask id="DocumentExpires_scriptTask" name="Document Expires" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate">
      <extensionElements>
        <activiti:field name="script">
          <activiti:string>logger.warn("Document Expired");</activiti:string>
        </activiti:field>
      </extensionElements>
    </serviceTask>
    <userTask id="setExpiration_userTask" name="Set Expiration" activiti:candidateGroups="GROUP_site_corporate" activiti:formKey="mcwf:setExpirationTask"></userTask>
    <serviceTask id="waitForExpiry_scriptTask" name="Wait for expiry" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate">
      <extensionElements>
        <activiti:field name="script">
          <activiti:string>logger.warn("Document waiting to expire");</activiti:string>
        </activiti:field>
      </extensionElements>
    </serviceTask>
    <boundaryEvent id="waitForExpiry_timer" name="" cancelActivity="true" attachedToRef="waitForExpiry_scriptTask">
      <timerEventDefinition>
        <timeDuration>PT5M</timeDuration>
      </timerEventDefinition>
    </boundaryEvent>
    <serviceTask id="wait_scriptTask" name="Wait" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate">
      <extensionElements>
        <activiti:field name="script">
          <activiti:string>logger.warn("Expiration set, waiting for reminder");</activiti:string>
        </activiti:field>
      </extensionElements>
    </serviceTask>
    <boundaryEvent id="reminder_timer" name="" cancelActivity="true" attachedToRef="wait_scriptTask">
      <timerEventDefinition>
        <timeDuration>PT10M</timeDuration>
      </timerEventDefinition>
    </boundaryEvent>
    <sequenceFlow id="twoWeekReminderToExtendExpireGateway_flow" name="" sourceRef="twoWeekReminder_userTask" targetRef="extendExpireGateway_exclusiveGateway"></sequenceFlow>
    <sequenceFlow id="extendExpireGatewayToWaitForExpiry_expire_flow" name="" sourceRef="extendExpireGateway_exclusiveGateway" targetRef="waitForExpiry_scriptTask">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[!mcwf_extend_bool]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="documentExpiresToEnd_flow" name="" sourceRef="DocumentExpires_scriptTask" targetRef="endEvent"></sequenceFlow>
    <sequenceFlow id="cancelReminderOnExpireToDocumentExpires_flow" name="" sourceRef="cancelReminderOnExpire_timer" targetRef="DocumentExpires_scriptTask"></sequenceFlow>
    <sequenceFlow id="waitForExpiryToDocumentExpires_flow" name="" sourceRef="waitForExpiry_timer" targetRef="DocumentExpires_scriptTask"></sequenceFlow>
    <sequenceFlow id="startToSetExpiration_flow" name="" sourceRef="startEvent" targetRef="setExpiration_userTask"></sequenceFlow>
    <sequenceFlow id="reminderToTwoWeekReminder_flow" name="" sourceRef="reminder_timer" targetRef="twoWeekReminder_userTask"></sequenceFlow>
    <sequenceFlow id="setExpirationToWait_flow" name="" sourceRef="setExpiration_userTask" targetRef="wait_scriptTask"></sequenceFlow>
    <sequenceFlow id="extendExpireGatewayToSetExpiration_extend_flow" name="" sourceRef="extendExpireGateway_exclusiveGateway" targetRef="setExpiration_userTask">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[mcwf_extend_bool]]></conditionExpression>
    </sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_corporateDocumentExpiry">
    <bpmndi:BPMNPlane bpmnElement="corporateDocumentExpiry" id="BPMNPlane_corporateDocumentExpiry">
      <bpmndi:BPMNShape bpmnElement="startEvent" id="BPMNShape_startEvent">
        <omgdc:Bounds height="35" width="35" x="200" y="270"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endEvent" id="BPMNShape_endEvent">
        <omgdc:Bounds height="35" width="35" x="1070" y="270"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="twoWeekReminder_userTask" id="BPMNShape_twoWeekReminder_userTask">
        <omgdc:Bounds height="55" width="105" x="570" y="260"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="cancelReminderOnExpire_timer" id="BPMNShape_cancelReminderOnExpire_timer">
        <omgdc:Bounds height="30" width="30" x="608" y="302"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="extendExpireGateway_exclusiveGateway" id="BPMNShape_extendExpireGateway_exclusiveGateway">
        <omgdc:Bounds height="40" width="40" x="710" y="267"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="DocumentExpires_scriptTask" id="BPMNShape_DocumentExpires_scriptTask">
        <omgdc:Bounds height="55" width="105" x="930" y="260"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="setExpiration_userTask" id="BPMNShape_setExpiration_userTask">
        <omgdc:Bounds height="55" width="105" x="260" y="260"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="waitForExpiry_scriptTask" id="BPMNShape_waitForExpiry_scriptTask">
        <omgdc:Bounds height="55" width="105" x="783" y="260"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="waitForExpiry_timer" id="BPMNShape_waitForExpiry_timer">
        <omgdc:Bounds height="30" width="30" x="874" y="274"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="wait_scriptTask" id="BPMNShape_wait_scriptTask">
        <omgdc:Bounds height="55" width="105" x="400" y="260"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="reminder_timer" id="BPMNShape_reminder_timer">
        <omgdc:Bounds height="30" width="30" x="490" y="273"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="twoWeekReminderToExtendExpireGateway_flow" id="BPMNEdge_twoWeekReminderToExtendExpireGateway_flow">
        <omgdi:waypoint x="675" y="287"></omgdi:waypoint>
        <omgdi:waypoint x="710" y="287"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14" width="100" x="10" y="0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="extendExpireGatewayToWaitForExpiry_expire_flow" id="BPMNEdge_extendExpireGatewayToWaitForExpiry_expire_flow">
        <omgdi:waypoint x="750" y="287"></omgdi:waypoint>
        <omgdi:waypoint x="783" y="287"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14" width="100" x="10" y="0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="documentExpiresToEnd_flow" id="BPMNEdge_documentExpiresToEnd_flow">
        <omgdi:waypoint x="1035" y="287"></omgdi:waypoint>
        <omgdi:waypoint x="1070" y="287"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14" width="100" x="10" y="0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="cancelReminderOnExpireToDocumentExpires_flow" id="BPMNEdge_cancelReminderOnExpireToDocumentExpires_flow">
        <omgdi:waypoint x="623" y="332"></omgdi:waypoint>
        <omgdi:waypoint x="622" y="371"></omgdi:waypoint>
        <omgdi:waypoint x="982" y="371"></omgdi:waypoint>
        <omgdi:waypoint x="982" y="315"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14" width="100" x="10" y="0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="waitForExpiryToDocumentExpires_flow" id="BPMNEdge_waitForExpiryToDocumentExpires_flow">
        <omgdi:waypoint x="889" y="304"></omgdi:waypoint>
        <omgdi:waypoint x="930" y="287"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="startToSetExpiration_flow" id="BPMNEdge_startToSetExpiration_flow">
        <omgdi:waypoint x="235" y="287"></omgdi:waypoint>
        <omgdi:waypoint x="260" y="287"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14" width="100" x="10" y="0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="reminderToTwoWeekReminder_flow" id="BPMNEdge_reminderToTwoWeekReminder_flow">
        <omgdi:waypoint x="505" y="303"></omgdi:waypoint>
        <omgdi:waypoint x="570" y="287"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14" width="100" x="10" y="0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="setExpirationToWait_flow" id="BPMNEdge_setExpirationToWait_flow">
        <omgdi:waypoint x="365" y="287"></omgdi:waypoint>
        <omgdi:waypoint x="400" y="287"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14" width="100" x="10" y="0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="extendExpireGatewayToSetExpiration_extend_flow" id="BPMNEdge_extendExpireGatewayToSetExpiration_extend_flow">
        <omgdi:waypoint x="730" y="267"></omgdi:waypoint>
        <omgdi:waypoint x="729" y="219"></omgdi:waypoint>
        <omgdi:waypoint x="312" y="219"></omgdi:waypoint>
        <omgdi:waypoint x="312" y="260"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14" width="100" x="10" y="0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

I get a slightly different response based on whether I try to complete the first user task in /alfresco or /share.

In share, I get a popup with "java.lang.NullPointerException: null" on the browser, but nothing is logged to catalina.out. Strangely, in catalina.out (and alfresco.log) I see "[org.alfresco.repo.jscript.ScriptLogger] Expiration set, waiting for reminder", as though it has progressed to the next task (though it does not).

in alfresco, after I take ownership and click Task Done, I get "Please correct the errors below then click OK.    A system error happened during the operation: null" and in alfresco.log and catalina.out:
A system error happened during the operation: null
java.lang.NullPointerException
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:30)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityEnd.eventNotificationsCompleted(AtomicOperationActivityEnd.java:70)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:52)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:45)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.end(ExecutionEntity.java:299)
        at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:116)
        at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:49)
        at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44)
        at org.activiti.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.leave(AbstractBpmnActivityBehavior.java:37)
        at org.activiti.engine.impl.bpmn.behavior.ServiceTaskJavaDelegateActivityBehavior.execute(ServiceTaskJavaDelegateActivityBehavior.java:41)
        at org.activiti.engine.impl.bpmn.helper.ClassDelegate.execute(ClassDelegate.java:112)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:40)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:48)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:52)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:45)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:44)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:61)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:111)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:36)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:52)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:45)
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:326)
        at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:92)
        at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:49)
        at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44)
        at org.activiti.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.leave(AbstractBpmnActivityBehavior.java:37)
        at org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior.signal(UserTaskActivityBehavior.java:74)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.signal(ExecutionEntity.java:309)
        at org.activiti.engine.impl.persistence.entity.TaskEntity.complete(TaskEntity.java:149)
        at org.activiti.engine.impl.cmd.CompleteTaskCmd.completeTask(CompleteTaskCmd.java:63)
        at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:57)
        at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:28)
        at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
        at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
        at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
        at org.activiti.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:144)
        at org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.endNormalTask(ActivitiWorkflowEngine.java:1333)
        at org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.endTask(ActivitiWorkflowEngine.java:1319)
        at org.alfresco.repo.workflow.WorkflowServiceImpl.endTask(WorkflowServiceImpl.java:820)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:147)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy71.endTask(Unknown Source)
        at org.alfresco.web.bean.workflow.ManageTaskDialog.transition(ManageTaskDialog.java:446)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
        at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
        at javax.faces.component.UICommand.broadcast(UICommand.java:151)
        at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:115)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:191)
        at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:105)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:80)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:143)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.alfresco.repo.web.filter.beans.SessionSynchronizedFilter.doFilter(SessionSynchronizedFilter.java:67)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:68)
        at sun.reflect.GeneratedMethodAccessor382.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:103)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy238.doFilter(Unknown Source)
        at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.alfresco.repo.webdav.auth.BaseSSOAuthenticationFilter.doFilter(BaseSSOAuthenticationFilter.java:136)
        at sun.reflect.GeneratedMethodAccessor382.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:103)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy238.doFilter(Unknown Source)
        at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)
but the log message does not appear. I have made the workflow as super-simple as I can here, all the script task is supposed to do is log a message, wait a few minutes and progress to the next user task. My hopes of getting a response aren't really all that high I know, but I would be incredibly grateful if someone could even point me in the right direction, please.

I've trawled through the forums and found a few people with similar looking stack traces, they all appear to be related to an old bug requiring them to have a "start task definition". However, the issues and solutions ae always related to using jPDL XML for the workflow definition, for which the syntax doesn't seem to look anything like the activiti syntax I have seen. Also the start task definition seems to be analogous with a start event, which my definition already has.
1 REPLY 1

chrisokelly
Champ on-the-rise
Champ on-the-rise
Got this solved now. The issue here came from a basic misunderstanding of what is meant by a border event, but some reading on the activiti website cleared things up. Boundary timers should not be attached to script tasks, essentially because the script task finishes and then tries to progress to the next task pretty much immediately (if I understand correctly), which causes the timer not to be persisted properly. I was using boundary timer events connected to script tasks where I wanted the workflow to wait without leaving a user task about. What I didn't know (mainly, I suppose, because the only workflow I had seen which used timed events at all was the one in Jeff Potts tutorial, which IS a boundary timer event, correctly attached to a user task) was that there is also a intermediate timer event, which is exactly what I wanted - ie progress to x point, wait until y then proceed. I kept a text file of some of the stupid mistakes I made coming up with my first workflow and some of what I learnt, so, on the off-chance someone will arrive here from google with the same or similar issues (hello future people! I am talking across time!) here it is-

Workflows - A learning experience:

When referring to groups (ie - for pooled tasks), the group identifier listed in the admin console is NOT the group authority. The group should be referred to by the group authority: "GROUP_{groupIdentifier}". If I add a group, with display name corporate and identifier GROUP_corporate, I still need to refer to it with GROUP_GROUP_corporate

it appears digits (0-9) in the ID field of a workflow element invalidate the XML and prevent alfresco from parsing the workflow.

In general, boundary timers should ONLY be connected to user tasks, and then only if there is another flow for the user to follow on completing the task manually.if attached to a script task, you will see a Java.lang.nullPointerException. the correct usage is - timer set to cancel action: true (if the user does not act before x time continue to y task), even then there should almost always be another flow available for the user to follow if they DO act before x time.

Every once in a while in the eclipse graphical editor, the Exclusive gateway element decides to add an empty default property (unless you have specified a default flow already). This causes the xml to be invalid and alfresco will not start on deployment. Open the bpmn (or bpmn20.xml) file with a text editor and remove default=''.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.