4 Replies Latest reply on Jan 18, 2006 12:09 PM by gaidomartin

    A doubt from a beginner user

    gaidomartin

      Hi People!

      I'm a very new user in JBoss and I'm evaluating Jbpm as an valid option to manage business processes in our company.

      I put hands on it and I'm trying to undestand all concepts used whitin this technology. Well, I'll go right to the point....

      I'm looking at the websale.par example and I have a specific doubt (well, actually... I have several :-)).
      Please, look at this part of xml in the process definition:

      <task-node name="evaluate web order">



      salesman











      </task-node>


      Well, I know in this point the user has the option to confirm the web sale order or to give it back to review (the transitions).



      Excuse my primitive doubt, but I don't understand where this conditional is specified. Is it necessary to implement something in order the token follows one of the two possible branches?

      I'm going concrete. I'm thinking about a web form with 2 simple buttons, an OK button and a Reject button. What shoud I invoke in the Post Action of that form? Do I have to call an action handler?..... and something very important for me.... these conditionals... are flexible and parametrizable?? or do I have to "hardcore" the "If condition"?

      I'd be very grateful for any comments or an simple example that could give me a guide in order to go deeper inside jbpm.

      Thanks a lot in advanced.

      Martin.-

        • 1. Re: A doubt from a beginner user
          koen.aers

          Martin,

          Basically you have two options here : client decision or server decision.
          The first option is the so called hard-code option you mention. You have two buttons on the form and depending on which button gets clicked the webapp signals the process to continue along the corresponding transition. The websale process uses this mechanism (though it is not really hardcoded as the forms are generated by the default webform mechanism).
          The second mechanism is more fit for condition externalization. In this case you would have one transition from the task node to a decision node. Still, the client would have to make a choice by pressing one out of two buttons. But in this case, the particular choice would be saved in a process variable and the decision would contain a boolean expression based on this process variable.

          I hope this clarifies your concern a bit.

          Regards,
          Koen

          • 2. Re: A doubt from a beginner user
            gaidomartin

            Thanks Kohen for your advices.

            I've read carefully the chapter 7 Nodetype decision from jbpm documentation and I highlighted the concept of "decision handler".
            Let me explain our context. We're an insurance company and we want to implement a "claim process". The company operates in a lot of branches (car, ship, person... and so). When the claim is registered in the ERP system automatically calculates if the associated client has his policy payed. If the system verifies any debt, assigns a task to a finance manager in order to him to authorize or not the claim. The complex here is that the finance managers are grouped by branch. So, the system has to assign a task to the correct manager having in mind the current branch. (there are more than 20 branches and it's still growing!!)

            Mi concern is if the GPD has the ability to represent this visually so if new branches and assignments appear I simply add them with the visual tool. Otherwise I think about implementing that "DecisionHandler" and make a kind of "select... case" (or perhaps a DB table that maps branches and groups... or tasks, eventually) in order to assign correctly the task to the right person. What do you think?

            What I need to be clear is how flexible is the tool to make this kinds of complexity easiest to mantain as possible. (point of view of our process analysts). From my developer role I would need to know about the strategy to follow to deal with this kind of complexities. Have you dealt with conditional and multiple assignments, for instance? Any further advice for it? I just want to go to the right developing criteria in order to start for the correct way.

            Thank you again!!

            • 3. Re: A doubt from a beginner user
              enazareno

              Hi Martin,

              From what I've seen in your problem, you would probably need to read on swimlanes and identity management. The identity management very flexible in that you could assign variable, group or user expressions to swimlanes.

              In your case, you would probably create groups to represent your branches and add finance managers there as members. You also need to save the origin branch in a variable. You can use this variable in your swimlane so it would automatically know which branch or group the task is to be assigned. In this case you would'nt even need conditions. You would only need conditions if it needs to decide a business rule for example, if the amount > 100000 thus send approval to this branch.

              What would reflect in you GPD would only be the swimlane, you dont need to mention branch.

              Regards,

              Elmo

              • 4. Re: A doubt from a beginner user
                gaidomartin

                Hi Elmo,

                Well, I have new concepts to keep researching to now. I really didn't have in mind the whole scope of swimlanes. Your suggestion was very clear. I wanted to focus that aspect of our problem because the most of our complexity is related to role assignment rather than the workflow itself. (talking about a few tasks and states).

                I really apreciatte your clear comments about this topic. I have a more opened vision now about this technology and how it can help us.

                Regards,

                Martin.-

                PS: Next time, I promise to post smarter and complex questions.... "doubts from a semi-senior user" :-)