workflow workitem objects

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

workflow workitem objects

Alexandre Fayolle - camptocamp
Hello,

I'm currently investigating an issue with the workflow of
stock.pickings, and inserting debugging statements in
openerp/workflow/*.py shows some weird things.

One of the symptoms I'm facing involves lots of workitems being created
and never deleted for the workflow instance of some pickings. As a
result I get

# select inst_id, count(id) from wkf_workitem group by inst_id order by
count(id) desc, inst_id desc LIMIT 10;
 inst_id | count
---------+-------
     672 |   513
    6188 |   321
    5244 |    65
    2898 |    65
    2261 |    65
    1962 |    65
    1817 |    65
    1715 |    65
    1214 |    65
     993 |    65
(10 rows)

and running trg_write on the associated stock.pickings can take
considerable time (and under some conditions which are still not clear
to me, create more wkf_workitem lines for the workflow instance).

All the wkf_item lines have the same act_id and are in the same state
('complete'). There are no wkf_triggers associated with any of the lines.


1. Is there some kind of documentation explaining the design of
workflows in OpenERP? Anything along these lines would be a huge
timesaver for me, rather than trying to figure out things from the code.

2. Are there any tools / modules helping diagnose Workflow issues

3. I think it could be safe for me to remove all the wkf_workitem lines
but one for the stock.picking workflow instances since they are all
identical. Can anyone confirm this?

--
Alexandre Fayolle
Chef de Projet
Tel : + 33 (0)4 79 26 57 94

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac Cedex
http://www.camptocamp.com


_______________________________________________
Mailing list: https://launchpad.net/~openerp-expert-framework
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-expert-framework
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: workflow workitem objects

Joël Grand-Guillaume @ CampToCamp
Hi Alexandre,


The answers I have:

1) I know about no documentation

2) We have scripts (ask Vincent) to rebuild them correctly based on a given state for a given object

3) I confirm you can do this !

Regards,

Joël




On Tue, Jan 7, 2014 at 12:31 PM, Alexandre Fayolle <[hidden email]> wrote:
Hello,

I'm currently investigating an issue with the workflow of
stock.pickings, and inserting debugging statements in
openerp/workflow/*.py shows some weird things.

One of the symptoms I'm facing involves lots of workitems being created
and never deleted for the workflow instance of some pickings. As a
result I get

# select inst_id, count(id) from wkf_workitem group by inst_id order by
count(id) desc, inst_id desc LIMIT 10;
 inst_id | count
---------+-------
     672 |   513
    6188 |   321
    5244 |    65
    2898 |    65
    2261 |    65
    1962 |    65
    1817 |    65
    1715 |    65
    1214 |    65
     993 |    65
(10 rows)

and running trg_write on the associated stock.pickings can take
considerable time (and under some conditions which are still not clear
to me, create more wkf_workitem lines for the workflow instance).

All the wkf_item lines have the same act_id and are in the same state
('complete'). There are no wkf_triggers associated with any of the lines.


1. Is there some kind of documentation explaining the design of
workflows in OpenERP? Anything along these lines would be a huge
timesaver for me, rather than trying to figure out things from the code.

2. Are there any tools / modules helping diagnose Workflow issues

3. I think it could be safe for me to remove all the wkf_workitem lines
but one for the stock.picking workflow instances since they are all
identical. Can anyone confirm this?

--
Alexandre Fayolle
Chef de Projet
Tel : + 33 (0)4 79 26 57 94

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac Cedex
http://www.camptocamp.com


_______________________________________________
Mailing list: https://launchpad.net/~openerp-expert-framework
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-expert-framework
More help   : https://help.launchpad.net/ListHelp



--


camptocamp
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

Joël Grand-Guillaume
Division Manager
Business Solutions

+41 21 619 10 28



_______________________________________________
Mailing list: https://launchpad.net/~openerp-expert-framework
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-expert-framework
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: workflow workitem objects

Alexandre Fayolle - camptocamp
I experimented a bit further with 3, and after fixing my database, the
good news is that running the operation which was previously creating
more workitems no longer does (analysis showed that the number of
workitems for a given instance after a run was 2*n-1 where n is the
number of workitems before the run. When n is 1, this still applies,
but is quite stable).

I have no real idea what caused n to become different from 1 in the
first place. I'll monitor the instance, for this.

--
Alexandre



On mar. 07 janv. 2014 16:02:41 CET, Joël Grand-Guillaume wrote:

> Hi Alexandre,
>
>
> The answers I have:
>
> 1) I know about no documentation
>
> 2) We have scripts (ask Vincent) to rebuild them correctly based on a
> given state for a given object
>
> 3) I confirm you can do this !
>
> Regards,
>
> Joël
>
>
>
>
> On Tue, Jan 7, 2014 at 12:31 PM, Alexandre Fayolle
> <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hello,
>
>     I'm currently investigating an issue with the workflow of
>     stock.pickings, and inserting debugging statements in
>     openerp/workflow/*.py shows some weird things.
>
>     One of the symptoms I'm facing involves lots of workitems being
>     created
>     and never deleted for the workflow instance of some pickings. As a
>     result I get
>
>     # select inst_id, count(id) from wkf_workitem group by inst_id
>     order by
>     count(id) desc, inst_id desc LIMIT 10;
>      inst_id | count
>     ---------+-------
>          672 |   513
>         6188 |   321
>         5244 |    65
>         2898 |    65
>         2261 |    65
>         1962 |    65
>         1817 |    65
>         1715 |    65
>         1214 |    65
>          993 |    65
>     (10 rows)
>
>     and running trg_write on the associated stock.pickings can take
>     considerable time (and under some conditions which are still not clear
>     to me, create more wkf_workitem lines for the workflow instance).
>
>     All the wkf_item lines have the same act_id and are in the same state
>     ('complete'). There are no wkf_triggers associated with any of the
>     lines.
>
>
>     1. Is there some kind of documentation explaining the design of
>     workflows in OpenERP? Anything along these lines would be a huge
>     timesaver for me, rather than trying to figure out things from the
>     code.
>
>     2. Are there any tools / modules helping diagnose Workflow issues
>
>     3. I think it could be safe for me to remove all the wkf_workitem
>     lines
>     but one for the stock.picking workflow instances since they are all
>     identical. Can anyone confirm this?
>
>     --
>     Alexandre Fayolle
>     Chef de Projet
>     Tel : + 33 (0)4 79 26 57 94
>
>     Camptocamp France SAS
>     Savoie Technolac, BP 352
>     73377 Le Bourget du Lac Cedex
>     http://www.camptocamp.com
>
>
>     _______________________________________________
>     Mailing list: https://launchpad.net/~openerp-expert-framework
>     Post to     : [hidden email]
>     <mailto:[hidden email]>
>     Unsubscribe : https://launchpad.net/~openerp-expert-framework
>     More help   : https://help.launchpad.net/ListHelp
>
>
>
>
> --
>
>
> *camptocamp*
> INNOVATIVE SOLUTIONS
> BY OPEN SOURCE EXPERTS
>
> *Joël Grand-Guillaume*
> Division Manager
> Business Solutions
>
> +41 21 619 10 28
> www.camptocamp.com <http://www.camptocamp.com/>
>
>



--
Alexandre Fayolle
Chef de Projet
Tel : + 33 (0)4 79 26 57 94

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac Cedex
http://www.camptocamp.com


_______________________________________________
Mailing list: https://launchpad.net/~openerp-expert-framework
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-expert-framework
More help   : https://help.launchpad.net/ListHelp
Loading...