``insert`` Insert the list of ``activities`` before the specified ``activity`` and at the same level. :param str activity: the Activity node for which to insert ``activities`` before :param list[str] activities: the list of Activities to insert :return: True on success, False otherwise :
(self, activity: ActivityType, activities: Union[List[str], str])
| 490 | return core.BNWorkflowClear(self.handle) |
| 491 | |
| 492 | def insert(self, activity: ActivityType, activities: Union[List[str], str]) -> bool: |
| 493 | """ |
| 494 | ``insert`` Insert the list of ``activities`` before the specified ``activity`` and at the same level. |
| 495 | |
| 496 | :param str activity: the Activity node for which to insert ``activities`` before |
| 497 | :param list[str] activities: the list of Activities to insert |
| 498 | :return: True on success, False otherwise |
| 499 | :rtype: bool |
| 500 | """ |
| 501 | if isinstance(activities, str): |
| 502 | activities = [activities] |
| 503 | input_list = (ctypes.c_char_p * len(activities))() |
| 504 | for i in range(0, len(activities)): |
| 505 | input_list[i] = str(activities[i]).encode('charmap') |
| 506 | return core.BNWorkflowInsert(self.handle, str(activity), input_list, len(activities)) |
| 507 | |
| 508 | def insert_after(self, activity: ActivityType, activities: Union[List[str], str]) -> bool: |
| 509 | """ |
no test coverage detected