Connecteur pour les exécutions de workflows
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Connecteur Workflows qui définit la fonction intégrée utilisée pour accéder aux exécutions de Workflows.
En savoir plus
Pour obtenir une documentation détaillée incluant cet exemple de code, consultez les articles suivants :
Exemple de code
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],[],[],[],null,["# Connector for Workflows executions\n\nWorkflows connector that defines the built-in function used to access Workflows executions.\n\nExplore further\n---------------\n\n\nFor detailed documentation that includes this code sample, see the following:\n\n- [Workflow Executions API Connector Overview](/workflows/docs/reference/googleapis/workflowexecutions/Overview)\n\nCode sample\n-----------\n\n### YAML\n\n # This workflow demonstrates how to use the Cloud Workflow Executions connector\n # to create an execution for a workflow. Make sure the workflow\n # already exists in your project.\n # Expected successful output: \"SUCCESS\"\n\n - init:\n assign:\n - project: ${sys.get_env(\"GOOGLE_CLOUD_PROJECT_ID\")}\n - location: \"us-central1\"\n - workflow: \"[fill in the workflow to execute]\" # Make sure this workflow exists in your project.\n - arguments:\n hello: world\n integer: 100\n boolean: true\n # The run helper method is the preferred way to execute a workflow as it doesn't require\n # encoding the workflow arguments in a JSON-formatted string. To compare\n # the usage, we list two demo steps:\n - run_execution:\n call: googleapis.workflowexecutions.v1.projects.locations.workflows.executions.run\n args:\n workflow_id: ${workflow}\n location: ${location}\n project_id: ${project}\n argument: ${arguments} # Arguments could be specified inline as a map instead.\n result: r1\n - create_execution:\n call: googleapis.workflowexecutions.v1.projects.locations.workflows.executions.create\n args:\n parent: ${\"projects/\" + project + \"/locations/\" + location + \"/workflows/\" + workflow}\n body:\n argument: ${json.encode_to_string(arguments)}\n result: r2\n - the_end:\n return:\n - ${r1}\n - ${r2}\n\nWhat's next\n-----------\n\n\nTo search and filter code samples for other Google Cloud products, see the\n[Google Cloud sample browser](/docs/samples?product=workflows)."]]