Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
erp5
Commits
08c079bf
Commit
08c079bf
authored
Jul 21, 2016
by
iv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Workflow: change default_expression to variable_expression for name consistency
parent
b2c418cd
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
52 additions
and
52 deletions
+52
-52
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testWorklist.py
...tTemplateItem/portal_components/test.erp5.testWorklist.py
+1
-1
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/ConfigurationWorkflow_viewVariableList/listbox.xml
...rkflow/ConfigurationWorkflow_viewVariableList/listbox.xml
+1
-1
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/InteractionWorkflow_viewVariableList/listbox.xml
...workflow/InteractionWorkflow_viewVariableList/listbox.xml
+1
-1
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/TransitionVariable_view.xml
...em/portal_skins/erp5_workflow/TransitionVariable_view.xml
+1
-1
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/TransitionVariable_view/my_variable_expression.xml
...rkflow/TransitionVariable_view/my_variable_expression.xml
+1
-1
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/Variable_view.xml
...TemplateItem/portal_skins/erp5_workflow/Variable_view.xml
+1
-1
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/Variable_view/my_variable_expression.xml
...ns/erp5_workflow/Variable_view/my_variable_expression.xml
+1
-1
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/Workflow_init.xml
...TemplateItem/portal_skins/erp5_workflow/Workflow_init.xml
+5
-5
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/Workflow_viewVariableList/listbox.xml
...skins/erp5_workflow/Workflow_viewVariableList/listbox.xml
+1
-1
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/WorklistVariable_view.xml
...Item/portal_skins/erp5_workflow/WorklistVariable_view.xml
+1
-1
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/WorklistVariable_view/my_variable_expression.xml
...workflow/WorklistVariable_view/my_variable_expression.xml
+1
-1
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/Worklist_view/listbox.xml
...Item/portal_skins/erp5_workflow/Worklist_view/listbox.xml
+1
-1
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/Variable/variable_expression_property.xml
...property_sheets/Variable/variable_expression_property.xml
+2
-2
product/ERP5Workflow/Document/InteractionWorkflow.py
product/ERP5Workflow/Document/InteractionWorkflow.py
+7
-7
product/ERP5Workflow/Document/Variable.py
product/ERP5Workflow/Document/Variable.py
+1
-1
product/ERP5Workflow/Document/Workflow.py
product/ERP5Workflow/Document/Workflow.py
+15
-15
product/ERP5Workflow/Document/Worklist.py
product/ERP5Workflow/Document/Worklist.py
+4
-4
product/ERP5Workflow/Document/WorklistVariable.py
product/ERP5Workflow/Document/WorklistVariable.py
+2
-2
product/ERP5Workflow/Tool/WorkflowTool.py
product/ERP5Workflow/Tool/WorkflowTool.py
+5
-5
No files found.
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testWorklist.py
View file @
08c079bf
...
...
@@ -148,7 +148,7 @@ class TestWorklist(testWorkflowMixin):
variable_value
=
worklist_variable_value
,
reference
=
worklist_variable_key
)
if
isinstance
(
worklist_variable_value
,
str
)
and
worklist_variable_value
.
startswith
(
'python'
):
worklist_variable
.
set
Default
Expression
(
worklist_variable_value
)
worklist_variable
.
set
Variable
Expression
(
worklist_variable_value
)
def
createDCWorklist
(
self
,
workflow_value
,
worklist_id
,
actbox_name
,
actbox_url
=
None
,
**
kw
):
...
...
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/ConfigurationWorkflow_viewVariableList/listbox.xml
View file @
08c079bf
...
...
@@ -102,7 +102,7 @@
<string>
Available for Catalog
</string>
</tuple>
<tuple>
<string>
default
_expression
</string>
<string>
variable
_expression
</string>
<string>
Expression
</string>
</tuple>
</list>
...
...
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/InteractionWorkflow_viewVariableList/listbox.xml
View file @
08c079bf
...
...
@@ -102,7 +102,7 @@
<string>
Available for Catalog
</string>
</tuple>
<tuple>
<string>
default
_expression
</string>
<string>
variable
_expression
</string>
<string>
Expression
</string>
</tuple>
</list>
...
...
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/TransitionVariable_view.xml
View file @
08c079bf
...
...
@@ -85,7 +85,7 @@
<list>
<string>
my_causality
</string>
<string>
my_variable_value
</string>
<string>
my_
default
_expression
</string>
<string>
my_
variable
_expression
</string>
</list>
</value>
</item>
...
...
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/TransitionVariable_view/my_
default
_expression.xml
→
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/TransitionVariable_view/my_
variable
_expression.xml
View file @
08c079bf
...
...
@@ -8,7 +8,7 @@
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_
default
_expression
</string>
</value>
<value>
<string>
my_
variable
_expression
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
...
...
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/Variable_view.xml
View file @
08c079bf
...
...
@@ -93,7 +93,7 @@
<string>
my_for_status
</string>
<string>
my_automatic_update
</string>
<string>
my_variable_value
</string>
<string>
my_
default
_expression
</string>
<string>
my_
variable
_expression
</string>
</list>
</value>
</item>
...
...
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/Variable_view/my_
default
_expression.xml
→
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/Variable_view/my_
variable
_expression.xml
View file @
08c079bf
...
...
@@ -16,7 +16,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_
default
_expression
</string>
</value>
<value>
<string>
my_
variable
_expression
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
...
...
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/Workflow_init.xml
View file @
08c079bf
...
...
@@ -60,29 +60,29 @@ context.setSourceValue(state)\n
for v, property_dict in (\n
(\'action\', {\n
\'description\': \'Transition id\',\n
\'
default
_expression\': \'transition/getReference|nothing\',\n
\'
variable
_expression\': \'transition/getReference|nothing\',\n
\'for_status\': 1,\n
\'automatic_update\': 1,\n
}),\n
(\'actor\', {\n
\'description\': \'Name of the user who performed transition\',\n
\'
default
_expression\': \'user/getUserName\',\n
\'
variable
_expression\': \'user/getUserName\',\n
\'for_status\': 1,\n
\'automatic_update\': 1,\n
}),\n
(\'comment\', {\n
\'description\': \'Comment about transition\',\n
\'
default
_expression\': "python:state_change.kwargs.get(\'comment\', \'\')",\n
\'
variable
_expression\': "python:state_change.kwargs.get(\'comment\', \'\')",\n
\'for_status\': 1,\n
\'automatic_update\': 1,\n
}),\n
(\'history\', {\n
\'description\': \'Provides access to workflow history\',\n
\'
default
_expression\': \'state_change/getHistory\',\n
\'
variable
_expression\': \'state_change/getHistory\',\n
}),\n
(\'time\', {\n
\'description\': \'Transition timestamp\',\n
\'
default
_expression\': \'state_change/getDateTime\',\n
\'
variable
_expression\': \'state_change/getDateTime\',\n
\'for_status\': 1,\n
\'automatic_update\': 1,\n
}),\n
...
...
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/Workflow_viewVariableList/listbox.xml
View file @
08c079bf
...
...
@@ -102,7 +102,7 @@
<string>
Available for Catalog
</string>
</tuple>
<tuple>
<string>
default
_expression
</string>
<string>
variable
_expression
</string>
<string>
Expression
</string>
</tuple>
</list>
...
...
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/WorklistVariable_view.xml
View file @
08c079bf
...
...
@@ -85,7 +85,7 @@
<list>
<string>
my_reference
</string>
<string>
my_variable_value
</string>
<string>
my_
default
_expression
</string>
<string>
my_
variable
_expression
</string>
</list>
</value>
</item>
...
...
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/WorklistVariable_view/my_
default
_expression.xml
→
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/WorklistVariable_view/my_
variable
_expression.xml
View file @
08c079bf
...
...
@@ -16,7 +16,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_
default
_expression
</string>
</value>
<value>
<string>
my_
variable
_expression
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
...
...
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/Worklist_view/listbox.xml
View file @
08c079bf
...
...
@@ -84,7 +84,7 @@
<string>
Title
</string>
</tuple>
<tuple>
<string>
default
_expression
</string>
<string>
variable
_expression
</string>
<string>
Expression
</string>
</tuple>
<tuple>
...
...
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/Variable/
default
_expression_property.xml
→
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/Variable/
variable
_expression_property.xml
View file @
08c079bf
...
...
@@ -22,7 +22,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
default
_expression_property
</string>
</value>
<value>
<string>
variable
_expression_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
...
...
@@ -30,7 +30,7 @@
</item>
<item>
<key>
<string>
storage_id
</string>
</key>
<value>
<string>
default
_expression
</string>
</value>
<value>
<string>
variable
_expression
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
product/ERP5Workflow/Document/InteractionWorkflow.py
View file @
08c079bf
...
...
@@ -140,13 +140,13 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow):
getSecurityManager
(),
self
,
ob
):
return
default
status
=
self
.
_getStatusOf
(
ob
)
default_expression
=
vdef
.
getDefault
Expression
()
variable_expression
=
vdef
.
getVariable
Expression
()
if
status
is
not
None
and
name
in
status
:
value
=
status
[
name
]
# Not set yet. Use a default.
elif
default
_expression
is
not
None
:
elif
variable
_expression
is
not
None
:
ec
=
createExprContext
(
StateChangeInfo
(
ob
,
self
,
status
))
value
=
Expression
(
default
_expression
)(
ec
)
value
=
Expression
(
variable
_expression
)(
ec
)
else
:
value
=
vdef
.
getVariableValue
()
...
...
@@ -286,9 +286,9 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow):
# Preserve former value
value
=
former_status
[
id
]
else
:
default_expression
=
vdef
.
getDefault
Expression
()
if
default
_expression
is
not
None
:
expression
=
Expression
(
default
_expression
)
variable_expression
=
vdef
.
getVariable
Expression
()
if
variable
_expression
is
not
None
:
expression
=
Expression
(
variable
_expression
)
else
:
value
=
vdef
.
getVariableValue
()
if
expression
is
not
None
:
...
...
@@ -468,7 +468,7 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow):
# 2. Variable as XML
variable_reference_list
=
[]
variable_list
=
self
.
objectValues
(
portal_type
=
'Variable'
)
variable_prop_id_to_show
=
[
'description'
,
'
default
_expression'
,
variable_prop_id_to_show
=
[
'description'
,
'
variable
_expression'
,
'for_catalog'
,
'for_status'
,
'update_always'
]
for
vdef
in
variable_list
:
variable_reference_list
.
append
(
vdef
.
getReference
())
...
...
product/ERP5Workflow/Document/Variable.py
View file @
08c079bf
...
...
@@ -49,7 +49,7 @@ class Variable(IdAsReferenceMixin("variable_", "prefix"), XMLObject):
for_catalog
=
1
for_status
=
1
variable_value
=
''
default
_expression
=
None
# Overrides variable_value if set
variable
_expression
=
None
# Overrides variable_value if set
update_always
=
1
default_reference
=
''
# Declarative security
...
...
product/ERP5Workflow/Document/Workflow.py
View file @
08c079bf
...
...
@@ -430,14 +430,14 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
getSecurityManager
(),
self
,
ob
):
return
default
status
=
self
.
getCurrentStatusDict
(
ob
)
default_expression
=
vdef
.
getDefault
Expression
()
variable_expression
=
vdef
.
getVariable
Expression
()
if
status
is
not
None
and
status
.
has_key
(
name
):
value
=
status
[
name
]
# Not set yet. Use a default.
elif
default
_expression
is
not
None
:
elif
variable
_expression
is
not
None
:
ec
=
createExprContext
(
StateChangeInfo
(
ob
,
self
,
status
))
value
=
Expression
(
default
_expression
)(
ec
)
value
=
Expression
(
variable
_expression
)(
ec
)
else
:
value
=
vdef
.
getVariableValue
()
...
...
@@ -640,7 +640,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
if
tdef
is
not
None
:
transition_variable_list
=
tdef
.
objectValues
(
portal_type
=
'Transition Variable'
)
for
transition_variable
in
transition_variable_list
:
tdef_exprs
[
transition_variable
.
getCausalityId
()]
=
transition_variable
.
get
Default
Expression
()
tdef_exprs
[
transition_variable
.
getCausalityId
()]
=
transition_variable
.
get
Variable
Expression
()
# Update all transition variables
if
form_kw
is
not
None
:
...
...
@@ -661,8 +661,8 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
# Preserve former value
value
=
former_status
[
variable_reference
]
else
:
if
vdef
.
get
Default
Expression
()
is
not
None
:
expr
=
vdef
.
get
Default
Expression
()
if
vdef
.
get
Variable
Expression
()
is
not
None
:
expr
=
vdef
.
get
Variable
Expression
()
else
:
value
=
vdef
.
getVariableValue
(
object
=
object
)
if
expr
is
not
None
and
expr
!=
''
:
...
...
@@ -888,7 +888,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
for
tr_var
in
tr_var_list
:
reference
=
self
.
_getOb
(
tr_var
.
getCausalityId
()).
getReference
()
transition_variable
=
SubElement
(
transition_variables
,
property_id
,
attrib
=
dict
(
id
=
reference
,
type
=
'variable'
))
transition_variable
.
text
=
str
(
tr_var
.
get
Default
Expression
())
transition_variable
.
text
=
str
(
tr_var
.
get
Variable
Expression
())
else
:
property_value
=
tdef
.
getProperty
(
property_id
)
property_type
=
tdef
.
getPropertyType
(
property_id
)
...
...
@@ -900,7 +900,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
# 3. Variable as XML
variable_reference_list
=
[]
variable_list
=
self
.
objectValues
(
portal_type
=
'Variable'
)
variable_prop_id_to_show
=
[
'description'
,
'
default
_expression'
,
variable_prop_id_to_show
=
[
'description'
,
'
variable
_expression'
,
'for_catalog'
,
'for_status'
,
'update_always'
]
for
vdef
in
variable_list
:
variable_reference_list
.
append
(
vdef
.
getReference
())
...
...
@@ -927,7 +927,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
sub_object
.
text
=
str
(
property_value
)
# for a very specific case, action return the reference of transition,
# but in XML should show the same expression as in DC workflow.
if
vdef
.
getId
()
==
'variable_action'
and
property_id
==
'
default
_expression'
and
property_value
!=
''
:
if
vdef
.
getId
()
==
'variable_action'
and
property_id
==
'
variable
_expression'
and
property_value
!=
''
:
sub_object
.
text
=
str
(
'transition/getId|nothing'
)
# 4. Worklist as XML
...
...
@@ -1061,9 +1061,9 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
# Preserve former value
value
=
former_status
[
id
]
else
:
default_expression
=
vdef
.
getDefault
Expression
()
if
default
_expression
is
not
None
:
expr
=
Expression
(
default
_expression
)
variable_expression
=
vdef
.
getVariable
Expression
()
if
variable
_expression
is
not
None
:
expr
=
Expression
(
variable
_expression
)
else
:
value
=
vdef
.
getVariableValue
()
if
expr
is
not
None
:
...
...
@@ -1113,15 +1113,15 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
status
=
self
.
getCurrentStatusDict
(
ob
)
for
vdef_ref
,
vdef
in
self
.
getVariableValueDict
().
iteritems
():
if
vdef
.
getForCatalog
():
default_expression
=
vdef
.
getDefault
Expression
()
variable_expression
=
vdef
.
getVariable
Expression
()
if
status
.
has_key
(
vdef_ref
):
value
=
status
[
vdef_ref
]
# Not set yet. Use a default.
elif
default
_expression
is
not
None
:
elif
variable
_expression
is
not
None
:
ec
=
createExprContext
(
StateChangeInfo
(
ob
,
self
,
status
))
# convert string to expression before execute it.
value
=
Expression
(
default
_expression
)(
ec
)
value
=
Expression
(
variable
_expression
)(
ec
)
else
:
value
=
vdef
.
getVariableValue
()
if
hasattr
(
self
,
'getSourceValue'
):
...
...
product/ERP5Workflow/Document/Worklist.py
View file @
08c079bf
...
...
@@ -144,7 +144,7 @@ class Worklist(IdAsReferenceMixin("worklist_", "prefix"), XMLObject):
variable_value_ref = variable_value.getReference()
worklist_variable_value = self.newContent(portal_type='
Worklist
Variable
')
worklist_variable_value.setReference(variable_value_ref)
worklist_variable_value.set
DefaultExpression(variable_value.getDefault
Expression())
worklist_variable_value.set
VariableExpression(variable_value.getVariable
Expression())
worklist_variable_value.setVariableValue(variable_value.getVariableValue())
res.append(worklist_variable_value)
if worklist_variable_value and worklist_variable_value not in res and variable_value.getForCatalog() == 1:
...
...
@@ -174,7 +174,7 @@ class Worklist(IdAsReferenceMixin("worklist_", "prefix"), XMLObject):
if self.getMatchedCausalityState() is not None:
key_list.append('
causality_state
')
for dynamic_variable in self.objectValues():
if dynamic_variable.getVariableValue() or dynamic_variable.get
Default
Expression():
if dynamic_variable.getVariableValue() or dynamic_variable.get
Variable
Expression():
key_list.append(dynamic_variable.getReference())
return key_list
...
...
@@ -206,8 +206,8 @@ class Worklist(IdAsReferenceMixin("worklist_", "prefix"), XMLObject):
if
dynamic_variable
.
getVariableValue
():
matches
=
[
dynamic_variable
.
getVariableValue
()]
# Override initial value if expression set:
if
dynamic_variable
.
get
Default
Expression
():
matches
=
Expression
(
dynamic_variable
.
get
Default
Expression
())
if
dynamic_variable
.
get
Variable
Expression
():
matches
=
Expression
(
dynamic_variable
.
get
Variable
Expression
())
if
matches
is
not
[]
and
matches
is
not
None
:
if
not
isinstance
(
matches
,
(
tuple
,
Expression
)):
...
...
product/ERP5Workflow/Document/WorklistVariable.py
View file @
08c079bf
...
...
@@ -39,7 +39,7 @@ class WorklistVariable(IdAsReferenceMixin("variable_", "prefix"), XMLObject):
This type of object has 3 values:
- reference as Title;
- variable_value;
-
default
_expression which will override default when it's set.
-
variable
_expression which will override default when it's set.
"""
meta_type
=
'ERP5 Variable'
...
...
@@ -49,7 +49,7 @@ class WorklistVariable(IdAsReferenceMixin("variable_", "prefix"), XMLObject):
isRADContent
=
1
variable_value
=
''
default
_expression
=
None
# Overrides variable_value if set
variable
_expression
=
None
# Overrides variable_value if set
default_reference
=
''
# Declarative security
security
=
ClassSecurityInfo
()
...
...
product/ERP5Workflow/Tool/WorkflowTool.py
View file @
08c079bf
...
...
@@ -408,7 +408,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
worklist_variable_value
=
worklist
.
newContent
(
portal_type
=
'Worklist Variable'
,
reference
=
key
)
if
isinstance
(
values
,
Expression
):
worklist_variable_value
.
set
Default
Expression
(
values
.
text
)
worklist_variable_value
.
set
Variable
Expression
(
values
.
text
)
else
:
worklist_variable_value
.
setVariableValue
(
values
)
...
...
@@ -505,9 +505,9 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
# for a very specific case, action return the reference of transition
# in order to generation correct workflow history.
if
variable_id
==
'action'
:
variable
.
set
Default
Expression
(
'transition/getReference|nothing'
)
variable
.
set
Variable
Expression
(
'transition/getReference|nothing'
)
else
:
variable
.
set
Default
Expression
(
variable_definition
.
default_expr
.
text
)
variable
.
set
Variable
Expression
(
variable_definition
.
default_expr
.
text
)
if
variable_definition
.
info_guard
:
variable
.
info_guard
=
variable_definition
.
info_guard
variable
.
setRoleList
(
variable_definition
.
info_guard
.
roles
)
...
...
@@ -532,7 +532,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
else
:
var_exprs
=
origin_tdef
.
var_exprs
for
key
in
var_exprs
:
tr_var
=
transition
.
newContent
(
portal_type
=
'Transition Variable'
,
temp_object
=
is_temporary
)
tr_var
.
set
Default
Expression
(
var_exprs
[
key
].
text
)
tr_var
.
set
Variable
Expression
(
var_exprs
[
key
].
text
)
tr_var_path
=
getattr
(
workflow
,
'variable_'
+
key
).
getPath
()
tr_var_path
=
'/'
.
join
(
tr_var_path
.
split
(
'/'
)[
2
:])
new_category
.
append
(
tr_var_path
)
...
...
@@ -549,7 +549,7 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
else
:
var_exprs
=
origin_tdef
.
var_exprs
for
key
in
var_exprs
:
tr_var
=
interaction
.
newContent
(
portal_type
=
'Transition Variable'
,
temp_object
=
is_temporary
)
tr_var
.
set
Default
Expression
(
var_exprs
[
key
].
text
)
tr_var
.
set
Variable
Expression
(
var_exprs
[
key
].
text
)
tr_var_path
=
getattr
(
workflow
,
'variable_'
+
key
).
getPath
()
tr_var_path
=
'/'
.
join
(
tr_var_path
.
split
(
'/'
)[
2
:])
new_category
.
append
(
tr_var_path
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment