Connector output to ProcessVariable and then to connector input

1
0
-1

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,

2 answers

1
+1
-1
This one is the BEST answer!

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.

Comments

Submitted by vivek.paranthaman on Mon, 01/11/2016 - 15:22

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..

Submitted by Sean McP on Mon, 01/11/2016 - 19:15

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

Submitted by vivek.paranthaman on Mon, 01/11/2016 - 19:49

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,

Submitted by Sean McP on Tue, 01/12/2016 - 03:51

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

Submitted by vivek.paranthaman on Tue, 01/12/2016 - 08:00

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

1
+1
-1

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.

Comments

Submitted by vivek.paranthaman on Tue, 01/12/2016 - 13:50

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...!?..:)

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...!

Notifications