Project DemoFlow-SA-StartServerScriptAndQueryJob: Examples of OO-Flows for demonstration and/or training purposes, this one: run a server script on all servers of a device group. Version history: 2015/06/18 Wodisch 1.0.0 project started 2015/06/19 Wodisch 1.0.1 project re-structured thanks to discussion with Tal 2015/06/21 Wodisch 1.0.3 flow cleaned up to not use any system property nor system accounts 2015/07/26 Wodisch 1.0.4 comments restructured, parameters of steps corrected, html formatting removed Authors: Wodisch/cTc ComputerTechnik Czakay Gmbh, Germany Requirements: - OO >= OO10.00, but are created on OO10.20 Studio - features of later/newer version of OO are usually not used/necessary - the flows usually have inputs and results and can be called as sub-flows - usually the start step is a generic "initialization" step, to fill in values from the inputs, or system properties/system accounts if the flow inputs are emptyFlows included: This simple flow gets the SA-server connection information from inputs and returns lists of server names, server IDs, script exit codes, and script outputs.Flow SA-StartScriptAndQueryJob:This simple flow gets the SA-server connection information from inputs and returns lists of server names, server IDs, script exit codes, and script outputs.Library folder: /Community/OO-SA-Integration/Run a ServerScript on all servers of a DeviceGroupInputs:- SAcoreHost: the FQDN or IP-address of the SA-core ot be used (any SA10.x core, default is sava10.s3.kic.de)- SAcorePort: the port to be used to communicate with that SA core ( default is 443, must match the SAcoreProtocol)- SAcoreProtocol: the protocol to be used to communicate with that SA core (default is HTTPS, must match the SAcorePort)- SAdeviceGroupPath: the absolute path of the device group to be used (default is Public/JustAnExampleDeviceGroup)- SAserverScriptName: the (short) name of the server script to be executed on all member servers of the device group (default is JustAserverScript)- SAserverScriptArgs: the arguments to be passed to the server script (as a single string, default is an empty string)- SAcore AccountUsername: the login name of the account to communicate with that SA core (needs proper permissions to execute the script on the servers)- SAcoreAccountPassword: the password for that account- SAscriptTimeout: the maximum time permitted for the script to run before being terminated (default is 60 minutes, depends on the script and the amount of servers within the device group)Outputs:- exitCodes: the list of exitCodes of the scripts (one per server, in the same order as serverIDs and serverNames)- outputs: the list of the outputs of the script- serverIDs: the list of server IDs- serverNames: the list of server namesResponses:- failure: not all server executed the script successfully- success: all servers executed the script successfullySystem Properties: - none usedSystem Accounts:- none usedSummary:- First it connects to the SA core to retrieve the SA server version, as all the other steps need that as an input.- Then it retrieves the ID of the device group used (since the "path" of the group is passed as an input, not its name)- Then it retrieves the list of servers of device group with that ID, as the list of server names is needed, later on.- Then it retrieves the ID of the server script to be run, as the operation "Start Server Script" needs both, scriptname and scriptID.- Then it creates/starts a job to execute that server script on all these servers.- Then it waits for the job to finish (in 10s intervals of checking - which is too soon by far for a real environment).- Then it retrieves exitcodes and outputs from that job for all the servers and passes these as outputs of the flow.- Then it retrieves the list of server names with the correct order to be passed as another output of the flow.- Finally the "display" option of the flow's return step "Resolved: success" displays the result as HTML.Remarks:Every step making use of an SA-operation has its own "ErrorHandler", since they all pass different results.This simple ErrorHandler is actually a copy of the "No Operation" to "display" the errorMessage and uses two inputs:- stepName: the name of the step to report an error from, - errorMessage: the errorMessage formatted as string (to fill in all the data needed).For easier readability this string is formatted as an HTML table.That string is then shown as the "display" option of that step.In real life flows you would substitute it for some "real error handling", i.e. report an event to your monitoring system, raise an incident with your trouble ticket system, or such.
Suggested for you are based on app category, product compatibility, popularity, rating and newness. Some apps may not show based on entitlements. Learn more about entitlements.
This simple flow gets the SA-server connection information from inputs and returns lists of server names, server IDs, script exit codes, and script outputs.The main main purpose is:- demonstrate how to run an SA Server Script- provide a flow showing how to do do the naming, the passing of parameters, the error handling and the documentation
Please upgrade to one of the following broswers: Internet Explorer 11 (or greater) or the latest version of Chrome or Firefox