Commit 099c5187 authored by wenjie.zheng's avatar wenjie.zheng Committed by Sebastien Robin

DC Workflow Tool Objects: add getReference which actually returns their id.

parent 46379fbe
...@@ -256,6 +256,9 @@ class InteractionDefinition (SimpleItem): ...@@ -256,6 +256,9 @@ class InteractionDefinition (SimpleItem):
return self.manage_variables(REQUEST, 'Variables changed.') return self.manage_variables(REQUEST, 'Variables changed.')
def getReference(self):
return self.id
Globals.InitializeClass(InteractionDefinition) Globals.InitializeClass(InteractionDefinition)
......
...@@ -347,6 +347,9 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject): ...@@ -347,6 +347,9 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
return DCWorkflowDefinition._checkTransitionGuard(self, t, ob, **kw) return DCWorkflowDefinition._checkTransitionGuard(self, t, ob, **kw)
def getReference(self):
return self.id
Globals.InitializeClass(InteractionWorkflowDefinition) Globals.InitializeClass(InteractionWorkflowDefinition)
addWorkflowFactory(InteractionWorkflowDefinition, id='interaction_workflow', addWorkflowFactory(InteractionWorkflowDefinition, id='interaction_workflow',
......
...@@ -23,8 +23,14 @@ from AccessControl import Unauthorized ...@@ -23,8 +23,14 @@ from AccessControl import Unauthorized
from Products.CMFCore.WorkflowTool import WorkflowTool from Products.CMFCore.WorkflowTool import WorkflowTool
from Products.CMFCore.WorkflowCore import ObjectMoved, ObjectDeleted from Products.CMFCore.WorkflowCore import ObjectMoved, ObjectDeleted
from Products.CMFCore.WorkflowCore import WorkflowException from Products.CMFCore.WorkflowCore import WorkflowException
from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition
from Products.DCWorkflow.Transitions import TRIGGER_WORKFLOW_METHOD from Products.DCWorkflow.Transitions import TRIGGER_WORKFLOW_METHOD
from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition
from Products.DCWorkflow.Transitions import TransitionDefinition
from Products.DCWorkflow.States import StateDefinition
from Products.DCWorkflow.Variables import VariableDefinition
from Products.DCWorkflow.Worklists import WorklistDefinition
from Products.CMFCore.utils import Message as _ from Products.CMFCore.utils import Message as _
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Products.ZSQLCatalog.SQLCatalog import SimpleQuery, AutoQuery, ComplexQuery, NegatedQuery from Products.ZSQLCatalog.SQLCatalog import SimpleQuery, AutoQuery, ComplexQuery, NegatedQuery
...@@ -90,6 +96,14 @@ DCWorkflowDefinition.notifyWorkflowMethod = DCWorkflowDefinition_notifyWorkflowM ...@@ -90,6 +96,14 @@ DCWorkflowDefinition.notifyWorkflowMethod = DCWorkflowDefinition_notifyWorkflowM
DCWorkflowDefinition.notifyBefore = DCWorkflowDefinition_notifyBefore DCWorkflowDefinition.notifyBefore = DCWorkflowDefinition_notifyBefore
DCWorkflowDefinition.notifySuccess = DCWorkflowDefinition_notifySuccess DCWorkflowDefinition.notifySuccess = DCWorkflowDefinition_notifySuccess
def method_getReference(self):
return self.id
DCWorkflowDefinition.getReference = method_getReference
TransitionDefinition.getReference = method_getReference
StateDefinition.getReference = method_getReference
VariableDefinition.getReference = method_getReference
WorklistDefinition.getReference = method_getReference
WORKLIST_METADATA_KEY = 'metadata' WORKLIST_METADATA_KEY = 'metadata'
SECURITY_PARAMETER_ID = 'local_roles' SECURITY_PARAMETER_ID = 'local_roles'
COUNT_COLUMN_TITLE = 'count' COUNT_COLUMN_TITLE = 'count'
......
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