[Erp5-dev] Changing workflow association and restoring document's workflow state
Jérome Perrin
jerome at nexedi.com
Wed Oct 24 15:45:05 CEST 2007
Łukasz Nowak a écrit :
> Hello,
>
> I have to change some important workflow associations (eg. which
> provides simulation_state). I need documents to be moved to same state,
> as they had from association from former workflow.
>
> I've experimented a little with removing workflow association from
> portal type, and I've seen that in Base_viewHistory it is possible to
> fetch history of workflow transitions from old association - even
> reindexing object do not remove this history.
>
> I'll go with below scenario:
> - create my own workflows (ventis_workflow)
> - add special transition from starting state to all possible states
> - ventis_workflow will have all states as original_workflow
> - remove association from old workflow (original_workflow)
> - fetch actual state from original_workflow's history which
> hasn't been deleted
> - jump into fetched state using transition from ventis_workflow
>
> Is my scenario good enough? I'll try to test it as best as possible,
> but any clues are welcome.
Another way is to directly hack the content of workflow_history on those
documents. It's IMHO the easiest, especially if you want to keep history
details (date, comments).
Jérome
More information about the Erp5-dev
mailing list