4 Replies Latest reply on Mar 1, 2008 6:24 AM by Ronald van Kuijk

    Bold Transitions in Workflow-Designer

    Matthias Grossmann Newbie

      Hi everyone

      does anybody know how i can implement that any default leaving transition is automatically displayed in bold?
      By the way the default leaving transition of a State is the first transition that is declared in the processdefinition.

      thanks for any advises

      regards Matthias

        • 1. Re: Bold Transitions in Workflow-Designer
          Ronald van Kuijk Master

          The answer I'd give you is 'by changing the source of the GPD'. This is probably not what you wanted to here but that's just the way it is. It cannot be done in some css way or something, sorry.

          btw, you mean the label or the whole line?

          • 2. Re: Bold Transitions in Workflow-Designer
            Ronald van Kuijk Master

            I had a quick look out of curiosity and changing the getText() method in org.jbpm.gd.jpdl.part.TransitionOutlineEditPart to

            protected String getText() {
            
             String defaultTransitionName = null;
             String transitionName = getTransition().getName();
            
             transitionName = transitionName == null ? "transition" : transitionName;
            
             if (getTransition().getFrom().getLeavingTransitionsList().size() > 1) {
             defaultTransitionName = getTransition().getFrom().getDefaultLeavingTransition().getName();
             defaultTransitionName = defaultTransitionName == null ? "transition" : defaultTransitionName;
             }
            
             if (defaultTransitionName.equals(getTransition().getName())) {
             return transitionName + "\n<default>";
             } else {
             return transitionName;
             }
             }


            Might already do something.

            (not tested, not even to java correctness)

            • 3. Re: Bold Transitions in Workflow-Designer
              Matthias Grossmann Newbie

              Hi Ronald

              thank you for the quick answer.
              Yes i want to set the whole line to bold or another color or something. I have very big workflows and every state has three leaving transitions OK, FAIL, WARN that depends on conditions. In case no condition catches the workflow will follow the default transition. and i want to display this default transition in a special way.
              Your hint changes the label of the transition. i think that would not work because the transition names as stated above must not be changed.

              Do you have an idea to change the format of the transition line?

              regards Matthias

              • 4. Re: Bold Transitions in Workflow-Designer
                Ronald van Kuijk Master

                For what I hope, the above code only *displays* default below the label, not change the label itself!!!

                Do you have an idea to change the format of the transition line?


                If I did, I would have mentioned that ;-)

                Personally, I'd prefer the label to be bold or contain a text addition. Making the whole line bold is so intrusive (to me)