[Erp5-dev] Hardcoded workflow_id in ZODB scripts are problematic...aren't they?

Yoshinori Okuji yo at nexedi.com
Tue Oct 30 03:44:06 CET 2007


On Friday 26 October 2007 16:48, Łukasz Nowak wrote:
> Hello,
>
> I've managed transition from original workflow names (eg.
> accounting_workflow) to our own workflow names (eg.
> ventis_accounting_workflow).
>
> What I found right now is that there are many places, where workflow_id
> is hardcoded, using such grep from fetched Nexedi's BT:
>
> find . -type f | grep -v \\.svn | xargs grep wf_id

A faster way: grep -r --include="*.xml" wf_id .

> Right now I'm putting hardcoded our workflow id, but isn't it a
> problem? I know, it might be sometimes quite hard do dynamically fetch
> workflow id from some context (eg. to choose simulation state on report
> dialog).
>
> Is it known bug/feature/unresolved problem?

Most probably, they are wrong. However, they are also difficult to fix cleanly 
in the current implementation. One day, when we start to use interfaces 
appropriately, this would be solved.

YO
-- 
Yoshinori Okuji, Nexedi CTO
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Full Featured High End Open Source ERP
http://www.erp5.com
ERP5 Wiki: Developer Zone for ERP5 Community
http://www.erp5.org



More information about the Erp5-dev mailing list