Connector for Workflows definitions

Workflows connector that defines the built-in function used to access Workflows definitions.

Explore further

For detailed documentation that includes this code sample, see the following:

Code sample

YAML

  # This workflow demonstrates how to use the Workflows connector: 
 # Create, get, and then delete a workflow 
 # Expected output: "SUCCESS" 
 - 
  
 init 
 : 
  
 assign 
 : 
  
 - 
  
 project 
 : 
  
 ${sys.get_env("GOOGLE_CLOUD_PROJECT_ID")} 
  
 - 
  
 location 
 : 
  
 "us-central1" 
  
 - 
  
 workflow 
 : 
  
 "example-workflow" 
 - 
  
 create_workflow 
 : 
  
 call 
 : 
  
 googleapis.workflows.v1.projects.locations.workflows.create 
  
 args 
 : 
  
 parent 
 : 
  
 ${"projects/" + project + "/locations/" + location} 
  
 workflowId 
 : 
  
 ${workflow} 
  
 body 
 : 
  
 name 
 : 
  
 ${"projects/" + project + "/locations/" + location + "/workflows/" + workflow} 
  
 description 
 : 
  
 "An 
  
 example 
  
 workflow 
  
 to 
  
 create 
  
 and 
  
 delete 
  
 using 
  
 the 
  
 Workflows 
  
 connector" 
  
 sourceContents 
 : 
  
 "- 
  
 step:\n 
  
 next: 
  
 end" 
 - 
  
 get_workflow 
 : 
  
 call 
 : 
  
 googleapis.workflows.v1.projects.locations.workflows.get 
  
 args 
 : 
  
 name 
 : 
  
 ${"projects/" + project + "/locations/" + location + "/workflows/" + workflow} 
 - 
  
 delete_workflow 
 : 
  
 call 
 : 
  
 googleapis.workflows.v1.projects.locations.workflows.delete 
  
 args 
 : 
  
 name 
 : 
  
 ${"projects/" + project + "/locations/" + location + "/workflows/" + workflow} 
 - 
  
 the_end 
 : 
  
 return 
 : 
  
 "SUCCESS" 
 

What's next

To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser .

Create a Mobile Website
View Site in Mobile | Classic
Share by: