AnsweredAssumed Answered

Cannot resolve identifier

Question asked by chrisokelly on Jun 25, 2012
Hi,

I am attempting to follow Jeff Potts Advanced Workflows tutorial (2nd edition from ecmarchitect.com) in order to create an advanced workflow for our organization.

I was able to get all the sample workflows from the pdf working without problems, when I have tried to set up my own workflow I have encountered an issue. I am using Alfresco 4.0.d Community and I am developing with the Activiti process designer for Eclipse (with a little Notepad++ here and there).

The goal I hope to accomplish is a workflow that will be executed by a script, run by a rule, when content is added to a space (the script will be barebones, I haven't created it yet and for now just test by manually starting the workflow. It will do nothing but create the start workflow action, assign the name parameter relating to my advanced workflow and execute). The workflow will:
  1. start a pooled task in a group. Whoever picks it up from the group assigns an expiry date.

  2. Begin 2 timers - one due 2 weeks before the set expiry date, another due on the expiry date

  3. When the first timer is triggered, starts a pooled review-style task. Whoever picks it up may either Extend (Approve) or Expire (Reject)

  4. If the task is Extended, starts another pooled task. Whoever picks it up sets a new expiry date and the workflow continues from step 2.

  5. If the task is Expired, moves the document to an expired folder and ends the workflow.

  6. If the second timer (due on expiry date) triggers before step 3 is completed, cancels actions and goes straight to step 5 (expiry)
I haven't added code for what happens when the document expires yet as I haven't been able to get the original logic working.

My BPMN is -
<?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="startevent1" name="Start" activiti:formKey="mcwf:submitCorporateDocumentTask"></startEvent>
    <endEvent id="endevent1" name="End"></endEvent>
    <userTask id="alfrescoUsertask1" name="Set Expiration" activiti:candidateGroups="GROUP_Corporate" activiti:formKey="mcwf:setNewExpiryDateTask"></userTask>
    <userTask id="alfrescoUsertask2" name="2 week reminder" activiti:candidateGroups="GROUP_Corporate" activiti:formKey="mcwf:corporateDocumentOutcomeTask"></userTask>
    <boundaryEvent id="boundarytimer3" name="" cancelActivity="true" attachedToRef="alfrescoUsertask2">
      <timerEventDefinition>
        <timeDate>#{mcwf_expiryDate}</timeDate>
      </timerEventDefinition>
    </boundaryEvent>
    <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
    <serviceTask id="alfrescoScripttask1" 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>
    <serviceTask id="alfrescoScripttask2" name="Set reminder date" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate">
      <extensionElements>
        <activiti:field name="script">
          <activiti:string>execution.setVariable(mcwf_reminderDate, task.getVariable(mcwf_expiryDate).getDate() - 14);</activiti:string>
        </activiti:field>
      </extensionElements>
    </serviceTask>
    <boundaryEvent id="boundarytimer2" name="" cancelActivity="false" attachedToRef="alfrescoScripttask2">
      <timerEventDefinition>
        <timeDate>#{mcwf_reminderDate}</timeDate>
      </timerEventDefinition>
    </boundaryEvent>
    <sequenceFlow id="flow2" name="" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
    <sequenceFlow id="flow3" name="" sourceRef="exclusivegateway1" targetRef="alfrescoUsertask1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[task.getVariableLocal('mcwf_approveRejectOutcome') == 'Extend']]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow4" name="" sourceRef="alfrescoUsertask2" targetRef="exclusivegateway1"></sequenceFlow>
    <sequenceFlow id="flow5" name="" sourceRef="exclusivegateway1" targetRef="alfrescoScripttask1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[task.getVariableLocal('mcwf_approveRejectOutcome') == 'Expire']]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow6" name="" sourceRef="alfrescoScripttask1" targetRef="endevent1"></sequenceFlow>
    <sequenceFlow id="flow7" name="" sourceRef="alfrescoUsertask1" targetRef="alfrescoScripttask2">
      <extensionElements>
        <activiti:executionListener event="take" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
          <activiti:field name="script">
            <activiti:string>task.setVariable(mcwf_expiryDate,task.getVariable(mcwf_newExpiryDate));</activiti:string>
          </activiti:field>
        </activiti:executionListener>
      </extensionElements>
    </sequenceFlow>
    <sequenceFlow id="flow8" name="" sourceRef="boundarytimer2" targetRef="alfrescoUsertask2"></sequenceFlow>
    <sequenceFlow id="flow9" name="" sourceRef="boundarytimer3" targetRef="alfrescoScripttask1"></sequenceFlow>
    <userTask id="usertask1" name="Set Expiration" activiti:candidateGroups="GROUP_Corporate" activiti:formKey="mcwf:submitCorporateDocumentTask"></userTask>
    <sequenceFlow id="flow10" name="" sourceRef="usertask1" targetRef="alfrescoScripttask2"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_corporateDocumentExpiry">
    <bpmndi:BPMNPlane bpmnElement="corporateDocumentExpiry" id="BPMNPlane_corporateDocumentExpiry">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="35" width="35" x="160" y="270"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35" width="35" x="1070" y="270"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="alfrescoUsertask1" id="BPMNShape_alfrescoUsertask1">
        <omgdc:Bounds height="55" width="105" x="366" y="178"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="alfrescoUsertask2" id="BPMNShape_alfrescoUsertask2">
        <omgdc:Bounds height="55" width="105" x="570" y="260"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="boundarytimer3" id="BPMNShape_boundarytimer3">
        <omgdc:Bounds height="30" width="30" x="608" y="302"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
        <omgdc:Bounds height="40" width="40" x="710" y="267"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="alfrescoScripttask1" id="BPMNShape_alfrescoScripttask1">
        <omgdc:Bounds height="55" width="105" x="930" y="260"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="alfrescoScripttask2" id="BPMNShape_alfrescoScripttask2">
        <omgdc:Bounds height="55" width="105" x="366" y="260"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="boundarytimer2" id="BPMNShape_boundarytimer2">
        <omgdc:Bounds height="30" width="30" x="460" y="273"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
        <omgdc:Bounds height="55" width="105" x="220" y="260"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="195" y="287"></omgdi:waypoint>
        <omgdi:waypoint x="220" y="287"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="730" y="267"></omgdi:waypoint>
        <omgdi:waypoint x="729" y="205"></omgdi:waypoint>
        <omgdi:waypoint x="471" y="205"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="675" y="287"></omgdi:waypoint>
        <omgdi:waypoint x="710" y="287"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="750" y="287"></omgdi:waypoint>
        <omgdi:waypoint x="930" y="287"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="1035" y="287"></omgdi:waypoint>
        <omgdi:waypoint x="1070" y="287"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="418" y="233"></omgdi:waypoint>
        <omgdi:waypoint x="418" y="260"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
        <omgdi:waypoint x="475" y="303"></omgdi:waypoint>
        <omgdi:waypoint x="570" y="287"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
        <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:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
        <omgdi:waypoint x="325" y="287"></omgdi:waypoint>
        <omgdi:waypoint x="366" y="287"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

My model is -
<model name="mcwf:somecoWorkflowModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
   <description>Someco Workflow Model</description>
   <author>Chris O'Kelly</author>
   <version>1.0</version>
   
   <imports>
      <!– Import Alfresco Dictionary Definitions –>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
      <!– Import Alfresco Content Domain Model Definitions –>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
      <!– Import Alfresco jBPM model definitions –>
      <import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm" />
   </imports>
   
   <namespaces>
      <!– Define a namespace for the new definitions –>
      <namespace uri="my.someco.workflow.root" prefix="mcwf"/>
   </namespaces>
   
   <!– Constraints Definitions go here –>
   
   <!– Type Definitions go here –>
   <types>
      <type name="mcwf:submitCorporateDocumentTask">
         <parent>bpm:startTask</parent>
         <mandatory-aspects>
            <aspect>mcwf:corporateDocumentExpiry</aspect>
         </mandatory-aspects>
      </type>
      
      <type name="mcwf:setNewExpiryDateTask">
         <properties>
            <property name="mcwf:newExpiryDate">
               <type>d:date</type>
               <mandatory>true</mandatory>
               <multiple>false</multiple>
            </property>
         </properties>
      </type>
      
      <type name="mcwf:corporateDocumentOutcomeTask">
         <parent>bpm:activitiOutcomeTask</parent>
         <properties>
            <property name="mcwf:extendExpireOutcome">
               <type>d:text</type>
               <default>Expire</default>
               <constraints>
                  <constraint type="LIST">
                     <parameter name="allowedValues">
                        <list>
                           <value>Extend</value>
                           <value>Expire</value>
                        </list>
                     </parameter>
                  </constraint>
               </constraints>
            </property>
         </properties>
         <overrides>
            <property name="bpm:packageItemActionGroup">
               <default>read_package_item_actions</default>
            </property>
            <property name="bpm:outcomePropertyName">
               <default>{my.someco.workflow.root}extendExpireOutcome</default>
            </property>
         </overrides>
      </type>
      
   </types>
   
   <!– Aspect Definitions go here –>
   <aspects>
      <aspect name="mcwf:corporateDocumentExpiry">
         <properties>
            <property name="mcwf:expiryDate">
               <type>d:date</type>
               <mandatory>true</mandatory>
               <multiple>false</multiple>
            </property>
            <property name="mcwf:reminderDate">
               <type>d:date</type>
               <multiple>false</multiple>
            </property>
         </properties>
      </aspect>
   </aspects>
</model>

The workflow and model deploy successfully, but when I try to start an instance of the workflow I get -
ERROR [ui.common.Utils] [http-8080-1] A system error happened during the operation: 05250031 Failed to start workflow activiti$corporateDocumentExpiry:1:1603.
org.alfresco.service.cmr.workflow.WorkflowException: 05250031 Failed to start workflow activiti$corporateDocumentExpiry:1:1603.
        at org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.startWorkflow(ActivitiWorkflowEngine.java:1026)
        at org.alfresco.repo.workflow.WorkflowServiceImpl.startWorkflow(WorkflowServiceImpl.java:399)
        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.startWorkflow(Unknown Source)
        at org.alfresco.web.bean.workflow.StartWorkflowWizard.finishImpl(StartWorkflowWizard.java:221)
        at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:123)
        at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:119)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
        at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:129)
        at org.alfresco.web.bean.wizard.WizardManager.finish(WizardManager.java:593)
        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.GeneratedMethodAccessor539.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 $Proxy239.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.GeneratedMethodAccessor539.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 $Proxy239.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)
