``activity_roots`` Retrieve the list of activity roots for the Workflow, or if specified just for the given ``activity``. :param str activity: if specified, return the roots for the ``activity`` :return: list of root activity names :rtype: list[str]
(self, activity: ActivityType = "")
| 426 | return Activity(str(activity), handle) |
| 427 | |
| 428 | def activity_roots(self, activity: ActivityType = "") -> List[str]: |
| 429 | """ |
| 430 | ``activity_roots`` Retrieve the list of activity roots for the Workflow, or if specified just for the given ``activity``. |
| 431 | |
| 432 | :param str activity: if specified, return the roots for the ``activity`` |
| 433 | :return: list of root activity names |
| 434 | :rtype: list[str] |
| 435 | """ |
| 436 | length = ctypes.c_ulonglong() |
| 437 | result = core.BNWorkflowGetActivityRoots(self.handle, str(activity), ctypes.byref(length)) |
| 438 | assert result is not None, "core.BNWorkflowGetActivityRoots returned None" |
| 439 | out_list = [] |
| 440 | try: |
| 441 | for i in range(length.value): |
| 442 | out_list.append(result[i].decode('utf-8')) |
| 443 | return out_list |
| 444 | finally: |
| 445 | core.BNFreeStringList(result, length.value) |
| 446 | |
| 447 | def subactivities(self, activity: ActivityType = "", immediate: bool = True) -> List[str]: |
| 448 | """ |