``assign_subactivities`` Assign the list of ``activities`` as the new set of children for the specified ``activity``. :param str activity: the Activity node to assign children :param list[str] activities: the list of Activities to assign :return: True on success, False otherwise :rtype:
(self, activity: Activity, activities: Union[List[str], str])
| 465 | core.BNFreeStringList(result, length.value) |
| 466 | |
| 467 | def assign_subactivities(self, activity: Activity, activities: Union[List[str], str]) -> bool: |
| 468 | """ |
| 469 | ``assign_subactivities`` Assign the list of ``activities`` as the new set of children for the specified ``activity``. |
| 470 | |
| 471 | :param str activity: the Activity node to assign children |
| 472 | :param list[str] activities: the list of Activities to assign |
| 473 | :return: True on success, False otherwise |
| 474 | :rtype: bool |
| 475 | """ |
| 476 | if isinstance(activities, str): |
| 477 | activities = [activities] |
| 478 | input_list = (ctypes.c_char_p * len(activities))() |
| 479 | for i in range(0, len(activities)): |
| 480 | input_list[i] = str(activities[i]).encode('charmap') |
| 481 | return core.BNWorkflowAssignSubactivities(self.handle, str(activity), input_list, len(activities)) |
| 482 | |
| 483 | def clear(self) -> bool: |
| 484 | """ |