Caused by: org.activiti.engine.ActivitiException: Unknown property used in expression
        at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:55)
        at org.activiti.engine.impl.jobexecutor.TimerDeclarationImpl.prepareTimerEntity(TimerDeclarationImpl.java:102)
        at org.activiti.engine.impl.persistence.entity.ExecutionEntity.initialize(ExecutionEntity.java:270)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:38)
        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.FlowNodeActivityBehavior.execute(FlowNodeActivityBehavior.java:36)
        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.AtomicOperationProcessStartInitial.eventNotificationsCompleted(AtomicOperationProcessStartInitial.java:44)
        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.AtomicOperationProcessStart.eventNotificationsCompleted(AtomicOperationProcessStart.java:44)
        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.start(ExecutionEntity.java:280)
        at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:72)
        at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:31)
        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.RuntimeServiceImpl.startProcessInstanceById(RuntimeServiceImpl.java:65)
        at org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.startWorkflow(ActivitiWorkflowEngine.java:1011)
        … 78 more
Caused by: org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'mcwf_expiryDate'
        at org.activiti.engine.impl.juel.AstIdentifier.eval(AstIdentifier.java:83)
        at org.activiti.engine.impl.juel.AstEval.eval(AstEval.java:50)
        at org.activiti.engine.impl.juel.AstNode.getValue(AstNode.java:26)
        at org.activiti.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114)
        at org.activiti.engine.impl.delegate.ExpressionGetInvocation.invoke(ExpressionGetInvocation.java:33)
        at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)
        at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25)
        at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:50)
        … 126 more

So I can see that the issue is with my using the mcwf_expiryDate property somewhere. I am starting the workflow via the /alfresco instance (clicking the down arrow beneath a document, start advanced workflow…) and it takes me through the wizard, the error occurs on pressing the finish button in the wizard. As far as I see, it should get to the Pooled task first and allow an expiry date to be set before it is used as an expression, expiryDate is not referenced anywhere before this. Can anyone help me see whereabouts I am going wrong here?


Edit:
Ok now I am really confused.

I removed every reference to mcwf_expiryDate in my workflow definition, but I still get the error that the identifier cannot be resolved. This leads me to the assumption it is an issue of the expiry date being mandatory but not yet set (I do not want to set the expiry date in the start task as often people will be adding files via cifs or another method and the workflow needs to be started programatically, not manually). Is there a way around this? I see that I could remove the mandatory flag from the property, but when we get to the task in which it is set I need to have the field be mandatory (to prevent errors).

Further Edit:
Having set Redeploy to true in my spring bean, I am now actually pushing through the changes I make (derp) and no longer encountering this error. I have a new issue, but will start a new topic.

Outcomes