3 Replies Latest reply on Oct 14, 2008 9:12 PM by Ronald van Kuijk

    Can process and task variables be defined in the process def

    Naresh Bhatia Novice

      I understand that process and task variables exist on process instances and task instances. However, is there a way to define them in a process definition? This would allow us to create a predefined variable whenever a process instance or a task instance is created from a process definition. Is it possible to do this or have I missed something?

      Thanks.
      Naresh

        • 1. Re: Can process and task variables be defined in the process
          Ronald van Kuijk Master

          what does the manual say about this? Probably nothing for one reason or another it probably is not possible directly from jPDL. That would probably my conclusion. I'd probably start searching the Forum, probably the Web, or even probably the Wiki and if I'd not found anything yet I'd probably ask here.

          But since there are so many probable locations to search for answers for such a generic thing, it is most likely an answer will show up from one of these resources.

          • 2. Re: Can process and task variables be defined in the process
            Naresh Bhatia Novice

            I have not seen any reference to such functionality in the manual or on the web. The jpdl schema also suggests that this is not possible. I am fairly certain that such a feature will improve the usability of jBPM as it provides an easy way to provide "personality" to processes and tasks at process definition time. Currently I see very specific handlers that can attach to a task with predefined semantics. What if I can attach a variable instead, say a variable called "form" whose value specifies the form I need to trigger in order to work on the task. Now my front-end can easily dispatch forms to take care of any task. Currently I am keeping such mappings externally and there is quite a bit of machinery needed to make this work. (I am using the process name plus the task name to create a unique key which maps to a form name. Unfortunately getting the process name from a task instance is quite expensive as it involves traversing through process instance and then process definition.)

            Any thoughts from the committers?

            Thanks.
            Naresh

            • 3. Re: Can process and task variables be defined in the process
              Ronald van Kuijk Master

               

              I have not seen any reference to such functionality in the manual or on the web. The jpdl schema also suggests that this is not possible.

              Correct, that was the first part of my statement

              I am fairly certain that such a feature will improve the usability of jBPM as it provides an easy way to provide "personality" to processes and tasks at process definition time.

              Maybe yes, maybe no. Might be that there already is a jira issue for something like this... (spoiler: 807)

              What if I can attach a variable instead, say a variable called "form" whose value specifies the form I need to trigger in order to work on the task.
              Already possible with the forms.xml in the console or your own custom taskcontroler or by adding any xml to the definition and parsing it yourself...

              Before I go into to much detail, what my real intention was with my previous post is to search better. This question has been asked multiple times, answered multiple times etc....