Multi-Instantiate A Task [Resolved]

1
0
-1

bonjour;
j'ai une activités se répète pour être exécuté une et une seule autre fois lors d'une petite recherche j'ai trouvé que je doit utiliser le type Multi Instanciée mais j'arrive pas à trouver la solution pour déclarer la cardinalité d' exécution une seule fois
je vous remercie

3 answers

1
0
-1

thanks a lot for your help Sean ;
I respected your remarks on my work
But I have a problem in this step :Select your LIST variable for Input List
i don't found my variable List in the list
in addition Can you please explain to me more What are the options of the variable List

Regard
 

1
0
-1

Thank you very much for your answer yes it's quite what i need a task will be executed only once can help me how to do this problem!!!
thank you for your help

1
0
-1

from Google Translate:

I have one activity repeated to be executed one and one more time during a small search I found that I must use the Multi Instantiated type but I can not find the solution to declare the cardinality of execution Only once

De Google Translate:

Pas sûr de la traduction de Google, mais lorsque nous avons une tâche qui doit être exécutée un certain nombre de fois, 0, 1, 2, 3 ou plus, nous sommes toujours une LISTE.

Une liste a l'avantage d'être vide - exécuter zéro fois, ou avoir un nombre d'entrées 1, 2, 3 ou plus. Cela permet une liberté totale sur la tâche à exécuter comme vous le souhaitez.

Cordialement
Seán

PS: Comme cette réponse offre une réponse à votre question, et si vous l'aimez, merci Mark UP et / ou résolu.

Original Answer:

Not sure about the Google translation but when we have a task that needs to be executed a number of time, 0, 1, 2, 3, or more for that matter, we always us a LIST.

A list has the advantage of being empty - execute zero times, or having a number of entries 1, 2, 3 or more. This allows total freedom on the task to execute as you want.

regards
Seán

PS: As this reply offers an answer your question, and if you like it, please Mark UP and/or as Resolved.

Comments

Submitted by foufoukahloun on Sat, 04/08/2017 - 21:24

Thank you very much for your answer yes it's quite what I need a task will be executed only once can help me how to do this problem
thank you for your help

Submitted by Sean McP on Sat, 04/08/2017 - 21:39

a task that will be executed only once? Then you just need to add it to the stream and it will only ever execute once.

However to do Multi-Instantiation for completeness:

Add a LIST variable to your Pool data tab
Click on your Task
In General Tab select Iteration
Select Parallel or Sequential based on need
Select Create instances from a list
Select your LIST variable for Input List

and that's about it...

You have to add something to your list for it to execute 1, 2, 3 times etc. otherwise an empty list will never execute.

Have a look at all the options you may find one better to your needs rather than this, but it works very well,

regards

Submitted by foufoukahloun on Wed, 04/19/2017 - 01:04

Good evening SEAN
Can you please help me for this problem I try several times but still without solution
In fact I followed your steps; but a have a problem in this step (Select your LIST variable for Input List) i don't found my variabme mist from the list
Can you please help me in this simple example
My goal that transition "modif "will be executed one and only once
my example

thank you so much for your help
best regard

Submitted by Sean McP on Wed, 04/19/2017 - 07:58

no file...

Submitted by foufoukahloun on Wed, 04/19/2017 - 11:25

thank you for your help sean,
this is my example
Best Regard
fouzia
my example

Submitted by Sean McP on Wed, 04/19/2017 - 21:37

Now I've seen the example I can see many ways to do this.

However this is the way I would do it for this case

Remove Multi-Instantiation from Étape2 - it's not necessary
In Étape1 Form desicion1 -> Data change script for choix values to

  1. if(desicion.equalsIgnoreCase("modif")){
  2. return ["rejet","accept"]
  3. }
  4. else{
  5. return ["rejet","accept","modif"]
  6. }

This will allow the modif to happen only once and after its completed once, it cannot be selected again.

Hope this helps

regards

Submitted by foufoukahloun on Thu, 04/20/2017 - 22:45

first of all thank you so much for your help Sean;
I respected your steps, But the process execute only for the step 1 and will be bloked after the choice of (modify or reject or accept)
NB: if user has chosen modif transition it will return to etape1 and thus this case it can choose for the second time except the transition of rejet or accept and not modif
Regards my example modified

Submitted by Sean McP on Thu, 04/20/2017 - 23:00

Sorry if I was not clear,

Remove the code you added to the transition from Étape1 to Porte1 (click on the line -> General -> Condition -> ERASE)
Goto PAGEFLOW
Edit the page Étape1
Click Radio Button box Desicion
Select the Data Tab
Edit the script for Available Values (choix values) currently you have ["rejet","accept","modif"]
replace this with the new code

  1. if(desicion.equalsIgnoreCase("modif")){
  2. return ["rejet","accept"]
  3. }
  4. else{
  5. return ["rejet","accept","modif"]
  6. }

This should get you working,

regards

Submitted by foufoukahloun on Thu, 04/20/2017 - 23:13

I modified my example but unfortunately it is not executable after "etape1"
regards
my example modified 2

Submitted by Sean McP on Fri, 04/21/2017 - 01:25

What version of Bonitasoft are you using 6 or 7? full number to help me gett he right one...

regards
Seán

Submitted by Sean McP on Fri, 04/21/2017 - 02:17

Doesn't matter, I used 6.5.0...

Use code:

  1. if(desicion != null && !desicion.isEmpty()) {
  2. if(desicion.equalsIgnoreCase("modif")){
  3. return ["rejet","accept"]
  4. }
  5. else{
  6. return ["rejet","accept","modif"]
  7. }
  8. }
  9. else{
  10. return ["rejet","accept","modif"]
  11. }

This makes sure a null value is also tested,

regards

Submitted by foufoukahloun on Fri, 04/21/2017 - 17:33

dear Sean ;
Thank so much for your help ;
it's resolved
Best Regards
Fouzia

Submitted by foufoukahloun on Sat, 04/29/2017 - 23:07

Dear Sean ;
first of all thank so much for your help ;
I have a problem its works when we have only one pool but not for many pool
can you please help me for this problem any modification for this example !!
Best Regards
Fouzia
test

Permalink Edit

Submitted by Sean McP on Sun, 04/30/2017 - 02:42

Of course not, you've changed the design, and by doing so you've disabled the capability of doing what you want.

In this case I would change as follows:

Add variable decision to Étape1
Send this as part of the message ms1
then use this in your second pool

When you send ms3 from Étape5 you should also include decision

so you can send it back to Étape1.

regards
Seán

Submitted by foufoukahloun on Mon, 05/01/2017 - 00:21

Dear Sean ;
Thank soooo much for your help;
it's resolved !!!!
Best Regards
Fouzia

Testing
Notifications