9 Replies Latest reply on Mar 13, 2008 5:27 AM by kukeltje

    Signalling Option

    victorl

      Hi All,

      What does mean If signalling is set to false, this task will never have the capability of trigering the continuation of the token. In the user guide, item 18.4.24 Task.

      Thank you in advance.
      Regards,

      Victor

        • 1. Re: Signalling Option
          kukeltje

          that when a task finishes, it cannot (automatically) signal the tasknode to take a transition

          • 2. Re: Signalling Option
            victorl

            Ronald, thank you very much for the response.

            So, why I am having the problem mentioned at:
            http://www.jboss.com/index.html?module=bb&op=viewtopic&t=131550

            Thanks once again
            Regards,

            Victor

            • 3. Re: Signalling Option
              kukeltje

              please make a unittest with embedded processdefinition that demonstrates the problem

              • 4. Re: Signalling Option
                victorl

                This is process definition:

                <?xml version="1.0" encoding="UTF-8"?>
                
                <process-definition xmlns="" name="alta">
                 <start-state name="iniciar tramite">
                 <task name="iniciar tramite alta"></task>
                 <transition to="agendar ctrl documentacion" name="tramite iniciado"></transition>
                 <event type="node-enter">
                 <action name="iniciarTramite" class="ar.com.dsv.saslc.seguimiento.workflow.jbpm.handlers.alta.ControlarDocumentacion"></action>
                 </event>
                 </start-state>
                
                 <task-node name="controlar documentacion">
                 <task name="Control de Documentacion" signalling="false">
                 <controller>
                 <variable access="read,write" name="etiquetaBotones"></variable>
                 </controller>
                 </task>
                 <event type="node-enter">
                 <action class="ar.com.dsv.saslc.seguimiento.workflow.jbpm.handlers.alta.ObtenerTransiciones" name="obtenerNombreTransiciones"></action>
                 </event>
                 <transition to="examen psicofisico" name="Completo"></transition>
                 <transition to="agendar ctrl documentacion" name="No Completo"></transition>
                 </task-node>
                
                 <task-node name="examen psicofisico">
                 <task name="Examen PsicofiÂÂsico" signalling="false">
                 <controller>
                 <variable access="read,write" name="etiquetaBotones"></variable>
                 </controller>
                 </task>
                 <event type="node-enter">
                 <action class="ar.com.dsv.saslc.seguimiento.workflow.jbpm.handlers.alta.ObtenerTransiciones" name="obtenerNombreTransiciones"></action>
                 </event>
                 <transition to="calculo sellado" name="Apto"></transition>
                 <transition to="coordinacion psicofisico" name="No Apto"></transition>
                 </task-node>
                
                 <state name="agendar ctrl documentacion">
                 <event type="node-enter">
                 <action class="ar.com.dsv.saslc.seguimiento.workflow.jbpm.handlers.alta.AgendarCtrlDocumentacion" name="obtenerActividadesSiguientes"></action>
                 </event>
                 <transition to="controlar documentacion" name="actividad agendada"></transition>
                 </state>
                
                 <node name="calculo sellado">
                 <transition to="fin tramite" name="licencia otorgada"></transition>
                 </node>
                
                 <state name="coordinacion psicofisico">
                 <transition to="tramite rechazado" name="no apto definitivo"></transition>
                 </state>
                
                 <end-state name="fin tramite"></end-state>
                
                 <end-state name="tramite rechazado"></end-state>
                
                </process-definition>


                The following java code calls the ActionHandler:

                public void avanzarProceso(Long idProcessInstance)
                 {
                 JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
                 GraphSession graphSession = jbpmContext.getGraphSession();
                
                 try
                 {
                 ProcessInstance instanciaProceso = graphSession.getProcessInstance(idProcessInstance);
                 Token token = instanciaProceso.getRootToken();
                 System.out.println("Nodo Actual --> " + token.getNode().getName());
                 token.signal();
                 System.out.println("Nodo Actual --> " + token.getNode().getName());
                 jbpmContext.save(instanciaProceso);
                 }
                 finally
                 {
                 jbpmContext.close();
                 }
                 }
                


                And the ActionHandler code is:


                public void execute(ExecutionContext executionContext) throws Exception
                 {
                 System.out.println("Nodo Actual --> " + executionContext.getNode().getName());
                
                 List etiquetas = JBPMUtil.obtenerNombreTransiciones( executionContext.getToken() );
                 TaskInstance tarea = executionContext.getProcessInstance().getTaskMgmtInstance().createTaskInstance(executionContext.getTask());
                 tarea.setVariable("etiquetaBotones", etiquetas);
                 System.out.println("Tarea Nodo --> " + tarea.getName());
                 tarea.end();
                 }
                


                And the problem is mentioned following the url gave in previous message.

                If you need more information, please tell me.

                Thank you very much.

                • 5. Re: Signalling Option
                  kukeltje

                  Victor,

                  Unfortunately this is not a unit test, nor does it have the processdefinition embedded in it. It also does not have the actionhandler as an inner class. You can have a look at the jbpm unit tests to see how this can be done.

                  The reason I mention this is that making this executable would take way to much of my precious time. I even doubt it will run at all since I do not know which class the actionhandler is and the processdefinition shows more than one. So I will not attempt to run this.

                  On the other hand you might be lucky. You seem to use jBPM completely wrong, in a way even that is not shown anywhere. In the node enter you *END* the task.... Again... look the the jbpm testcases how you should write unit tests that end tasks....

                  • 6. Re: Signalling Option
                    victorl

                    Hi Ronald and thank you once again.

                    Excuse me, I had to put the class of the execute method. It is ObtenerTransiciones.

                    You say: You seem to use jBPM completely wrong, in a way even that is not shown anywhere. Is all my example wrong ? :(

                    Where I can get documentation about how to use jBPM ? The user guide is only a conceptual. So I would need a paper that link the concepts.

                    Thank you Ronald.
                    Regards,

                    Victor

                    • 7. Re: Signalling Option
                      victorl

                      What I need is that the task node controlar documentacion
                      (

                      <task-node name="controlar documentacion">
                      ) does not resume the process execution.

                      So, I set the task Control de Documentacion with signalling to false:
                      <task name="Control de Documentacion" signalling="false">


                      I recognize that (maybe) we are using jBPM in unusual way. But we believe it is good for our objetive.

                      Thanks once again.
                      Regards,

                      Victor

                      • 8. Re: Signalling Option
                        victorl

                        Ronald, I have resolved the problem as follow:

                        <task-node name="controlar documentacion" signal="never" create-tasks="false">
                         <task name="Control de Documentacion">
                         <controller></controller>
                         </task>
                         <event type="node-enter">
                         <action class="ar.com.dsv.saslc.seguimiento.workflow.jbpm.handlers.alta.ObtenerTransiciones" name="obtenerNombreTransiciones"></action>
                         </event>
                         <transition to="examen psicofisico" name="Completo"></transition>
                         <transition to="agendar ctrl documentacion" name="No Completo"></transition>
                        </task-node>


                        Thus (in red), task node does not resume the process execution and task is not instanced.

                        It seen perhaps unusual and an uncommon behavior, but this is that we need.

                        If you want to comment anything, it will be welcome.

                        Thank you very much.
                        Regards

                        Victor

                        • 9. Re: Signalling Option
                          kukeltje

                          it's not the (not) signalling that is unusual, it is the task-end from the action in a node enter where you also create the task. It must be possible to model the behaviour you need in a more transparant, normal way. The reason I mention this is that this behaviour is not officially supported and might not be there in next releases.