3 Replies Latest reply on Apr 6, 2009 3:16 AM by jbarrez

    required fields for transitions?

    omaass

      Hi,

      I'm exploring jBPM and I have a conceptual question. I know that tasks can have required fields. But as far as I know, there is no way to define required fields for transitions. Wouldn't that be sometimes more important than for the task?

      Example: you have a workflow where a designer uploads an image that is to be approved by the art director. The art director gets a task "check image" in node "waiting for approval". Node "waiting for approval" has two transitions: "approve" and "reject". Now the transition "reject" would need a required variable "rejection reason" whereas "approve" would not.

      How could you implement this scenario in jBPM? Is there another way I don't see?

      Thanks for help!
      omaass

        • 1. Re: required fields for transitions?
          kukeltje

          conditionally required variables is indeed somewhere on the list (afaik). If the required, write, read attribute is changed into something like required='true' or some EL expression with the transitionname in the expression, that could be realized.

          Achieving this now is possible by making the variable not required in the pd, but checking some things with dhtml in the client. Another option is to implement your own taskcontroller and achieve it that way.

          • 2. Re: required fields for transitions?
            sakalorien

            Hi,

            exist any other option to define transition-specific-variables. The last post is nearly 3 year old an I hope JBPM has devolp something like a transition-variable-scope.

            Thanks for help.

            • 3. Re: required fields for transitions?
              jbarrez

              Take a look at the taskController. You can define process variables as 'required' in this controller (in the process xml).

              The TaskController is an interface, so it is easy to change the functionality if needed (eg transition specific variables?)