Skip to content

Latest commit

 

History

History
102 lines (81 loc) · 3.34 KB

api-workflow.md

File metadata and controls

102 lines (81 loc) · 3.34 KB

Functions

loadAgentsForEnvironment(environment)

loads all agents on an environment. Returns with the agent data fully populated

connectEnvironmentAgents(environment)

Ensures that all agents for an environment are running. IF a defined agent does not exist an attempt is made to add it.

executeWorkflow(environment, workflow, callback)

Executes a workflow on a knowhow server

executeWorkflowSync(environment, workflow)

Synchronous version of addWorkflow call

cancelWorkflow(environment, workflow, callback)

Cancels a running workflow on a knowhow server

getRunningWorkflowsList(callback)

Retreives a list of currently executing workflows on a knowhow server

KHWorkflow(serverURL, khEventHandler, the, khClient)

Factory method for KHWorkflow

## loadAgentsForEnvironment(environment) loads all agents on an environment. Returns with the agent data fully populated

Kind: global function

Param Description
environment the environment to load

connectEnvironmentAgents(environment)

Ensures that all agents for an environment are running. IF a defined agent does not exist an attempt is made to add it.

Kind: global function

Param Description
environment an environment json object

executeWorkflow(environment, workflow, callback)

Executes a workflow on a knowhow server

Kind: global function

Param Description
environment json environment representation (i.e. collection of knowhow agents that represent the environment)
workflow a json workflow to execute
callback callback function with parameters (error, agentInfo)

executeWorkflowSync(environment, workflow)

Synchronous version of addWorkflow call

Kind: global function

Param Description
environment json representaion of the workflow's environment
workflow to run

cancelWorkflow(environment, workflow, callback)

Cancels a running workflow on a knowhow server

Kind: global function

Param Description
environment environment to cancel
workflow a json workflow to execute
callback callback function with parameters (error, agentInfo)

getRunningWorkflowsList(callback)

Retreives a list of currently executing workflows on a knowhow server

Kind: global function

Param Description
callback callback function with parameters (error, runningJobList)

KHWorkflow(serverURL, khEventHandler, the, khClient)

Factory method for KHWorkflow

Kind: global function

Param Description
serverURL the url of the server
khEventHandler EventHandler
the khJob object for this workflow engine
khClient