Uploaded image for project: 'Remote Alfresco API rivet'
  1. Remote Alfresco API rivet
  2. CMA-45

Optional parameter is actually required in WorkflowService.endTask

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.10.0
    • Fix Version/s: 3.2.0-E-0
    • Component/s: CMA Impl
    • Labels:
      None

      Description

      Acording to javadocs @ http://docs.rivetlogic.com/projects/raar/current/javadocs/com/rivetlogic/core/cma/api/WorkflowService.html, the parameter transitionId in endTask is optional (i.e. it can be null, meaning that the default transition should be taken).

      But the actual implementation @ https://svn.rivetlogic.org/repos/rivets/core/cma/cma/trunk/modules/cma-impl/src/main/java/com/rivetlogic/core/cma/impl/WorkflowServiceImpl.java checks that parameter as required (line 172):

      public WorkflowTask endTask(Ticket ticket, String taskId,
      String transitionId) throws InvalidTicketException,
      CmaRuntimeException {
      // check parameters
      ParameterCheck.mandatory("ticket", ticket);
      ParameterCheck.mandatoryString("taskId", taskId);
      ----->>>>ParameterCheck.mandatoryString("transitionId", transitionId);

      String methodName = CmaConstants.METHOD_WORKFLOW_ENDTASK;
      // create parameters
      Vector<NameValuePair> parameters = createGeneralParameters(ticket, methodName);
      parameters.add(new NameValuePair(CmaConstants.PARAM_TASKID, taskId));
      parameters.add(new NameValuePair(CmaConstants.PARAM_TRANSITIONID, transitionId));
      parameters.add(new NameValuePair(CmaConstants.PARAM_USETRANSACTION, true));

      return (WorkflowTask) execute(ticket, methodName, parameters);
      }

      As a result of this, we cannot invoke the default transition when ending a task.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sumer sumer
                Reporter:
                nacho@imaginaworks.com nacho@imaginaworks.com
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support