|
From: <jm...@so...> - 2001-10-26 14:33:59
|
I would say more.
Shouldn't be the transactions properties of the activities ??
What do you think about this change:
Put the transactions objects inside the activity
Deleting the "_From" property of the _ACTIVITY_ (Think about it, Myself I
am not sure... Or maybe the _From could be poiting to an activity, not a
transaction.
I think this way the problem is better modeled.
On Sat, 20 Oct 2001, Vincenzo Di Somma wrote:
> I think the main problem with this kind of operations is that we use
> "folder" to subclass all the workflow objects (except trasitions)and try
> to use its CopySupport methods, but it doesn`t satisfy our requirements.
> Now we need to refactor the structure of workflow objects, customizing
> method for cut, paste, copy and delete operations.
>
> Juli=E1n Mu=F1oz Dom=EDnguez wrote:
>
> > Actually to copy a workflow you have to copy first the transactions, an=
d
> > after the activities.
> > There is also problems when deleting some elements.
> >
> > I think this is garbaging the workflow, when you copy, or rename it.
> >
> > Attached is are 2 patches, for activity.py and transaction.py, do you l=
ike
> > it?
> >
> > In transaction.py in mange_afterAdd there is some try: expcept:, maybe =
it
> > is possible to subsitute them with hasattr ??? (don't know if there are
> > here for another reason)
> >
> >
> >
> >
> >
> > -----------------------------------------------------------------------=
-
> >
> > *** transaction.py.original_sin_cambiar_manager_aferAdd=09Fri Oct 19 13=
:40:27 2001
> > --- transaction.py=09Fri Oct 19 13:49:49 2001
> > ***************
> > *** 68,75 ****
> > --- 68,77 ----
> >
> > def manage_beforeDelete(self, item, container):
> > if self._From:
> > + if hasattr(container, self._From):
> > getattr(container, self._From).removeTo(item.id)
> > if self._To:
> > + if hasattr(container, self._To):
> > getattr(container, self._To).removeFrom(item.id)
> >
> >
> >
> >
> > -----------------------------------------------------------------------=
-
> >
> > *** activity.py.original_sin_cambiar_manage_afterAdd=09Fri Oct 19 13:40=
:04 2001
> > --- activity.py=09Fri Oct 19 13:51:52 2001
> > ***************
> > *** 79,86 ****
> > --- 79,88 ----
> >
> > def manage_afterAdd(self, item, container):
> > for transaction_id in self._To:
> > + if hasattr(self.aq_parent, transaction_id):
> > getattr(self.aq_parent, transaction_id).setFrom(self.id)
> > for transaction_id in self._From:
> > + if hasattr(self.aq_parent, transaction_id):
> > getattr(self.aq_parent, transaction_id).setTo(self.id)
> > Folder.manage_afterAdd(self, item, container)
> >
> > ***************
> > *** 94,101 ****
> > --- 96,105 ----
> >
> > # 2) Delete transaction links to the activity
> > for transaction_id in self._To:
> > + if hasattr(self.aq_parent, transaction_id):
> > getattr(self.aq_parent, transaction_id).setFrom()
> > for transaction_id in self._From:
> > + if hasattr(self.aq_parent, transaction_id):
> > getattr(self.aq_parent, transaction_id).setTo()
> >
> > # 3) Handle contained objects deletion
> >
>
>
>
--=20
__o
_ \<_
(_)/(_)
Saludos de Juli=E1n
EA4ACL
-.-
|