Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-7643

DTOConverter#convertWorkflowAttributeDefinition only looks for a definition by name now

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.1.1
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-7556DocumentSearchCriteria should support principal ids, right now it only supports specifying principal names
      KULRICE-4750Using Person Lookup with First Name or Last name only looks at the "Preffered" name instead of the default
      KULRICE-12625Attribute definitions not being correctly picked up from data dictionary for input fields
      KULRICE-3526Fix issue with Document Type XML parser where it isn't properly handling route paths that re-use a node definition
      KULRICE-7693expressions in nested bean definitions not processed
      KULRICE-3775Research how Message Resources are loaded now and clean them up
      KULRICE-7373Rename KRMS Definition classes (drop Definition) and DefinitionContract classes to Contract.
      KULRICE-6721Document search does not work properly with KNS Attribute Definitions
      KULRICE-9916Do checkbox conversion in LookupInputField only when specified through attribute definition
      KULRICE-3033Look into fixing why Rice standalone can only be packaged properly using Maven 2.0.9
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      In Rice 1.x, DTOConverter would attempt to lookup a workflow attribute definition first by class name and then by attribute name. In Rice 2.x, it only looks up by attribute name. This breaks attribute lookups, especially while running in remote applications.

      Example:
      Rice 1.x

      
      
              // get the rule attribute so we can get's it's message antity and not blow up if it's remote
              RuleAttribute ruleAttribute = KEWServiceLocator.getRuleAttributeService().findByClassName(definitionVO.getAttributeName());
              if (ruleAttribute == null) {
                  ruleAttribute = KEWServiceLocator.getRuleAttributeService().findByName(definitionVO.getAttributeName());
              }
              if (ruleAttribute == null) {
                  throw new WorkflowRuntimeException("Attribute " + definitionVO.getAttributeName() + " not found");
              }
      

      Rice 2.x

      ExtensionDefinition extensionDefinition = KewApiServiceLocator.getExtensionRepositoryService().getExtensionByName(definition.getAttributeName());
              if (extensionDefinition == null) {
                  throw new WorkflowRuntimeException("Extension " + definition.getAttributeName() + " not found");
              }
      

        Issue Links

          Activity

          Hide
          Greg Patterson (Inactive) added a comment -

          Discovered by IU upgrade issue: https://uisapp2.iu.edu/jira-prd//browse/EN-2685

          Show
          Greg Patterson (Inactive) added a comment - Discovered by IU upgrade issue: https://uisapp2.iu.edu/jira-prd//browse/EN-2685
          Hide
          Greg Patterson (Inactive) added a comment -

          Fix committed

          Show
          Greg Patterson (Inactive) added a comment - Fix committed
          Hide
          Gayathri Athreya added a comment - - edited

          I just brought in Rice 2.1.1-rc1 and this causes an issue when I try to save a Proposal Development Document. This is the stack trace I see.
          2012-07-11 11:31:40,190 [qtp17027752-95] u:quickstart/d:4111 FATAL org.kuali.rice.core.framework.persistence.jta.KualiTransactionInterceptor - Exception caught by Transaction Interceptor, this will cause a rollback at the end of the transaction.
          java.lang.NullPointerException
          at org.kuali.rice.kew.dto.DTOConverter.convertWorkflowAttributeDefinition(DTOConverter.java:237)
          at org.kuali.rice.kew.dto.DTOConverter.createDocumentContentSection(DTOConverter.java:160)
          at org.kuali.rice.kew.dto.DTOConverter.buildUpdatedDocumentContent(DTOConverter.java:103)
          at org.kuali.rice.kew.impl.action.WorkflowDocumentActionsServiceImpl.init(WorkflowDocumentActionsServiceImpl.java:235)
          at org.kuali.rice.kew.impl.action.WorkflowDocumentActionsServiceImpl.executeActionInternal(WorkflowDocumentActionsServiceImpl.java:1345)
          at org.kuali.rice.kew.impl.action.WorkflowDocumentActionsServiceImpl.saveDocumentData(WorkflowDocumentActionsServiceImpl.java:702)
          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:318)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)

          When I inspected the DTOConverter class, I noticed that at line 237, KEWServiceLocator.getRuleAttributeService() is returning null in an embedded environment.

          Show
          Gayathri Athreya added a comment - - edited I just brought in Rice 2.1.1-rc1 and this causes an issue when I try to save a Proposal Development Document. This is the stack trace I see. 2012-07-11 11:31:40,190 [qtp17027752-95] u:quickstart/d:4111 FATAL org.kuali.rice.core.framework.persistence.jta.KualiTransactionInterceptor - Exception caught by Transaction Interceptor, this will cause a rollback at the end of the transaction. java.lang.NullPointerException at org.kuali.rice.kew.dto.DTOConverter.convertWorkflowAttributeDefinition(DTOConverter.java:237) at org.kuali.rice.kew.dto.DTOConverter.createDocumentContentSection(DTOConverter.java:160) at org.kuali.rice.kew.dto.DTOConverter.buildUpdatedDocumentContent(DTOConverter.java:103) at org.kuali.rice.kew.impl.action.WorkflowDocumentActionsServiceImpl.init(WorkflowDocumentActionsServiceImpl.java:235) at org.kuali.rice.kew.impl.action.WorkflowDocumentActionsServiceImpl.executeActionInternal(WorkflowDocumentActionsServiceImpl.java:1345) at org.kuali.rice.kew.impl.action.WorkflowDocumentActionsServiceImpl.saveDocumentData(WorkflowDocumentActionsServiceImpl.java:702) 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:318) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) When I inspected the DTOConverter class, I noticed that at line 237, KEWServiceLocator.getRuleAttributeService() is returning null in an embedded environment.
          Hide
          Greg Patterson (Inactive) added a comment -

          That seems odd that the ruleAttributeService is null as it's in _KewEmbeddedRuleServicesSpringBeans.xml so I would think it should be getting loaded in KFS

            <!--  RuleAttributeService -->
            <bean id="enRuleAttributeService" class="org.kuali.rice.kew.rule.service.impl.RuleAttributeServiceImpl"
                  lazy-init="true">
              <property name="ruleAttributeDAO">
                <ref bean="enRuleAttributeDAO"/>
              </property>
            </bean>
          
          Show
          Greg Patterson (Inactive) added a comment - That seems odd that the ruleAttributeService is null as it's in _KewEmbeddedRuleServicesSpringBeans.xml so I would think it should be getting loaded in KFS <!-- RuleAttributeService --> <bean id= "enRuleAttributeService" class= "org.kuali.rice.kew.rule.service.impl.RuleAttributeServiceImpl" lazy-init= " true " > <property name= "ruleAttributeDAO" > <ref bean= "enRuleAttributeDAO" /> </property> </bean>
          Hide
          Peter Giles (Inactive) added a comment -

          It's is in KC embedded where they are seeing the issue. I'm wondering if the RuleAttributeService bean should be moved to the KEW embedded spring config.

          Show
          Peter Giles (Inactive) added a comment - It's is in KC embedded where they are seeing the issue. I'm wondering if the RuleAttributeService bean should be moved to the KEW embedded spring config.
          Hide
          Peter Giles (Inactive) added a comment -

          Sweet, Gayathri reported that its working for KC after moving that bean to the embedded config.

          Show
          Peter Giles (Inactive) added a comment - Sweet, Gayathri reported that its working for KC after moving that bean to the embedded config.
          Hide
          Jessica Coltrin (Inactive) added a comment -

          release notes are generated. closing issues.

          Show
          Jessica Coltrin (Inactive) added a comment - release notes are generated. closing issues.

            People

            • Assignee:
              Peter Giles (Inactive)
              Reporter:
              Greg Patterson (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Structure Helper Panel