Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
4 replies
Subscribers
4 subscribers
Views
1515 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
I have a process where a user can select one of two time periods. When they sel
mikec
over 10 years ago
I have a process where a user can select one of two time periods. When they select both time periods those period ids are saved off into a multi-value variable. For this example the time period ids are 36 and 37 and they are saved into a multi-value pv. I pass this variable into a sub-process that is set to run one instance for each item in the multi-value pv. So it runs two instances one for each item in the variable. When you look at the process history I would expect to see that the value for instance one to be 36 and for instance 2 to be 37. However, both instances are passed both values. So when each instance writes to the db it is writing the first value only which is 36. Obviously what I want it to do is write 36 for the first instance that is spawned and write 37 for the second instance that is spawned. Any ideas on what I am doing wrong?
Thanks...
OriginalPostID-120088
OriginalPostID-120088
Discussion posts and replies are publicly visible
0
normanc
over 10 years ago
Are you using the instance index when defining the inputs to the sub-process?
e.g. pv!timePeriodArray[tp!instanceIndex]
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mikec
over 10 years ago
This worked. Didn't know where to get this but once figured that out it worked perfect. Thanks!!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
siddharthg521
over 10 years ago
Hi mike tp!instanceindex is not available in the subprocess node expression editor. However, even when you just write tp!instanceindex there, it would then work as expected.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mikec
over 10 years ago
Yep, that is what I found out.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel