summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/workflow.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/python/workflow.py b/python/workflow.py
index 7989d6bd..8213a6b6 100644
--- a/python/workflow.py
+++ b/python/workflow.py
@@ -342,7 +342,7 @@ class Workflow(metaclass=_WorkflowMetaclass):
:param Activity activity: the Activity to register
:param list[str] subactivities: the list of Activities to assign
- :return: True on Success, False otherwise
+ :return: the registered Activity
:rtype: Activity
"""
if activity is None:
@@ -350,7 +350,10 @@ class Workflow(metaclass=_WorkflowMetaclass):
input_list = (ctypes.c_char_p * len(subactivities))()
for i in range(0, len(subactivities)):
input_list[i] = str(subactivities[i]).encode('charmap')
- return core.BNWorkflowRegisterActivity(self.handle, activity.handle, input_list, len(subactivities))
+ handle = core.BNWorkflowRegisterActivity(self.handle, activity.handle, input_list, len(subactivities))
+ if handle is None:
+ return None
+ return activity
def contains(self, activity: ActivityType) -> bool:
"""