Commit 1b7905f3 authored by wenjie.zheng's avatar wenjie.zheng

erp5_grqph_editor: show user actions in graph.

parent 09b03bf7
...@@ -67,6 +67,7 @@ def getWorkflowGraph(workflow):\n ...@@ -67,6 +67,7 @@ def getWorkflowGraph(workflow):\n
graph = dict(node=dict(), edge=dict())\n graph = dict(node=dict(), edge=dict())\n
for state_id, state in workflow.getStateValueList().iteritems():\n for state_id, state in workflow.getStateValueList().iteritems():\n
is_initial_state = state.getId() == workflow.getSourceId()\n is_initial_state = state.getId() == workflow.getSourceId()\n
transition_id_list = []\n
graph[\'node\'][state.getId()] = dict(\n graph[\'node\'][state.getId()] = dict(\n
_class=\'workflow.state\',\n _class=\'workflow.state\',\n
name=state.getTitleOrId(),\n name=state.getTitleOrId(),\n
...@@ -87,6 +88,18 @@ def getWorkflowGraph(workflow):\n ...@@ -87,6 +88,18 @@ def getWorkflowGraph(workflow):\n
actbox_url=transition.getActboxUrl(),\n actbox_url=transition.getActboxUrl(),\n
transition_id=transition.getId() # used for edition.\n transition_id=transition.getId() # used for edition.\n
))\n ))\n
else:\n
# user action\n
transition_id_list.append(transition_id)\n
\n
if transition_id_list != []:\n
graph[\'edge\']["%s_%s" % (state.getId(), transition_id_list)] = (\n
dict(_class=\'workflow.transition\',\n
source=state.getId(),\n
destination=state.getId(),\n
name=str(transition_id_list)\n
))\n
\n
\n \n
if position_graph:\n if position_graph:\n
for state_id in graph[\'node\'].keys():\n for state_id in graph[\'node\'].keys():\n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment