Georges Racinet schrieb:
On Mar 21, 2006, at 11:25 AM, Joachim Schmitz wrote:
this now leads to the real question: why is "before_script" invalid ?
I looked at the CPSDefault-profiles and the definition.xml also
contain before_script. Also the WAeUP-profile was created by creating
a snapshot and copying the xml-files to WAeUP/profiles/default
Code extract around where the error is raised (DCWorkflow/exportimport.py):
def _getNodeAttribute( node, attr_name, encoding=None ):
""" Extract a string-valued attribute from node.
"""
value = _queryNodeAttribute( node, attr_name, _marker, encoding )
if value is _marker:
raise ValueError, 'Invalid attribute: %s' % attr_name
return value
and also
def _queryNodeAttribute( node, attr_name, default, encoding=None ):
""" Extract a string-valued attribute from node.
o Return 'default' if the attribute is not present.
"""
So I think it's a fair bet that it's simply missing (assuming there
isn't a hidden bug). That's why I said that the error could be more
explicit.
Now if you did it with a snapshot and it's really missing, this is
problematic and should be qualified as an export bug.
with the debugger I get:
(Pdb) node.tagName
u'transition'
(Pdb) node._attrs[u'transition_id'].value
u'close'
in workflows/waeup_workspace_wf/definition.xml there was no transition
with transition_id = "close", I inserted :
<transition transition_id="close" title="" new_state=""
trigger="USER" before_script="" after_script="">
<guard>
</guard>
</transition>
save it and retried import with the same result.
--
Mit freundlichen Grüßen Joachim Schmitz
......................................................................
AixtraWare eK ..Joachim Schmitz ..www.aixtraware.de ..t: +49-2464-8851
Hüsgenstr. 33a .....d-52457 Aldenhoven .............f: +49-2464-905163
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel