Using Oracle Orchestration
Using Oracle Orchestration
Using Oracle Orchestration
E78055-11
August 2019
Oracle Cloud Using Oracle Orchestration,
E78055-11
Copyright © 2017, 2019, Oracle and/or its affiliates. All rights reserved.
This software and related documentation are provided under a license agreement containing restrictions on
use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your
license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify,
license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means.
Reverse engineering, disassembly, or decompilation of this software, unless required by law for
interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If
you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on
behalf of the U.S. Government, then the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software,
any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are
"commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-
specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the
programs, including any operating system, integrated software, any programs installed on the hardware,
and/or documentation, shall be subject to license terms and license restrictions applicable to the programs.
No other rights are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management applications.
It is not developed or intended for use in any inherently dangerous applications, including applications that
may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you
shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its
safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this
software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of
their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are
used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron,
the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro
Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content, products,
and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly
disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise
set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be
responsible for any loss, costs, or damages incurred due to your access to or use of third-party content,
products, or services, except as set forth in an applicable agreement between you and Oracle.
Contents
2 Author Workflows
About Workflows 2-1
Author Workflows Using UI 2-3
Author Workflows Using V2.0 Syntax 2-4
Author Workflows Using V1.0 Syntax 2-6
Workflow Variables and Data Passing 2-9
3 Submit Workflows
Submit a Workflow Using the Orchestration UI 3-1
Submit Workflows Using REST-API 3-2
4 Schedule Workflows
Schedule Workflows Using UI 4-1
CRON Expressions 4-2
iii
6 Integrate Orchestration with Log Analytics
8 Simplifying IT Management
Performing Bulk Configuration Management 8-1
Automating Provisioning and Deployment 8-1
Managing Incidents with Remediation Actions 8-2
Remediation Action Workflow Creation and Submission 8-2
REST API Use Cases 8-13
iv
Abstract
Documentation for Oracle Orchestration that describes how to use orchestration
workflows to automate complex tasks and processes.
5
Audience
Preface
Oracle Orchestration automates tasks and processes within your enterprise.
Topics:
• Audience
• Related Resources
• Conventions
Using Oracle Orchestration describes how to use this service to automate business
processes and tasks.
Audience
Using Oracle Orchestration is intended for administrators who want to automate
processes and tasks across cloud and on-premises environments.
Related Resources
For more information about Oracle Management Cloud see:
• Oracle Cloud
• Getting Started With Oracle Management Cloud
• Get started with Log Analytics
Conventions
Table Text Conventions
Convention Meaning
boldface Boldface type indicates graphical user interface
elements associated with an action, or terms defined in
text or the glossary.
italic Italic type indicates the book titles, emphasis, or
placeholder variables for which you supply particular
values.
monospace Monospace type indicates commands within a
paragraph. URLs, code in examples, text that appears
on the screen, or text that you enter.
6
1
Getting Started with Oracle Orchestration
Oracle Orchestration is a Platform-as-a-Service (PaaS) solution that lets you schedule,
track, and execute workflow scripts on hosts or call Web service endpoints, all from a
single location. You can schedule recurring maintenance tasks across your on-
premises and cloud infrastructure environments.
Oracle Orchestration allows developers, system administrators and DevOps engineers
to easily Author, Manage, Submit and Monitor workflows via a comprehensive easy to
use UI and integrated JSON editor. Developers can use this Oracle Management
Cloud service to integrate a scheduler into their applications. DevOps engineers can
use Oracle Orchestration to automate and schedule deployments. System
administrators can use Orchestration to rapidly and efficiently respond in an automatic
fashion to service interruptions, backups, schedule downtime and restarts. Oracle
Orchestration can also provide a simple REST API that allows easy integration with
existing tools, and scripts to provision new environments and applications.
Note:
For this release, Oracle Orchestration REST API documentation access will
be limited to approved customers. Contact your Oracle Support or Sales
Representative for more information about accessing and using the Oracle
Orchestration REST API. In addition, see the My Oracle Support note
Orchestration Master Note (Doc ID 2229523.1) for the latest information.
Benefits
• Single solution for on-premises and cloud
• Centralized operations
• Reduced complexity
• Lower investment
• Enhanced capacity prediction and planning
1-1
Chapter 1
Before You Begin Using Oracle Orchestration
Target Audiences
Oracle Orchestration simplifies common tasks performed by IT personnel. Typically,
job functions performed by IT personnel can be categorized as: DevOps, system
administrators, and developers. Depending on the role that you have within your
organization, your approach to learning and using Oracle Orchestration may differ.
The following examples illustrate how the three categories of IT personnel can use
Oracle Orchestration to automate and simplify their typical job responsibilities.
DevOps
• Automate configuration tasks by running commands or scripts across distributed
environments.
• Provision, patch, deploy, and maintain the IT infrastructure.
• Respond to critical incidents quickly and reduce IT support costs.
System Administrators
• Schedule, organize, and manage jobs or tasks.
• Automate configuration tasks by running commands or scripts across distributed
environment.
• Provision, patch, and maintain the IT infrastructure.
• Respond to critical incidents quickly and reduce IT support costs.
Developers
• Automate application deployment.
• Enable continuous integration to trigger the post-build deployment process,
including verification.
Useful Concepts
Before using the Oracle Orchestration, you should be familiar with the following
concepts:
• Orchestration: A set of activities performed on multiple entities or hosts to
achieve a specific purpose. With Oracle Orchestration Cloud Service, these
activities can be performed as a single step across a large number of systems.
1-2
Chapter 1
Before You Begin Using Oracle Orchestration
1-3
Chapter 1
Before You Begin Using Oracle Orchestration
standard input of the process. For an entity step, the output is the stdout of the
spawned process on the host.
– WAIT Step Type: This step type allows you to add an intended delay in the
execution flow with the command waitInSeconds. A minimum wait time of 5
seconds and maximum wait time of 1800 seconds (or 30 minutes) can be
entered. Decimal and partial seconds are not allowed, expressions must
always be expressed in seconds and not minutes. WAIT step types have no
output.
– WORKFLOW Step Type: This step type allows you to execute nested
workflows, or workflows within workflows in a Parent-child manner. The nested
workflow to be called from the parent will be delineated within the
WORKFLOW step type, and will require a name for the nested workflow, the
name of the workflow in the workflow library and a version and inputs
parameters to be sent to the child workflow.
• Workflow Worker: Workers define the level of parallelism for the entire workflow.
Each workflow worker runs its own instance of the workflow in parallel. There is no
"crosstalk" or synchronization of data between workflow worker instances. A
workflow may instantiate one or more workflow workers. Consider an ENTITY use
case where a set of steps needs to be executed across 10 different
hosts. Similarly, consider a use case, where a REST call needs to be made to 10
different endpoints. For both cases, the same set of steps needs to be executed
with different host names/port numbers. Each execution is a worker.
• Input Parameters:
– String: Text based input, it is conformed by a set of characters like letters,
numbers and spaces.
– Boolean: Input based on only two values, true and false. Does not allow any
other character.
– Integer: Number based input, is comprised of whole (no decimal place)
numbers.
– Sensitive: Allows for sensitive information to be sent to either an agent
(ENTITY) or thru a REST step type. Sensitive information should be encrypted
using a symmetric key provided on the agent or target. Sensitive input
parameters are only allowed in stdin and not allowed under arguments for
security reasons.
• Oracle Management Cloud Agent: A Cloud Agent collects metrics for targets
and enables workflow entity steps to be executed on the target hosts.
1-4
Chapter 1
Understanding Oracle Orchestration Roles and Privileges
Role Tasks
Oracle Management Cloud Administrator With this role you can perform the following tasks:
• Author, Publish and Manage Workflows in the
Library
• Submit a Workflow
• View and Monitor Workflow Submissions and
associated Workflow Executions, including output
results.
For more information about the tasks that the users assigned with the above roles can
perform, see Adding Users and Assigning Roles in Getting Started with Oracle
Management Cloud.
Currently in Orchestration, no objects are shared across tenants. Workflow
submissions cannot be seen by users on other tenants.
1-5
Chapter 1
Configure Oracle Orchestration
Topics:
• Perform Pre-requisite Setup Tasks
• Set Up Credentials for Cloud-based Entities
1-6
Chapter 1
Configure Oracle Orchestration
1-7
2
Author Workflows
A workflow defines a series of tasks or activities that can be automated using Oracle
Orchestration. A workflow may consist of one or more steps and may use multiple
workers or call upon other workflows to complete its tasks.
To learn more about workflows, how they are structured and how they work; see About
Workflows.
Note:
This book has two versions of workflow syntax: V1.0 and V2.0. Currently
V1.0 is only included in this document for remediation action support. Oracle
Orchestration requires the use of V2.0 syntax and definitions going forward
for all workflows authored.
About Workflows
Depending on the complexity of the activity, a workflow may consist of one or more
steps. The general execution model for workflows combines parallel and serial actions
to allow for any level of serial/parallel actions to be combined.
2-1
Chapter 2
About Workflows
Workflow Structure
Workflows are expressed as a single JSON files, stored in the Workflow Library or as
an inline Workflow Submission. The following JSON structure defines a single
workflow/plan. The following graphic shows how a workflow is organized.
Workflow Execution
Workflows executions combine parallel and serial actions to allow for any level of
serial/parallel step action. Additionally, workflow steps may reference other workflows,
which lets you componentize or modularize workflows; and for a workflow
administrator to assemble complex activities from smaller well-defined workflow
building blocks.
Workflow Characteristics and Behaviors
2-2
Chapter 2
Author Workflows Using UI
Note:
It is recommended that you author workflows using the V2.0 syntax. V1.0
syntax is currently deprecated and only noted for legacy purposes. V1.0
workflows cannot be created using the UI interphase.
2-3
Chapter 2
Author Workflows Using V2.0 Syntax
2-4
Chapter 2
Author Workflows Using V2.0 Syntax
2-5
Chapter 2
Author Workflows Using V1.0 Syntax
Note:
Currently V1.0 syntax is only included in this book for remediation action
support. Oracle requires using V2.0 syntax and definitions going forward for
all workflows authored. Version 1.0 is not supported via the UI.
The following is the standard V1.0 JSON structural format to define a workflow:
name
workflow
plan
name
steps
step
step payload
uploadToLA
logSource
input
workflow workers (multiple workers are supported)
workflowProperties
property 1
property 2
...
property n
2-6
Chapter 2
Author Workflows Using V1.0 Syntax
schedule
notification
Element Description
Name A name given to the workflow submission. The
name is an identifier you can use to search for
a workflow submission for status and results.
Note:
The workflow
submission
name does not
have to be
unique within a
given tenant
scope.
2-7
Chapter 2
Author Workflows Using V1.0 Syntax
Element Description
Workflow Properties A map of key-value pairs that can be
associated with the workflow submission.
These key-value pairs let you associate
keywords that will help in searching for the
workflow submission at some later point in
time.
Note:
You can specify
up to five tags
using the names
property1,
property2,
property3,
property4, and
property5.
{
"name": "Patch Hosts Demo",
"workflow": {
2-8
Chapter 2
Workflow Variables and Data Passing
"plan": {
"name": "Patch_Hosts_WF",
"steps": [{
"name": "patch",
"type": "ENTITY",
"input": {
"command": "/bin/sh",
"arguments": ["/scratch/patch.sh"],
"credential": "emcosTestCred"
}
}]
},
"input": {
"workers": {
"thread1": {
"entity": {
"entityByName": {
"name": "example.com",
"type": "omc_host_linux"
}
}
}
}
}
}
}
"${workflow.omc.startTime}"
"${steps['REST step'].result.body}"
"${steps.provisioning.result}"
"${retry[0].vars.result}"
Example: Expressions
2-9
Chapter 2
Workflow Variables and Data Passing
"${steps.step1.result.myPublish[0]}"
2-10
3
Submit Workflows
Note:
For this release, Oracle Orchestration REST API documentation access will
be limited to approved customers. Contact your Oracle Support or Sales
Representative for more information about accessing and using the Oracle
Orchestration REST API. In addition, see the My Oracle Support note Oracle
Orchestration Master Note (Doc ID 2229523.1) for the latest information.
When you submit a workflow, one or more instances of that workflow are executed
immediately or based on the workflow schedule (if defined). Each execution runs the
steps using workers, both are defined in the workflow JSON.
There are two ways to submit a workflow in Orchestration:
• Submit Workflows Using UI
• Submit Workflows Using REST-API
3-1
Chapter 3
Submit Workflows Using REST-API
3-2
4
Schedule Workflows
As a cloud-based system, Oracle Orchestration is easier to manage and provides a
more secure replacement for a Linux CRON utility, or as a replacement for legacy
tools such as Control-M or HP Operations Orchestration. Oracle Orchestration gives
you a simple UI interface to run both on-demand and scheduled operations tasks.
Oracle Orchestration's workflow scheduling capability lets you:
• Schedule and organize tasks that were previously triggered manually.
• Provide visibility into workflows that were previously run through CRON or other
custom tools.
• Replace expensive and hard to manage legacy workflow schedulers.
• Seamlessly execute jobs across both cloud and on-premises IT data center
assets.
• As part of Oracle Management Cloud, provide rich integration with Oracle Log
Analytics Cloud Service and Oracle IT Analytics Cloud Service.
Examples of Scheduled Workflows
• Operating System: Log rotation, backups.
• Shut down development compute instances at night.
• Database Automatic Workload Repository (AWR) Generation, Data Guard
Monitor, Log File Manager, Gather Statistics.
4-1
Chapter 4
CRON Expressions
CRON Expressions
A CRON expression is a string that specifies a time schedule for triggering a workflow
in Oracle Orchestration. It consists of six required fields and one optional field, each
separated by a space, which together specify when to trigger the event.
4-2
Chapter 4
CRON Expressions
4-3
5
Manage Orchestration Workflows
When managing Orchestration workflows a user can Create, Read, Update or Delete
(CRUD) a workflow or set of workflows. These CRUD operations support the complete
lifecycle management of workflows. Further management actions such as Deactivate,
Schedule and Download can also be performed.
These operations, can be achieved within the main Workflow Library page under
Orchestration.
• Author (Create):
To author a new workflow in the Workflow Library, select the My Workflows tab.
This tab will show all your Active and Inactive workflows. Click on the + icon on the
top left corner and follow the steps in Author Workflows Using UI to create a new
workflow.
• Submit (Run):
To submit a workflow in the Workflow Library, select the My Workflows tab. Search
for the workflow you wish to run, click the drop-down menu on the left-hand side
and click on Run.
• Publish:
Workflows in draft first need to be published before the can be submitted for
execution. Navigate to the workflow library and select the Drafts tab. Select the
workflow to publish, click the drop-down menu on the left-hand side and click on
Publish. The workflow will now be visible under the My Workflows tab ready to be
submitted.
• Update:
To update a workflow, navigate to the workflow library and select the workflow you
wish to edit. Click on the drop down menu on the left hand side and click on
Update. This will take you to the Workflow Editor page where you will perform the
updates. Be aware that you will also need to update the version number within the
JSON Definition to be able to save or submit the updated workflow.
• Deactivate:
To deactivate a workflow in the Workflow Library, click on the Deactivate
command by clicking the drop-down menu on the left-hand side. This disables the
user from making any future submissions. A deactivated workflow will need to be
activated in order to allow any future submission.
• Delete:
To delete a workflow in the Workflow Library, select the My Workflows tab and
click the drop-down menu on the left-hand side of the workflow to delete and
select Delete. Deletions are permanent and unrecoverable.
• Download:
To download a workflow in the Workflow Library, select the workflow to download
by clicking the drop-down menu on the left-hand side and click on Download. This
will download the JSON syntax.
• Schedule:
To schedule a workflow in the Workflow Library, start by selecting a workflow and
clicking Submit from the drop down menu. This will take you to the Workflow
5-1
Chapter 5
Submission screen, here you can set the schedule to be One time, Recurring or
CRON expression. Recurring you can choose from 15 minutes, 30 minutes,
Hourly, Daily, Weekly, Monthly or Custom Interval. For CRON expression details
review: CRON Expressions.
5-2
6
Integrate Orchestration with Log Analytics
Oracle Log Analytics lets you monitor, aggregate, index, analyze, search, explore, and
correlate all log data from your applications and system infrastructure. Oracle
Orchestration can automatically upload workflow execution logs to Log Analytics for
further analysis, allowing administrators to fine tune workflows and extract important
execution information.
Note:
To successfully integrate Orchestration with Log Analytics, as a pre-requisite
discovered entities to be analyzed must be licensed with Log Analytics. For
further information on Log Analytics, please view Get Started With Log
Analytics.
To enable Log Analytics data gathering, navigate to the Workflow Submission page,
scroll down and expand the Log Analytics section and check mark Upload output to
Log Analytics. Once complete click the submit button on the top right corner. The
uploadToLA flag will now be added to the JSON code and you can run the workflow
with Log Analytics data gathering enabled.
Note:
Log Analytics can generate a large amount of data, before you enable the
uploadToLA flag make sure there is enough available disk space in your log
source location.
Once the Upload output to Log Analytics has been turned on, the uploadToLA flag will
be included in the JSON code at the submission level.
Once the log analytics enabled workflow has successfully executed, its details can be
viewed on the Log Analytics page. For further information on Log Analytics, please
view Get Started With Log Analytics.
6-1
7
Monitor a Workflow Submission
Oracle Orchestration gives you an intuitive way to view and analyze both the current
and historic status of workflow submissions using the Orchestration Workflows
dashboard. The Orchestration Workflows dashboard provides an overview of all
workflow submissions and execution activity. Each widget and data grid provides
valuable information and insight into the status and health of your workflows.
The information displayed in a widget or data grid pertains to a specific date range,
which lets you view workflow behavior more accurately. Each widget and data grid has
its own time selector.
The summary region provides a count of the total number of workflow executions as
well as a breakdown of the total by status (successful, failed or running).
Execution Details contains detailed information for Running, Completed and
Scheduled workflow executions.
• Running Executions displays the status and step details for workflow executions
that are executing but not yet completed.
• Completed Executions displays detailed information about workflow executions
that have completed all steps included in the overall elapsed time and step count
by status.
• Scheduled Executions displays a list of scheduled workflow submissions including
their next scheduled execution time and the user who submitted the workflow.
7-1
Chapter 7
7-2
8
Simplifying IT Management
Oracle Orchestration is much more than a simple way to automate IT administrative
tasks. The service’s comprehensive orchestration capabilities let you to plan, organize,
and automatically implement complex administrative and developmental workflows
that are typically carried out in IT and development environments. The following use
cases illustrate the flexibility of Oracle Orchestration and how it can save you
significant time and effort.
• Schedule Workflows
• Performing Bulk Configuration Management
• Automating Provisioning and Deployment
• Managing Incidents with Remediation Actions
• REST API Use Cases
8-1
Chapter 8
Managing Incidents with Remediation Actions
software release, Oracle Orchestration can automatically deploy the latest build to
machines within your IT environment. Some service benefits are:
• Lets your organization move toward continuous delivery (CD) by having your build
or continuous integration (CI) server trigger an Oracle Orchestration workflow to
execute the post-build deployment process and deployment verification testing.
• Lets you reuse those same jobs to deploy your software across all environments
automatically (zero-click) or with a manual trigger (one-click).
• Oracle Orchestration exposes its complete functionality using the REST API
interface, making it easy to integrate workflows with existing processes in your
organization.
Example Provisioning and Deployment Jobs
• Cloud resources: Create new Oracle Compute Cloud Service, Oracle Database
Cloud Service, Oracle Java Cloud Service resources.
• Component applications: Provision new instances of database, middleware, web
servers, and so on.
• Provision entire application stacks: Wire all topologies together.
Note:
Remediation Workflow submission require that workflows be authored using
V1.0 syntax, for more information on V1.0 syntax please see Author
Workflows Using V1.0 Syntax
8-2
Chapter 8
Managing Incidents with Remediation Actions
8-3
Chapter 8
Managing Incidents with Remediation Actions
8-4
Chapter 8
Managing Incidents with Remediation Actions
s
w
il
l
b
e
li
m
it
e
d
t
o
a
p
p
r
o
v
e
d
c
u
s
t
o
m
e
r
s
.
P
l
e
a
s
e
c
o
n
t
a
c
t
y
o
u
r
O
r
a
c
l
8-5
Chapter 8
Managing Incidents with Remediation Actions
e
S
u
p
p
o
r
t
o
r
S
a
l
e
s
R
e
p
r
e
s
e
n
t
a
ti
v
e
.
F
o
r
m
o
r
e
i
n
f
o
r
m
a
ti
o
n
s
e
e
t
h
e
M
8-6
Chapter 8
Managing Incidents with Remediation Actions
y
O
r
a
c
l
e
S
u
p
p
o
r
t
n
o
t
e
O
r
c
h
e
s
t
r
a
ti
o
n
M
a
s
t
e
r
N
o
t
e
(
D
o
c
I
D
2
2
2
9
5
2
3
8-7
Chapter 8
Managing Incidents with Remediation Actions
.
1
)
.
8-8
Chapter 8
Managing Incidents with Remediation Actions
8-9
Chapter 8
Managing Incidents with Remediation Actions
s
w
il
l
b
e
li
m
it
e
d
t
o
a
p
p
r
o
v
e
d
c
u
s
t
o
m
e
r
s
.
P
l
e
a
s
e
c
o
n
t
a
c
t
y
o
u
r
O
r
a
c
l
8-10
Chapter 8
Managing Incidents with Remediation Actions
e
S
u
p
p
o
r
t
o
r
S
a
l
e
s
R
e
p
r
e
s
e
n
t
a
ti
v
e
.
F
o
r
m
o
r
e
i
n
f
o
r
m
a
ti
o
n
s
e
e
t
h
e
M
8-11
Chapter 8
Managing Incidents with Remediation Actions
y
O
r
a
c
l
e
S
u
p
p
o
r
t
n
o
t
e
O
r
c
h
e
s
t
r
a
ti
o
n
M
a
s
t
e
r
N
o
t
e
(
D
o
c
I
D
2
2
2
9
5
2
3
8-12
Chapter 8
REST API Use Cases
.
1
)
.
Create an Alert Rule and Create an alert rule to be When an alert is triggered you
select the appropriate notified when something can:
Remediation Action which was happens, and under • View alert details by
published remediation action select the clicking on the alert
action you just published. message in the alerts
page
• See a history of what
happened when the alert
was triggered.
Remediation actions
triggered will show as
annotations within the
alert history.
• Under the Orchestration
Workflows see the
Execution details of your
workflow, see Monitor a
Workflow Submission for
more details
• Monitor the alert, it should
clear when the issue is
resolved
Note:
For this release, Oracle Orchestration REST API documentation access will
be limited to approved customers. Contact your Oracle Support or Sales
Representative for more information about accessing and using the Oracle
Orchestration REST API. In addition, see the My Oracle Support note
Orchestration Master Note (Doc ID 2229523.1) for the latest information.
8-13
A
Appendix A: Workflow Samples
The following are JSON workflow code samples to help get you started using
Orchestration:
Related Topics
• Example 1: Starting a Web Logic Server
In this V2.0 syntax example we see how to start up a web logic server using an
ENTITY step type.
• Example 2: Shutting Down a Web Logic Server
In this V2.0 syntax example we see how to shut down a web logic server using an
ENTITY step type.
• Example 3: Patch an Oracle Database Server with Input Parametrization
In this V2.0 syntax example we patch an Oracle Database server using input
parametrization. This is achieved by listing the host name, host credentials and
script path within the declaration section of the workflow.
• Example 4 Adding Wait Time in Seconds to a Workflow
In this V2.0 example we add wait time in seconds to a workflow using the WAIT
type step and the waitInSeconds parameter.
• Example 5: Single Step REST Call
In this V2.0 example we look at one of the simplest forms of a workflow, executing
a single step REST call.
• Example 6: Single Step REST Call with Variable Inputs
In this V2.0 syntax example we execute a single step rest call using a variable to
call upon the REST uri.
• Example 7: Single Step REST call with Workers
In this V2.0 syntax example we execute a single step REST call using workers to
execute the uri command.
• Example 8 Two Step Workflow Execute and Validate REST Calls
In this V2.0 syntax example we demonstrate passing information from one step to
another step. This example is also a multistep workflow sample.
• Example 9 Nested workflows Parent Child
In this V2.0 syntax example we will look at 2 JSON workflow code snippets. The
first sample is that of a Parent workflow calling on the second Child workflow.
Nested workflows work by having one workflow call upon a second workflow.
• Example 10 Remediation Workflow
In this example we see an example of a Remediation workflow for restarting a
WebLogic server and it's corresponding Remediation Action to start a Weblogic
server from an alert.
A-1
Appendix A
Example 1: Starting a Web Logic Server
{
"steps": [
{
"name": "start_weblogic",
"operation": {
"type": "ENTITY",
"parameters": {
"entity": {
"entityByName": {
"name": "host01.example.com",
"type": "omc_host_linux"
}
},
"command": "/bin/sh",
"arguments": [
"/u01/app/oracle/Middleware/Oracle_Home/
user_projects/domains/medrec/startWebLogic.sh"
],
"credential": "MySSHCred"
}
}
}
]
},
"input": {
"vars": {},
"workerVars": {
"worker1": {}
}
}
}
A-2
Appendix A
Example 3: Patch an Oracle Database Server(s) with Input Parametrization
"type": "ENTITY",
"parameters": {
"entity": {
"entityByName": {
"name": "host01.example.com",
"type": "omc_host_linux"
}
},
"command": "/bin/sh",
"arguments": [
"/u01/app/oracle/Middleware/Oracle_Home/
user_projects/domains/medrec/bin/stopWebLogic.sh"
],
"credential": "MySSHCred"
}
}
}
]
},
"input": {
"vars": {},
"workerVars": {
"worker1": {}
}
}
}
A-3
Appendix A
Example 4: Adding Wait Time in Seconds to a Workflow
},
"HostCredential": {
"type": "string",
"maxLength": 40,
"description": "Credential required to access the
host"
},
"ScriptPath": {
"type": "string",
"minLength": 1,
"description": "Full path to the script on the
Oracle database server"
}
}
}
},
"steps": [
{
"name": "Patch",
"operation": {
"type": "ENTITY",
"parameters": {
"entity": {
"entityByName": {
"name": "${workflow.vars.HostName}",
"type": "omc_host_linux"
}
},
"command": "sh",
"arguments": [
"${workflow.vars.ScriptPath}"
],
"credential": "${workflow.vars.HostCredential}"
}
}
}
]
},
"input": {
"vars": {
"HostName": "",
"HostCredential": "",
"ScriptPath": ""
}
}
}
{ "name": "WaitTime_Sample",
"version": "1.0",
A-4
Appendix A
Example 5: Single Step REST Call
A-5
Appendix A
Example 6: Single Step REST Call with Variable Inputs
}
}
A-6
Appendix A
Example 8: Two Step Workflow: Execute and Validate REST Calls
"method": "GET",
"uri": "${workflow.vars.uri}"
}
}
}
]
},
"input": {
"vars": {
"uri": "http://www.somewhere.com/rest/api",
"other": "value"
},
"workers": {
"worker1": {
},
"worker2": {
"vars": {
"uri": "http://www.somewhere-else.com/rest/api2"
}
}
}
}
}
}
A-7
Appendix A
Example 9: Nested Workflows
{
"name": "validate",
"operation": {
"type": "REST",
"parameters": {
"method": "GET",
"uri": "${steps.provision.result.uri}"
}
}
}
],
"publish": {
"result": "done"
}
},
"input": {
"vars": {
"REST_URL": "http://host01.example.com/provision/compute",
},
}
}
}
{"name": "SampleParentWorkflow",
............
"workflow": {
............
"plan": {
"steps": [
{
"name": "MyParentFirstStep",
............
"publish":{
"MyParentFirstStepVar1":"MyParentFirstStepVar1Value",
}
}
{
"name": "MyParentWorkflowStep",
"vars": {
............
"variable6": "var6",
A-8
Appendix A
Example 9: Nested Workflows
............
"variable100": "var100",
},
"operation": {
"type": "WORKFLOW",
"parameters": {
"workflow": {
"name": "MyWorkflowName",
"source": "MySourceName",
"version": "1.0",
"reference": {
"name": "MyLibWorkflowName",
"version": "1.0.0"
},
"input": {
"vars": {
"variable1": "hello world1",
"variable2": "${workflow.vars.myGlobalVar}",
"variable3": "${workflow.vars.myWf1Var}",
},
"workerVars": {
"wf1": {
"variable4": "hello world3",
"variable5": "$
{steps.MyParentFirstStep.result.MyParentFirstStepVar1}"
}
}
}
}
}
}
}
]
},
"input": {
"vars": {
"myGlobalVar": "myGlobalVarValue"
},
"workerVars": {
"wf1": {
"myWf1Var": "myWf1VarValue"
}
}
}
}
}
{"name": "SampleChildWorkflow",
............
"workflow": {
A-9
Appendix A
Example 10: Remediation Workflow
............
"plan": {
"steps": [
{
"name": "MyChildStep1",
............
}
{
"name": "MyChildStep2",
}
],
"publish":{
"MyChildWfVar1":"MyChildWfVar1Value",
"MyChildWfVar2":"MyChildWfVar2Value",
}
},
"input": {
"vars": {
"variable1" : "Child1",
"variable2" : "Child2",
"variableChild1": "variableChild1Value"
},
"workerVars": {
"wf1": {
"myWf1Var": "myChildWf1VarValue1",
"myChildWf1Var2": "myChildWf1VarValue2",
"myChildWf1Var3": "myChildWf1VarValue3"
},
"wf2": {
"myWf1Var": "myWf1VarValue"
},
"wf3": {
"myWf1Var": "myWf1VarValue"
}
}
}
}
}
{
"name": "Web Logic Server Start Demo",
"workflow": {
"plan": {
"name": "WebLogic_Start_WF",
A-10
Appendix A
Example 10: Remediation Workflow
"steps": [{
"name": "start_weblogic",
"type": "ENTITY",
"input": {
"command": "/bin/sh",
"arguments": ["/home/u01/WebLogic1221/user_projects/domains/
medrec/startWebLogic.sh"],
"credential": "MonitorCred"
}
}]
},
"input": {
"workers": {
"thread1": {
"entity": {
"entityByName": {
"name": "weblogicserver193.example.com",
"type": "omc_host_linux"
}
}
}
}
}
}
}
{ "type": "OrchestrationWorkflow",
"name": "Auto Remediate WebLogic Server Start",
"requestBody":{
"name": "Auto Remediate WebLogic Server by Starting",
"workflow": {
"plan": {
"name": "WebLogic_Start_WF",
"steps": [{
"name": "start_weblogic",
"type": "ENTITY",
"input": {
"command": "/bin/sh",
"arguments": ["/home/u01/WebLogic1221/user_projects/domains/
medrec/startWebLogic.sh"],
"credential": "emcosComplianceCred"
}
}]
},
"input": {
"workers": {
"thread1": {
"entity": {
A-11
Appendix A
Example 10: Remediation Workflow
"entityByName": {
"name": "${entity.hostName}",
"type": "omc_host_linux"
}
}}}}}
},
"responseBody": {
"annotation": "${'Submitted workflow 'response.name'. Submission Id =
'response.submissionId}"
}}
A-12