Alfresco
  1. Alfresco
  2. ALF-21061

StartWorkflowActionExecuter bad parameter parsing

    Details

    • Type: Bug Bug
    • Status: New
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.2.f Community, Future
    • Fix Version/s: None
    • Component/s: Rules and Actions
    • Security Level: external (External user)
    • Labels:
      None
    • Security Severity:
      None
    • Triage:
      To Do

      Description

      Well, in fact this was already discussed in MNT-1415 , there was stated that it won't be fixed but no reasoning is present there.

      endStartTask parameter is parsed like this:

      // determine whether to auto-end the start task
      Boolean endStartTask = (Boolean)ruleAction.getParameterValue(PARAM_END_START_TASK);
      String startTaskTransition = (String)ruleAction.getParameterValue(PARAM_START_TASK_TRANSITION);
      endStartTask = (endStartTask == null) ? true : false;

      It "seems" quite obvious that the last sentence should be:

      endStartTask = (endStartTask == null) ? true : endStartTask;

      I can imagine that this wasn't fixed due to backward compatibility issues but this change would make the default value still be the same and at the same time honour the right parameter value not only when it is false but also when it is true.

      It doesn't seem very reasonable to expect that people who used the action and set the parameter value explicitly to "true" would expect it to behave like false, so in this case they most probably did not use the parameter at all, which won't break.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Harpritt Kalsi
            Reporter:
            Igor Blanco
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: