Commit 452d6be3 authored by Leonardo Rochael Almeida's avatar Leonardo Rochael Almeida Committed by Kazuhiko Shiozaki

Add postActiveResult API shortcut to ActiveProcess

To simplify code that calls:

  active_process.postResult(ActiveResult(...))
parent ae835805
......@@ -36,6 +36,7 @@ from BTrees.Length import Length
from Products.CMFActivity.ActiveObject import INVOKE_ERROR_STATE, \
VALIDATE_ERROR_STATE
from random import randrange
from .ActiveResult import ActiveResult
manage_addActiveProcessForm = DTMLFile('dtml/ActiveProcess_add', globals())
......@@ -106,6 +107,10 @@ class ActiveProcess(Base):
return
result_list.append(result)
security.declareProtected(CMFCorePermissions.ManagePortal, 'postActiveResult')
def postActiveResult(self, *args, **kw):
return self.postResult(ActiveResult(*args, **kw))
security.declareProtected(CMFCorePermissions.ManagePortal, 'getResultList')
def getResultList(self, **kw):
"""
......
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