However, this form is in a For Each activity and it has to be opened for each item in a list, but when it goes to the next item, the complete sequence stops.
Unfortunately it contains confidential information and a xml file is deserialized in another sequence and used in the For Each sequence.
Though I can explain what the process does :
A For Each activity reads the deserialized xml file nodes and check if a tag contains a certain value
Into the for each activity there is a Create Form activity. This form contains two textboxes, which have to be completed by the user. When the first form is submitted (it has more than one tag concerned), the execution of my project stops completely.
I hope my explanation is clear (I am non-english speaking).
Keep a message box and check the for each is happening properly or not. you can Comment Out the form and check for each activity is looping fine or not.
I think this is not a bug, it is just the way how your form is created and handled during the runtime. Probably we can think about it as if the first time Create From activity executed the form engine is created and the form is shown to the user and after user clicks submit the form is not really closed but just set to hidden, and if the code reaches and executes the Create From activity second time it does nothing because the form is still in the memory in the hidden state.
Userforms in VBA behave in the close to same manner.
Possible workaround is to treat our Create From activity itself as a loop. We need to have a logic to iterate the list with a counter and in the form we should have the elements that are displayed when there are still items in the list, and the elements that are displayed when after the last item in the array is reached.
Check the following workflow for possible solution: CreateFormLoop.xaml (13.5 KB)
There are values I want to show in the form (from the node), so if I do that way this won’t change for the next form right ?
To answer to @Nithinkrishna, I have 5 to 6 items (depends on the xml file it deserializes).
For each of these items I need to collect the values that I enter in the textboxes.
@ludovic.vetter Can you provide Screenshots of the Form or of the Workflow built, so that we can get a better understanding of the flow ? The Logic Seems to be possible with UiPath Forms
@ludovic.vetter I was surprised to also witness the behaviour of forms in that way though I had remembered I had done something similar to it in the past. But there I had made use of RE Framework to iterate over the data and present it in the loop. Similar to that I do not know actually why the Forms behave in that way, Maybe as @andrey.egorov mentioned it does go hidden for the remaining iterations. It is really surprising though
Although I had made a workaround as well using a Separate Workflow for the Form Activity. An Example Workflow is given below: