This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A simple example of calling the VCO 5.1 REST API using Ruby. This example uses the HTTParty Gem | |
# to POST some XML to the new RESTful API. There are two examples (more coming) which are: | |
# getWorkflow(id) - This will return a workflow with a given workflow ID, HTTParty will allow you to access the response | |
# using the syntax response["inputParameters"] for example. | |
# executeWorkflow(id, inputxml) - This will allow you to execute a Workflow via the API. I was unable to get a workflow | |
# to execute using a hash input, so i opted for the ugly xml string option. I think this might be to do with the namespace | |
# I will hopefully have this as a simple hash very soon but for now it accepts the raw xml as a string. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class VCO | |
#Require the Following Ruby Gems | |
require "rubygems" | |
require "savon" | |
require "ostruct" | |
#Set the Attributes | |
attr_writer :vcoHostName, :username, :password | |
def executeWfl(workflowName, workflowInputs) |