Best Practice for Entity Deprecation Service

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Best Practice for Entity Deprecation Service

Adrian Crum-2
I need to create a service that runs one time to move records from a deprecated entity to its replacement.

I know I can schedule a job to run only once, but what do I do with the deprecated entity? Do I delete the records in it, so the copying isn't performed again by accident?

-Adrian



     
Reply | Threaded
Open this post in threaded view
|

Re: Best Practice for Entity Deprecation Service

Jacques Le Roux
Administrator
Adrian,

In the sequel I suppose that the task you intend to to is not for OFBiz stock but your own OFBiz version.

From: "Adrian Crum" <[hidden email]>
>I need to create a service that runs one time to move records from a deprecated entity to its replacement.
>
> I know I can schedule a job to run only once, but what do I do with the deprecated entity? Do I delete the records in it, so the
> copying isn't performed again by accident?

I'd to suggest to rename it at the end of the job by adding _old

Jacques

>
> -Adrian
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Best Practice for Entity Deprecation Service

David E Jones
In reply to this post by Adrian Crum-2

Don't worry about having it run in an automated way. The point is just  
to have something around that people can run on a production database  
(generally after testing it on a staging database that is a clone of  
the production database) that will do the data move needed.

In other words, they are to be used as part of a semi-manual upgrade  
process. For many of these things I'm not sure that we would want it  
to be totally automated (for the same reason it's best to run it on a  
staging database first before moving to the production database).  
Because people may customize things or have a different revision than  
they think they do, or whatever, this becomes pretty important.

-David


On Jun 29, 2008, at 9:05 AM, Adrian Crum wrote:

> I need to create a service that runs one time to move records from a  
> deprecated entity to its replacement.
>
> I know I can schedule a job to run only once, but what do I do with  
> the deprecated entity? Do I delete the records in it, so the copying  
> isn't performed again by accident?
>
> -Adrian
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Best Practice for Entity Deprecation Service

David E Jones
In reply to this post by Adrian Crum-2

Oh yeah, for the deleting records part. Similar to the other post: I'd  
leave that to be manual as well. In other words, once they have  
checked that the data is okay and working and such they can just kill  
old tables/columns pretty easily. You could have a separate service to  
do it if you want to have that part of it available in a service.

-David


On Jun 29, 2008, at 9:05 AM, Adrian Crum wrote:

> I need to create a service that runs one time to move records from a  
> deprecated entity to its replacement.
>
> I know I can schedule a job to run only once, but what do I do with  
> the deprecated entity? Do I delete the records in it, so the copying  
> isn't performed again by accident?
>
> -Adrian
>
>
>
>