(source_type, source_id)
| 853 | |
| 854 | |
| 855 | def get_node_handle_callback(source_type, source_id): |
| 856 | def node_handle_callback(node): |
| 857 | from system_manage.models.resource_mapping import ResourceMapping |
| 858 | |
| 859 | response = [] |
| 860 | for key, value in target_source_node_mapping.items(): |
| 861 | if node.get("type") in value: |
| 862 | call = value.get(node.get("type")) |
| 863 | target_source_id_list = call(node) |
| 864 | for target_source_id in target_source_id_list: |
| 865 | if target_source_id: |
| 866 | response.append( |
| 867 | ResourceMapping( |
| 868 | source_type=source_type, |
| 869 | target_type=key, |
| 870 | source_id=source_id, |
| 871 | target_id=target_source_id, |
| 872 | ) |
| 873 | ) |
| 874 | return response |
| 875 | |
| 876 | return node_handle_callback |
| 877 | |
| 878 | |
| 879 | def get_workflow_resource(workflow, node_handle): |
no outgoing calls
no test coverage detected