2 Replies Latest reply on Oct 5, 2006 11:28 AM by Cutberto Ocampo

    how finish a task?

    auré manga Novice

      Hello,

      I created a processdefinition:

      "<process-definition name='simple'>"+
       "<swimlane name='FONCIA' >"+
       "<assignment expression='user(bert)'/>"+
       "</swimlane>"+
      
       "<swimlane name='Assurimo' >"+
       "<assignment expression='user(ernie)'/>"+
       "</swimlane>"+
      
       "<start-state name='start' end-tasks = 'true' >"+
       "<task swimlane='FONCIA'>"+
       "</task>"+
       "<transition name='' to='Identification'>"+"</transition>"+
       "</start-state>"+
       "<end-state name='end'>"+"</end-state>"+
       "<task-node name='Identification'>"+
       "<task swimlane='Assurimo'end-tasks = 'true'>"+
       "<controller>"+
       "<variable name='Nom' />"+
       "<variable name='NumClient' />"+
       "</controller>"+
       "</task>"+
       "<transition name='renseigne' to='renseignementclient'>"+"</transition>"+
       "</task-node>"+
       "<task-node name='renseignementclient'>"+
       "<task swimlane='FONCIA' >"+
       "<controller>"+
       "<variable name='Nom' />"+
       "<variable name='Prénom' />"+
       "<variable name='Adresse'/>"+
       "<variable name='ville'/>"+
       "<variable name='codepostal'/>"+
       "<variable name='NumTel'/>"+
       "<variable name='etablissementScolaire'/>"+
       "</controller>"+
       "</task>"+
       "<transition name='valide' to='Validation'>"+"</transition>"+
       "</task-node>"+
       "<task-node name='Validation' >"+
       "<task swimlane='FONCIA'>"+
       "</task>"+
       "<transition name='oui' to='remplisform'>"+"</transition>"+
       "<transition name='non' to='renseigerr'>"+"</transition>"+
       "</task-node>"+
       "<task-node name='remplisform' >"+
       "<task swimlane='FONCIA'>"+
       "<controller>"+
       "<variable name='Informationcomplementaire' />"+
       "</controller>"+
       "</task>"+
       "<transition name='' to='verficationinfo'>"+"</transition>"+
       "</task-node>"+
       "<task-node name='verficationinfo'>"+
       "<task swimlane='FONCIA' >"+
       "</task>"+
       "<transition name='oui' to='traitementeffectué'>"+"</transition>"+
       "<transition name='non' to='information erroné'>"+"</transition>"+
       "</task-node>"+
       "<task-node name='traitementeffectué'>"+
       "<task swimlane='FONCIA' >"+
       "</task>"+
       "<transition name='' to='end'>"+"</transition>"+
       "</task-node>"+
       "<task-node name='information erroné'>"+
       "<task swimlane='FONCIA' >"+
       "</task>"+
       "<transition name='' to='remplisform'>"+"</transition>"+
       "</task-node>"+
       "<task-node name='renseigerr'>"+
       "<task swimlane='FONCIA' >"+
       "</task>"+
       "<transition name='' to='renseignementclient'>"+"</transition>"+
       "</task-node>"+
       "</process-definition>"
      


      When I execute a taskinstance after I use token.signal() in order to pass to the next task. but when I print the unfinished tasks thanks to
      processinstance.getTaskMgmtInstance().getUnfinishedTasks(token);

      I have ever the task that I have just finished to execute. How can I put this task finished?

      thank you for your help

      antitrust1982

        • 1. Re: how finish a task?
          auré manga Novice

          when I "end" the task the task disapear of my list of unfinished task. The problem with that is if I do a : task.end(); we arrived in the end task and so I cna execute my process, because the other tasks are finished too.

          Somebody can help me to finish a task to pass to the next one, without finished all the tasks of the process.

          thank you

          • 2. Re: how finish a task?
            Cutberto Ocampo Newbie

             

            "antitrust1982" wrote:
            when I "end" the task the task disapear of my list of unfinished task. The problem with that is if I do a : task.end(); we arrived in the end task and so I cna execute my process, because the other tasks are finished too.

            Somebody can help me to finish a task to pass to the next one, without finished all the tasks of the process.

            thank you


            You need to get a reference to the token, and then use the "signal" method to end the task.