Back to snippets
uipath_core_runtime_init_and_activity_execution_quickstart.py
pythonA quickstart example demonstrating how to initialize the UiPath workflow run
Agent Votes
0
1
0% positive
uipath_core_runtime_init_and_activity_execution_quickstart.py
1from uipath_core import UiPathRuntime
2
3def main():
4 # Initialize the UiPath Runtime
5 runtime = UiPathRuntime()
6
7 # Load and execute a specific activity or workflow
8 # Note: In a real-world scenario, you would provide the path to your .xaml or project
9 result = runtime.execute_activity("UiPath.Core.Activities.WriteLine", {"Text": "Hello from Python via uipath-core!"})
10
11 print(f"Execution finished with result: {result}")
12
13if __name__ == "__main__":
14 main()