Uploaded image for project: 'Enterprise 3.x'
  1. Enterprise 3.x
  2. ETHREEOH-2137

Extension to existing "workflow" Javascript object does not expose inherited public methods

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not a bug
    • Affects Version/s: 3.1
    • Fix Version/s: 3.2
    • Component/s: Services, Workflow
    • Security Level: external (External user)
    • Labels:
      None
    • Environment:
      Mac OS

      Description

      I wrote a class called WorkflowStatusManager that extends org.alfresco.repo.workflow.jscript.WorkflowManager. In the class, I wanted to add some overloaded methods such as getAssignedTasks given a parameter, the user for whom to get assigned tasks (the parent class only allows for the currently authenticated user). I configured the Spring bean as follows:

          <bean id="workflowStatusScript" parent="workflowScript"
                class="org.alfresco.repo.workflow.jscript.WorkflowStatusManager">
              <property name="extensionName">
                  <value>workflowstatus</value>
              </property>
              <property name="serviceRegistry">
                  <ref bean="ServiceRegistry"/>
              </property>
          </bean>

      Using the Javascript debugger, the "workflowstatus" object only exposed the two new public methods I wrote, and none of the parent class' public methods (as I expected it would) - see attached image.

      I've also tried this Spring configuration, but got the same results:

          <bean id="workflowScript" parent="baseJavaScriptExtension"
                class="org.alfresco.repo.workflow.jscript.WorkflowManager">
              <property name="extensionName">
                  <value>workflow</value>
              </property>
              <property name="serviceRegistry">
                  <ref bean="ServiceRegistry"/>
              </property>
          </bean>

        Attachments

          Activity

            People

            • Assignee:
              closedbugs Closed Bugs
              Reporter:
              brobinson Brian Robinson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: