Hi Kevin!
As mentioned in another post, I've uploaded a simplified version of what I'm
trying to do [1]
The idea:
A ToDoItem might have associated with it an execution plan with tasks. The plan
is something like
go somewhere
do that
go somewhere else
and do something else
Several execution plans are generated and the user should select one to
fullfill the ToDoItem. For 'Buy Milk' it could be
(1) - Go to the supermarket
get some milk
pay for the milk
go home
(2) - Go to the farm
milk a cow
pay the farmer
go home
etc. etc.
In short:
class ExecutionPlan{
List<ArrayList> getTasks();
}
class Task{
properties where and what
}
class ExecutionPlanService {
List<ExecutionPlan> getExecutionPlans(ToDoItem td);
// to generate candidates of execution plans
}
class ToDoItem{
setExecutionPlan(executionPlan ep);
List<ExecutionPlan> choicesExecutionPlan(){
return executionPlanService.getExecutionPlans(this);
}
}
I've introduced another class
@NonPersistable
ExecutionPlanChooser{
......
public List<ExecutionPlan> choicesExecutionPlan(){
return eps.getExecutionPlans(toDoItem);
}
.....
}
trying to follow a Process Object Pattern (from Dan's book).
In ExecutionPlanChooser the choicesExecutionPlan() is called 34 times before I
even hit the drop-down list once.
To run what is there:
- install the fixtures
- Select 'all not completed yet'
- Select a ToDoItem
- Click on 'Choose Execution Plan' (in the upper right corner)
- Edit the displayed ExecutionPlanChooser
- Select an execution plan from the drop down list (there are 34*3 now already)
- click OK
- Click on 'Do It' in the upper right corner. That will attach the selected
execution plan to the ToDoItem.
Next time someone tries to choose an execution plan, there will be 69*3
execution plans to choose from. :-(
I'm obviously on the wrong track, but I'm out of ideas now.
Any help is very much appreciated
Christian
[1] https://github.com/chris58/ToDoItemExecutionPlan.git
________________________________________
From: Kevin Meyer - KMZ [[email protected]]
Sent: Monday, February 11, 2013 8:39 PM
To: [email protected]
Subject: Re: Porting dddsample app
Hi Christian,
Is this [1] your git location? Have you recently commited what you've
got?
I can take a look, but probably only tomorrow evening..
Regards,
Kevin
[1] https://github.com/chris58/TPM.git
On 11 Feb 2013 at 18:46, Christian Steinebach wrote:
> Hi everybody!
>
> Is it possible (in isis) to achieve anything like the action
> 'Route-This-Cargo' in the dddsample application?
>
> If so, could you roughly outline how that behaviour could be implemented?
> I've tried every solution I could imagine and some more, I'm getting
> desperate.
>
> Christian
>