Connector output to ProcessVariable and then to connector input

Hi,

I have a connector which sets the output to a ProcessVariable of type List.
Is there any way to loop a process (secondConnector) until the input processVariable data index becomes 0… ? and dynamically stores each value to another processVariable(used as an input for looping/second process)…

Thanks,

What you need to do here is use a Multi-Instantiation task.

Assuming 7.1.x

  1. Add a task,
  2. In General->Iteration
  3. Select Create Instances from a List
  4. Select your list as input
  5. give the iterator a name and type

That’s it all done. The task will now execute the number of times in the list…

regards
Seán

PS: If this reply answers your question, please mark a resolved.

Here you go…

a working example of Multi-Instantiation…

https://www.dropbox.com/s/0hzpvj0asjk6oka/MultiInstan-1.0.bos?dl=0

Done in 7.1.3 so will work in anything above that.

Just open and execute, click OK on the form and then look at the Engine Log…

One, Two, 3, Quattro, funf

regards
Seán

PS: If this reply answers your question, please mark a resolved.

Hi,

I am glad that 50% of the question has been cleared, as I have mentioned in the heading, now I have edited the question as well.

NB: Looping can be done, in simple loop.
in script we can give the max count by accessing the list.size()

The challenge is extracting the data, as it accepts only local level processVariables to store each instance output…

Nope, not sure I understand…when using Multi-Instan the data is the iterator as in step 5.

Try the Multi-Instan and see if it meets your requirements, it is extremely powerful. If it still doesn’t can you be a bit clearer?

regards

example:

start-----> process1(gives output as List)-----> process2(loops until list.size)(takes input values as list[0], list[1]…etc.)------->end

here the input type for the second process should be single values, it should not be a list again.

Thanks in advance,

Yes exactly as I said.

create your multi-instan an iterator name and type, and that is your single value. Which you can then use in the multi-Instan task…it works exactly as you are asking it too.

Believe me, I use it a lot…

regards
Seán

sorry it doesn’t work, as the above method doesn’t iterates over the list, it just loops till the size of list.
As it takes only first value from the list every time when it loops.
ie;… only list[0].
can you share an example so that I can make a clear approach if I am doing wrong…!
Thank you

Thank you,

How to get the values applied to the next services task?.. this completes the question!

have to do a little work around in script to get the value…!?..:slight_smile:

The problem is, it takes only one list, if there are multiple list variables, configured as inputs, iteration happens only for one.
if in case the other values also have to be done… its possible or not…!