I have some nested objects arranged like this:
- Process
- Persons
- Workflows
- Tasks
So you have one Process. Then multiple Persons can be added to and multiple WorkFlows can be added Process as well. Multiple Tasks can be added to each WorkFlow but I need a way to tie which Person is doing each task. I basically need a way that for each Person added to the Process it, in it’s constructor, assigns a Person.ID property that can then be assigned into each Task’s PersonID property…
Dim myProcess as New Process()
Dim myPerson as New Process.Person()
myProcess.AddPerson(myPerson)
Dim myWorkFlow as New Process.WorkFlow()
Dim myTask as New Process.WorkFlow.Task()
myTask.PersonID = myPerson.ID '<--- AutoID was populated as soon as myPerson was created
myWorkFlow.AddTask(myTask)
myProcess.AddWorkFlow(myWorkFlow)
Here’s a PasteBin of some pseudo-code: http://pastebin.com/0r9rnUjz
I used a Guid instead like Chris Haas suggested in the comments.