1 2 Previous Next 28 Replies Latest reply on Jul 19, 2006 9:30 AM by dlipski Go to original post
      • 15. Re: Modeling simple process(tasks)
        dlipski

        So what is the solution ? For now i name tasks and transitions in some convention and these way i connect them. But these have some influence on process designers which I want to minimalize. Nevertheless i will lokk for some better solution, and i hope we find something.

        Good luck ;)

        • 16. Re: Modeling simple process(tasks)
          kukeltje

          There is a jira issue for this with a fix. Patch jbpm yourself if you want it fiexed now, or wait for the (yet unscheduled) next minor release

          • 17. Re: Modeling simple process(tasks)
            dlipski

             

            "kukeltje" wrote:
            it cancels ALL open tasks indeed

            Which tasks will be canceled ?
            1)User tasks
            2)Process instance tasks
            3)Process definition tasks
            4)All tasks
            5)...


            • 18. Re: Modeling simple process(tasks)
              dlipski

              If connecting task with transition is such big problem maybe add such feature to future version ? How about that ?

              • 19. Re: Modeling simple process(tasks)
                kukeltje

                2

                Regarding the question on adding it. I do not think it will be. This functionality can be achieved in other ways.

                • 20. Re: Modeling simple process(tasks)
                  dlipski

                   

                  This functionality can be achieved in other ways.

                  Give me at least one complete example. I'm wondering how you wan't to achive this, because in my opinion technical reasons shouldn't have influance on process design.

                  Regards

                  • 21. Re: Modeling simple process(tasks)
                    kukeltje

                    A complete example would cost me (personally) to much free time. Some suggestions are made above.

                    Besides that, technical issues are imho not the limitation here. It is the combination of how *you* want to draw/design the process on a low level in combination with the existing functionality of an engine. The latter is not changed easy (for complete free flexibility develop it in java/c#/...), nor does it need to be changed (imo) since taking another view on the process (on the more functional level) it can be designed differently. If you still want to draw it like you do now, maybe jBPM is not the best engine for your needs.

                    • 22. Re: Modeling simple process(tasks)
                      dlipski

                       

                      would cost me (personally) to much free time

                      In my opinion it does mean that existing possibilities are not sufficient, because it is common and simple situation so it should be easy to model it.

                      Some suggestions are made above

                      If you are talking about this one with parallel tasks i think it's too complicated for such simple case.

                      It is the combination of how *you* want to draw/design the process

                      I want to design it as simple as it is possible, because in the future it will not be changed by system architect/programmer but by system user.
                      Maybe i made same wrong assumption here.(but why not ?)

                      As i said at the biginning I'm using jBPM for few days and never used any other workflow system. So maybe problem lies in the way i want to change processes in the future. I thought that this shuld be made by customer, not system programmers/designers etc. Thats why i want to model easy cases easly.

                      Maybe i don't understand the process of designing, deploying processes.
                      I imagine that process is designed by customer and after that it is deployed by system developers. Of course developers can add something to process (only actions?) but this should be invisible for process designers. I think that process deployers shouldn't transform process design to some different form which fulfil technical requirements.

                      Yours suggestions may work but they are to complicated, this problem can be solved much simplier: adding possibility to link tasks with transitions. But this is only newbie suggestion.


                      If you still want to draw it like you do now, maybe jBPM is not the best engine for your needs.

                      I want to draw it easly, and im looking for easy solution (parallel in generaly isn't easy). Maybe it isn't the best solution, but don't understand me wrong, i respect your work, i see a lot of good solutions here but it's hard to imagine for me that such simple case must be designed in some strange way.

                      Thanks for your support

                      • 23. Re: Modeling simple process(tasks)
                        kukeltje

                        It is not as common as you think, at least not the way you try to solve it. We've never had this question before from someone who was was not able to (simply) solve it with other process constructs.

                        IMO it is not a complex solution using parallel task, but if you want the end user to do it, maybe it is. We never have and never will focus on an engine/language that can be fully used by an enduser (read all Toms Blogs http://jboss.org/jbossBlog/blog/tbaeyens/)

                        The 'transformation' is also addressed in these blogs (The IDS-Sheers ARIS / SAP thing)

                        All this will not mean more 'complex' nodes will never be introduced but not on the short term

                        • 24. Re: Modeling simple process(tasks)
                          dlipski

                           

                          solve it with other process constructs

                          maybe i have short imagination, but i dont have more ideas ;)

                          We never have and never will focus on an engine/language that can be fully used by an enduser

                          So i've misanderstand the general idea.

                          Once again thanks for your help and patince ;)

                          Regards

                          • 25. Re: Modeling simple process(tasks)
                            dlipski

                            Ok so I accept 'transformation' as one step of the design process.

                            So how to transform such situation:
                            1)shop creates order - order is in state 'created'
                            2)supplier can create or reject order. When accepts order go's to 'accepted' state, but have to provide some additional data. When rejects order go's to 'rejected' state.

                            And there is one more requirement, all tasks that have to be performed by end users should be displayed in one generic way, this mean that if i add new action to 'created' state and deploy new process definition UI should display one button more. But end users have different permissions, some can only reject some can do both. One thing that is not generic is set of action which are implemented in Java.

                            At first glance i wanted to do this with task nodes but this causes some problems which i can't solve.

                            Now i want to do this with wait states. Where 'created', 'accepted', 'rejected' are wait states and 'accept', 'reject' are transition between them. But this aproach have few disadventages:

                            1)I can't use swimlanes. If in the future order after supplier acceptance should be accepted also by shop user WHO CREATED ORDER how to achive this ?

                            2)Actions now represents user tasks which should be represented by tasks.

                            3)Can i have one general action ex. 'modify order' and use it in different places in process and configure it to let users modify only quantities and somewere else let user modify only prices ? Or i have to do two distinct actions ?

                            Do u see any more ?

                            If u have any idea please help.

                            • 26. Re: Modeling simple process(tasks)
                              dlipski

                               

                              "cpob" wrote:
                              "kukeltje" wrote:
                              and add an action that cancels all other parallel tasks if one is acted upon


                              I don't think that's needed... The task node can be configured as signal=first end-tasks=true, right?

                              <task-node name="task3" end-tasks="true" signal="first">


                              That will let the first task signal to the next node and cancel all open tasks, at least from my understanding.


                              Any idea why open tasks aren't cancelled ?
                              Does Eclipse designer support end-tasks attribute and signal ?
                              I'm using jBPM 3.1.1


                              • 27. Re: Modeling simple process(tasks)
                                cpob

                                Open tasks are cancelled, if you use that bit of code for the task-node.

                                The GPD doesn't really support it, you can only do that by editing the XML.

                                • 28. Re: Modeling simple process(tasks)
                                  dlipski

                                  This was my mistake I used this attributes in not in <task-node>.

                                  At the end I found solution for my problem:
                                  mapping fragment:

                                  <task-node name="proposed" end-tasks="true" signal="never">
                                   <task name="accept">
                                   <assignment class="orders.workflow.OrdersAssignmentHandler"/>
                                   </task>
                                   <task name="cancel">
                                   <assignment class="orders.workflow.OrdersAssignmentHandler"/>
                                   </task>
                                   <transition name="accept" to="accepted"></transition>
                                   <transition name="cancel" to="canceled"></transition>
                                  </task-node>
                                  


                                  Listing avaliable actions for user:

                                  Map<ProcessInstance, List<TaskInstance>> instancesGrouped = new HashMap<ProcessInstance, List<TaskInstance>>();
                                  for(TaskInstance task : tasks)
                                  {
                                   ProcessInstance process = task.getToken().getProcessInstance();
                                   List<TaskInstance> instances = instancesGrouped.get(process);
                                   if(instances == null)
                                   {
                                   instances = new ArrayList<TaskInstance>();
                                   instancesGrouped.put(process,instances);
                                   }
                                   instances.add(task);
                                  }
                                  


                                  After task performing:


                                  JbpmContext ctx = workflowConfig.createJbpmContext();
                                  TaskInstance task = ctx.loadTaskInstance(taskId);
                                  Token token = task.getToken();
                                  task.end();
                                  token.signal(task.getName());
                                  ctx.save(token);
                                  ctx.close();
                                  


                                  This solution is generic, modyfing process doesn't force any changes in the client code, whats more adding new tasks requires only adding code for handling this tasks. Of course i need some mapping between task names and Java code (displaying some special UI forms) but this is obvious (for me).

                                  I'm gratefull for any comments.

                                  Regards

                                  1 2 Previous Next