Activiti
  1. Activiti
  2. ACT-518

More meaningful toString() for executions

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 5.1
    • Fix Version/s: 5.2
    • Component/s: Engine
    • Labels:
      None
    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      Currently toString() for executions uses the following code to produce unique execution name:

        protected String getToStringIdentity() {
        return Integer.toString(System.identityHashCode(this));
      }

      It would be better to use something more meaningful like execution id in toString() because it is used for logging. See attached patch.

      1. ACT-518.patch
        2 kB
        Tomasz Nurkiewicz

        Activity

        Hide
        Joram Barrez added a comment -

        Fixed in 5.2 release:

        public String toString() {
        if (isProcessInstance())

        { return "ProcessInstance["+getToStringIdentity()+"]"; }

        else

        { return (isConcurrent? "Concurrent" : "")+(isScope() ? "Scope" : "")+"Execution["+getToStringIdentity()+"]"; }

        }

        Show
        Joram Barrez added a comment - Fixed in 5.2 release: public String toString() { if (isProcessInstance()) { return "ProcessInstance["+getToStringIdentity()+"]"; } else { return (isConcurrent? "Concurrent" : "")+(isScope() ? "Scope" : "")+"Execution["+getToStringIdentity()+"]"; } }

          People

          • Assignee:
            Unassigned
            Reporter:
            Tomasz Nurkiewicz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: