HPOO Flow Authoring Guide
HPOO Flow Authoring Guide
Document Release Date: March 2009 Software Release Date: March 2009
Legal Notices
Warranty The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. The information contained herein is subject to change without notice. Restricted Rights Legend Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. Copyright Notices Copyright 2008 Hewlett-Packard Development Company, L.P. Trademark Notices All marks mentioned in this document are the property of their respective owners.
The Central Help system is also available as a PDF document in the HP OO home directory, in \Central\docs. Help for Studio Studio Help instructs flow authors at varying levels of programming ability. The Studio Help system is also available as a PDF document in the HP OO home directory, in \Studio\docs directory. Animated tutorials for Central and Studio HP OO tutorials can each be completed in less than half an hour and provide basic instruction on the following: In Central, finding, running, and viewing information from flows In Studio, modifying flows Studio Welcome pane HP OO\Studio home directory, in the Tutorials subdirectory The Opsware Network
ii
Self-documentation for HP OO operations, flows, and Accelerator Packs Self-documentation is available in the descriptions of the operations and steps that are included in the flows.
Support
For support information, including patches, troubleshooting aids, support contract management, product manuals and more, visit one of the two following sites: https://support1.opsware.com/support/index.php http://www.hp.com/go/hpsoftware/DCA_support
iii
Table of Contents
Where to find Help, tutorials, and more .................................................................................... ii Finding or updating documentation on the Web................................................................. iii Support ................................................................................................................................................... iii Table of Contents ............................................................................................................................... iv This Help system and Guide ........................................................................................................... ii A good first place to go in Studio: the How Do I folder .................................................. 1 Introduction to flows.......................................................................................................................... 1
Key parts of a flow ................................................................................................................................................................ 1 What a flow needs to be valid .............................................................................................................................................. 2 Taking a flow beyond the basics ........................................................................................................................................... 3 Operations: Models for steps ............................................................................................................................................... 3
Multiple authors and version control ....................................................................................... 10 Starting HP OO Studio ................................................................................................................... 10 Visual overview of Studio .............................................................................................................. 10
Library pane ........................................................................................................................................................................ 10
iv
Authoring pane ................................................................................................................................................................... 13 Authoring pane toolbar ............................................................................................................................................... 13 Bookmarks pane ................................................................................................................................................................. 16 Icons pane........................................................................................................................................................................... 16 Object properties sheets .................................................................................................................................................... 17
Finding out which flows use an operation ............................................................................. 41 Copying flows and operations .................................................................................................... 41 Renaming flows or operations .................................................................................................... 42 Bookmarking flows and operations .......................................................................................... 42 Restoring deleted Library objects .............................................................................................. 42 Creating steps .................................................................................................................................... 44
Adding steps to a flow ........................................................................................................................................................ 45 Creating a step from commonly used flows and operations .............................................................................................. 46 Changing the Start Step ...................................................................................................................................................... 47 Copying steps ...................................................................................................................................................................... 47 Modifying a step ................................................................................................................................................................. 48 Re-arranging steps in the flow diagram .............................................................................................................................. 49 Prompting the user before running the step ...................................................................................................................... 49
Making a step single response ................................................................................................... 78 Checkpoints: Saving a flow runs progress for recovery .................................................. 78 Scriptlets ............................................................................................................................................... 79
Creating a scriptlet.............................................................................................................................................................. 80 Debugging a scriptlet .......................................................................................................................................................... 80 Saving a scriptlet for use elsewhere ................................................................................................................................... 82
vii
Adding and removing outputs ................................................................................................... 84 Changing the source of an output ............................................................................................ 84 Adding and removing step results ............................................................................................ 85 Changing the source of a result ................................................................................................. 86 Filtering outputs and results ........................................................................................................ 86
Creating a filter ................................................................................................................................................................... 86 Filter details ........................................................................................................................................................................ 88 Diff Case....................................................................................................................................................................... 88 Extract Number ........................................................................................................................................................... 88 Format ......................................................................................................................................................................... 88 Line Count.................................................................................................................................................................... 89 Regular Expression ...................................................................................................................................................... 89 Remove Duplicate Lines .............................................................................................................................................. 89 Replace ........................................................................................................................................................................ 89 Round Number ............................................................................................................................................................ 90 Scriptlet ....................................................................................................................................................................... 90 Select Line.................................................................................................................................................................... 91 Select Range ................................................................................................................................................................ 91 Sort .............................................................................................................................................................................. 92 Strip ............................................................................................................................................................................. 92 Strip Whitespace ......................................................................................................................................................... 93 Table ............................................................................................................................................................................ 93 Saving and re-using filters .................................................................................................................................................. 94
viii
Passing data from a subflow to a parent flow ...................................................................... 99 Changing which operation a step is based on ................................................................... 100 Step descriptions ............................................................................................................................ 101 Running flows automatically...................................................................................................... 101 Debugging flows ............................................................................................................................ 101
Debugging a flow .............................................................................................................................................................. 102 Changing values of flow variables within the Debugger ................................................................................................... 106 Working with breakpoints ................................................................................................................................................ 107 Overriding responses in a debug run ................................................................................................................................ 107
Logging in as another user......................................................................................................... 108 Repositories: Libraries for flows and their objects ............................................................ 108
Adding and opening a repository for authoring ............................................................................................................... 109 Moving flow elements between repositories ................................................................................................................... 110 Setting a target repository ................................................................................................................................................ 111 Publishing to and updating from the public repository .................................................................................................... 111 Publishing a repository: how to ........................................................................................................................................ 112 Updating from a repository: how to ................................................................................................................................. 114 Rolling back a publish or update....................................................................................................................................... 117 Exporting a repository ...................................................................................................................................................... 117 Importing a repository ...................................................................................................................................................... 118 Validating repositories ...................................................................................................................................................... 121 Encrypting repositories ..................................................................................................................................................... 121 Encrypting a repository .................................................................................................................................................... 121 Opening an encrypted repository ..................................................................................................................................... 122 Decrypting a repository .................................................................................................................................................... 122 Creating a second encrypted copy of a repository ........................................................................................................... 122
ix
Backing up and restoring repositories................................................................................... 123 Creating operations from Web services................................................................................ 123 Operating outside Central with Remote Action Services ............................................... 126
How Central runs RAS-dependent operations .................................................................................................................. 127 Checking the availability of a RAS ..................................................................................................................................... 127 Adding an existing RAS ..................................................................................................................................................... 127 Adding a RAS reference .................................................................................................................................................... 128 Reconfiguring an existing RAS reference .......................................................................................................................... 129 Changing RAS references .................................................................................................................................................. 130 Creating operations that access Web services ................................................................................................................. 131 Troubleshooting the running of RAS-dependent operations ........................................................................................... 132 Studio example: A flow that runs in any of multiple domains .................................................................................. 132 Creating operations from RASes ....................................................................................................................................... 132 Creating operations from a RAS ................................................................................................................................ 133 Removing a RAS reference ............................................................................................................................................... 134 Importing RAS content ..................................................................................................................................................... 134
Recording values for reporting in Dashboard charts ...................................................... 136 Domain terms for Dashboard charting ................................................................................. 137
Adding domain terms and domain term categories ......................................................................................................... 138
Displaying messages to users ................................................................................................... 138 Categories: classifying flows ...................................................................................................... 139 Selection lists for user prompts ................................................................................................ 140 System accounts: secure credentials ...................................................................................... 141
Creating a system account................................................................................................................................................ 141
x
Editing a system account .................................................................................................................................................. 142 Deleting a system account ................................................................................................................................................ 142
Creating a cmd operation with the Shell Wizard .............................................................. 157 Working with regular expressions ........................................................................................... 161 Testing and deploying flows ...................................................................................................... 163 Restricting use of flows ................................................................................................................ 164
Controlling who can see a flow in Central ........................................................................................................................ 164
Troubleshooting.............................................................................................................................. 167
A flow, operation, or system object that I know exists does not appear in my Library. .................................................. 167 The scriptlet in my operation does not run correctly. ...................................................................................................... 167 An error reports that I have lost the lock on the public repository .................................................................................. 167 After deleting a step then undoing the deletion, changes are not saved ........................................................................ 168
xi
xii
A very effective way to learn basic flow authoring tasks is to complete the Studio tutorial on modifying a flow before consulting this Help system. Advanced flow authoring This section goes into more depth in creating operations and steps, including defining inputs, moving information throughout a flow, and creating rules that logically determine the course of a flow based on each step. This section also includes an introduction that explores the architecture of and data flow in an operation and discusses the uses of the various kinds of operations Creating IActions for flow operations This section introduces IAction programming and its uses for extending flow functionality to integration with other systems and remote execution of flows.
ii
Introduction to flows
A flow is a set of linked actions that automate health checks, troubleshooting or any other repetitive IT support tasks. Say you want to verify that a page on your Web site contains the correct, current data, such as a certain piece of text. If the desired data is not on the Web page, you want to push new content to the site. Without Operations Orchestration Software, your options might be: Assign someone to look at the Web site every 15 minutes and, if necessary, manually publish content to the site. Program a monitoring system to check the site and raise events or alerts if the content isnt correct, with manual content publishing. One of your technical support personnel would have to see what is going wrong.
Or, with Studio, you could author a flow to do all those tasks automatically: check the Web site periodically, create an event or alert, publish content to the site, troubleshoot and repair the underlying problem, and document the steps taken. Lets use this example to learn about the basic concepts of a flow. A manual runbook or procedure for a person to do this site check might read something like this: Step 1. Browse to mysite.com/mypage.htm. If it does not contain the text needed text the n do Step 2. Step 2. Copy mypage.htm from server development1 to server production1. Step 3. Keep track of how often the Web page has the correct text and how often you need to fix the problem Studio is where you create the flows that automate the triage, diagnosis and resolution of problems, perform system and application health checks and handle repetitive maintenance procedures in your operations or data center. Just like the manual procedure, a flow has steps that gather data or take actions. Each step accepts data and responds to it, the steps response differing according to what it detects. Steps can also provide complete tracking of their actions by recording the data used in each step and what took place.
Inputs give the operation the data that they need to act upon. Our operation to check a Web page needs to know which page to check (mysite.com/mypage.htm) and what text to look for (needed text). Our copy file operation needs a source location and a destination. Inputs can be entered by the person running the flow, be set to a specific value, or obtained from information gathered by another step. Responses are the possible outcomes of the operation. Our get Web page operation has three responses: page not found, text not found, and success (if we got the page and it has the desired text). Our copy file operation might have just success and failure. Transitions: Our read Web page operation may need to respond differently if the Web page cant be found, if the page is there but the text isnt present, or if the page is there and the desired text is present. A transition leads from an operation response to one of the possible next steps, so that the operations response determines what the next step. A flow steps operation uses input data to perform a task, fr om which it obtains results. The operation has several possible responses, one of which is chosen depending on what its results were. Each response is connected by a transition to one of the possible next steps in the flow.
Thus the choice of response determines which the next step is in a particular run of the flow.
Figure 1 - Parts of a flow Now lets look at the main parts of an operation.
A way for each step in the flow to be reached in one run or another. A return step to return a value and end the flow. Assignment (definition) of how each input gets its value.
Those are the essential features of a flow. Provide them, and you will have a productive flow. To see how you can increase a flows value, see the next topic, Taking a flow beyond the basics and other topics referenced therein.
Flow Variables: You can store the results data in flow variables that you create. You can use this data as inputs to other steps later in the flow. Filters: Figuring out what response to take based on the data that a command returns may require filtering a key piece of data out of a result or creating a scriptlet that manipulates the data. Rules: Rules evaluate the operations results to determine which operation response to take when the step runs. Rules can evaluate any of the results fields, the data strings, return codes, or error codes. A given response for an operation is selected when the conditions described in the responses rule match the data that you have specified in or extracted from the one of the results fields. The rules that you create are comparisons or matches between a string of text that you describe in the rule and the results field that you select for the rule. Consider the get Web page operation in our example: The page not found response would be selected if the http return code were 404. The text not found response would be selected if text to check were not contained in the data on the page.
Scriptlets: Scriptlets (written in JavaScript or Perl) are optional parts of an operation that you can use to manipulate data from either the operations inputs or results for use in other parts of the operation or flow.
The following diagram shows how operations can get values from flow, step, and their own operation inputs, and how data in operation results can be passed to flow variables, thus becoming available to other parts of the flow.
Apply this diagram to a flow that runs the Windows command-line dir command on a directory: Flow inputs could provide two needed pieces of data: the host computer and the name of the directory to run the dir command against These two input data items could be stored in flow variables named host and directory, respectively. The operation inputs could obtain the values from the flow variables. After the operation performs its task based on the inputs, the step could assign the operation results to another flow variable, which another operation could use in another step in the flow.
When you create a step from an operation, each of the operations responses must be the starting point for a transition to another step. Thus during a particular run of the flow, the rules that evaluate the operations results determine the response of the operation, which determines the transition that is followed and therefore the path that the run follows through the steps.
4
Note: You can also set the operations result to supply values in fields to the result of a step created from that operation, then in turn set that step result to supply those values in fields to the flows result. You can use the flow result to pass the values to other flows.
Scriptlets are JavaScript or Perl scripts contained within an operation. Scriptlets are good for programming quickly, with relatively little customization of the operation. In addition to writing scripts in JavaScript or Sleep, this level of authoring requires that you understand: Input and flow variables Distinctions between steps and operations Distinctions between results, raw results, and responses Data filters
The primary output is the result that supplies a value to an input whose assignment is Previous Steps Result. b. Make changes to local and global flow variables and data values. c. Read the operation response value if theres a value present to be read, such as if the operation contains an IAction that uses a RAS. That IAction has a response, which the operation scriptlet can get and read. 5. If the operations scriptlet has not already set the operations primary result, the operations primary result is set now. 6. If the operations scriptlet has not already selected the operations response, the response is selected now, using the operations evaluation rules for selecting a response. 7. If the step has a scriptlet, that step scriptlet is executed. The step scriptlet can do the following: a. Select the operation response. d. Make changes to local and global flow variables. Note: The step scriptlet cannot set the primary result. 8. The transition that is associated with selected response is selected. 9. The next step is executed, using this same sequence.
In information flow through an operation, as shown in the following diagram, these parts of an operation play roles: Raw results If the IAction interface is part of the core functionality, the raw results are the data and state. Scriptlet An optional interpretive program that may be executed at the end of a step. The scriptlet often evaluates the raw results of the operation and produces the output data of the operation. Output data
6
The data produced by the operation, if any. Response The evaluation of the operations output and the resulting determination of the transition from among the possible transitions for the operations step.
Figure 3 - Information flow through an operation Note: Operations and flows in Integrations, Operations, and Utility Operations folders are sealedthat is, you cannot modify them other than to supply fixed, specific values for inputs.
There are significant differences between the operation and the resulting step:
For information on defining the data source for an input, see Inputs: Providing data to operations.
There are two kinds of outputs: The primary output, which is the output used to populate a step's result when the author specifies that the step get its result from the previous step's result. The operations author specifies the primary output by selecting a source field from the Extract Primary Output from Field drop-down list (You can create a filter for it, if you wish.) There are three kinds of step results: Raw result, which the step obtains from the collection of key value pairs representing the raw data that was returned from an operation executed in the context of a flow. For example, if you execute the ping operation on a windows XP machine, you will get the following results: { Code = 0 Error String = Output String = Pinging apple.com [17.254.3.183] with 32 bytes of data: Reply Reply Reply Reply from from from from 17.254.3.183: 17.254.3.183: 17.254.3.183: 17.254.3.183: bytes=32 bytes=32 bytes=32 bytes=32 time=24ms time=24ms time=25ms time=26ms TTL=244 TTL=244 TTL=244 TTL=244
Ping statistics for 17.254.3.183: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 24ms, Maximum = 26ms, Average = 24ms } You can filter the values of the raw results to create a more refined result. For example, if in the above data you are interested only in the average latency of the ping operation, you can select the Output String field of your operation and specify a series of filters which extract the 24ms token at the end of the string. For more information, see Filtering outputs and results. Other results, which are the results that the flow author has created on the Results tab of the step's editor. Other results, which the flow author creates and to which he or she assigns data from the operation.
Responses are the outcomes that are connected, each response by one transition, to a following step. Because you link a response to a subsequent step, the response is the determination of what the flow does next. Return steps are an exception: Return-step responses return an outcome for the entire flow. The following table shows which of the above pertain to operations, steps, and flows, respectively. Note, however, that you cannot change the handling of outputs for sealed operations. Raw Outputs Operations Steps Flows Outputs Results Responses
Starting HP OO Studio
To start Studio In the OO home directory (by default, C:\Program Files\Hewlett-Packard\Operations Orchestration), in the Studio subdirectory, click or double-click Studio.exe. OR Click the Windows Start button, point to All Programs, Hewlett-Packard, and then click Operations Orchestration. OR If there is a Studio shortcut on your desktop or in the programs above the Start button, click the shortcut.
Repository pane
The content of the Library pane falls within two folders: The Library folder, which holds all the flows and operations that you get when you install Studio. The Configuration folder, which holds other OO objects (also called Library objects in this guide) that you will use to process operation results, report results data for Dashboard charting in Central, and facilitate the running of flows both inside and outside Central, and remotely.
10
Figure 4 - Library, in Repository pane Expanding the Library folder and then the flow folders reveals the default Studio content: flows and operations that run with various technologies. In the following screenshots, which show the content folders expanded, you can get an idea of the flows and operations that are available for building flows.
Figure 5 - Folders with content (flows and operations) that is supplied by default
11
The above illustrations open each of the folders that contain default content to their first level. Theres a lot there; other parts of the documentation set and some of the tuto rials focus on how to zero in on and use the specific flows and operations that you need. Study the top-level folders and their descriptions below; they can help point you toward the flow or operation that you need: Accelerator Packs These flows are designed to provide the following on most networks: Complex health checks, triage, diagnosis, or remediation flows. Simple flows that gather one or more pieces of data and display it to the user, or simply acknowledge alerts, gather some data, and place it into a ticket.
The flows at the top level of an Accelerator Pack tend to be full health checks, triage, diagnosis, and remediation. Integrations Operations and flows that can be used from OO to interact with third-party systemsmanagement products. ITIL This folder contains flows that automate integrations to other Enterprise-level software in accordance with ITIL specifications. Operations This folder contains general-purpose operations that work with common technologies. These operations are sealed and cannot be changed once you have installed HP OO Central (Central). Because you cannot change operations in the Operations folder, they should not have any static values set for inputs. All inputs should either prompt the user or be No Assignment. There are exceptions to this rule, such as when a very general purpose operation such as a WMI command is used. The flows in the Operations folder and subfolders are meant to work as subflows or operations. Flows that you would want to run as the parent flow are in the Accelerator Packs. Utility Operations This folder contains operations and subflows that gather and display data, replace simple command-line operations, manipulate and analyze data, provide structure to flows, and other non-technology-specific functions. In the list of folders and flows, subflows (such as Get User Account (Auto-logon) are indented from their parent flows (such as Fix Auto-logon Account). As you explore the Library, the following table explains some of the icons youll encounter. This is a flow. The white circle means that this folder and all the flows that it contains are hidden from Central users, thus do not appear in Central (no operations ever appear in Central). You can hide individual flows within a folder. The lock means that the folder and all the flows and operations that it contains are sealed: You cannot modify the flows and operations in this folder. You can, however, duplicate them and then make changes to the copy.
This Warning symbol is superimposed on the symbol for a flow or operation that is incomplete or invalid.
12
In the Library, you can identify operation types by the icons that represent them.
Authoring pane
The authoring pane is the large, right-hand area in the Studio where you work on flow diagrams, adding steps and the connections between them to a flows diagram and setting properties that determine how flows and their parts work.
Figure 6 - Flow authoring toolbar If you have the Central public repository open in Studio, the checkin/checkout icon ( shows at the left end of the toolbar, beside the Save icon. For more information on the checkin/checkout icon, see Version control of Library objects. ) also
Some of the toolbar icons are grouped in two palettes, which you open by clicking either ones downward-pointing arrow: Steps and callouts ( View options ( ) )
The remaining icons on the toolbar should be familiar, with the possible exception of: Select in Repository Tree ( youre working on. Debug in Studio Debugger ( flow in it. ) expands the Library to select the flow or operation that ) opens the Studio Debugger and starts a run of the current
13
Figure 8 - View options palette The icons on the palette do the following:
Show/hide responses toggles to represent each of a responses inputs with an icon like those of the flow return steps.
Align...vertically aligns the steps that are selected vertically. Send to back moves the selected step to the back of the stack. Bring to front moves the selected step to the front of the stack.
14
Show Grid reveals the authoring canvas grid, which you can use for arranging steps. The flow diagram is also the field on which you can directly do much of your work on the flow.
Figure 9 - Flow diagram In addition to the diagram parts that you saw illustrated in Key parts of a flow, note also the following pieces of the diagram above:
A step that has been made a breakpoint for debugging purposes is outlined in yellow and black, as above. When you let a flow run automatically in the Debugger, it stops at each breakpoint that you have designated.
15
The transition above actually represents five transitions. Each transition is labeled with the response that is its source. When multiple transitions start from the same source step and go to the same destination step, they are represented visually by a single line. The names of the responses that are the sources all appear, as above. You can click the response name for a transition to move the transition or to open its Inspector.
Bookmarks pane
The Bookmarks pane (expandable from the Bookmarks tab in the upper-right of the window) makes it easier to find and use the operations and flows that you use frequently. You can add flows and operations that you use a lot to the lists by dragging them from the Library. For more information, see Bookmarking flows and operations.
Icons pane
The Icons pane (expandable from the Icons tab in the upper-right of the window) contains numerous libraries of operation icons that you can use to make it clear more quickly what a steps operation does. These icons replace the default operation icon on a step that you drag the icon to.
16
17
18
Important: Only the development/testing installation of Central should have multiple authors work in it. (Specifically, multiple authors should never have access to the Central installation in your production environment.) For example, suppose that Gloria checks out FlowA, which is at version 2 when she checks it out: In Glorias Studio, as soon as Gloria saves changes to FlowA, its version number changes from 2 to 3. When any the other author (including the admin user) opens FlowA in Studio, he or she sees version 2 of FlowA. Further, the canvas for FlowA is gray rather than white, indicating that it is read-only because it is checked out by a different author (Gloria).
After Gloria checks FlowA back in, others can see the now-current version (version 3) of FlowA, and it is available for checkout. An administrator (a user who is a member of a group with the ADMINISTRATOR capability) can forcibly revert an authors checkout, even if that author is also an administrator. When the administrator reverts an authors checkout, a message alerts the affected author. Checking out and checking in a Library object Managing versions
Following are a few limitations and considerations for the checkin/checkout feature: To check out an object, you must have READ and WRITE permissions for the object.
20
You can check out a folder and its contents, including subfolders as long as no one else has already checked out a subfolder. When you check out an object, you are checking out only the object (unless youre checking out a folder and its contents, as described above). You are not checking out objects referenced by the object. For instance, if a flow uses an operation that uses a system account, when you check out the flow, neither the operation nor the system account are checked out by virtue of your having checked out the flow. When you do any of the following with an object, it is automatically checked out to you. To convey these changes to the public repository, you must check the affected objects in. Copy Paste Cut Move Delete Save As Import a repository
To move, rename, or delete a folder, you must have checked out all the objects within the folder, in addition to having READ and WRITE permissions on all of them.
Checking out a Library object Checking in a Library object Forcible checkins by an Administrator
To check in a folders contents recursively, including its subfolders and their contents, you use the Check In Tree command. When you do any of the following with an object, it is automatically checked out to you. To convey these changes to the public repository, you must check the affected objects in. Copy Paste Cut Move Delete Save As Import a repository Check-in comments help you track whats been done to the object per version. If you ever need to recover an earlier version, comments can help you zero in on the one you want to recover.
To check in a Library object 1. With the object open in the authoring pane for editing, click the checkin icon ( OR, whether the object is open for editing or not: In the Repository pane, in the Library or Configuration folder: a. Right-click the object you want to check in. b. From the context menu that appears, point to Repository, and then click Check In. The Check In dialog box appears. ).
Figure 13 - Check In dialog 2. In the Enter Check In Comments box, type a comment that seems suitable to you. This is often a description of the changes that you made to the object. 3. Click OK. To check in a folder and its contents 4. In the Repository pane, right-click the folder. 5. From the context menu that appears, point to Repository, and then click Check In Tree.
22
Managing versions
There are two ways to restore an earlier version of an object thats been checked in: Abandon any saved changes that you made to the object while it was checked out. Reverting a checkout does away with changes that have been made since the object was last checked out. Once the object is checked back in, there is no checkout to revert. To recover an earlier state of the object, you must open a previous version of it. OR Open (and then check in, if you choose to) a previous version of the object. Opening a previous version of the object automatically checks it out to you. Abandoning changes Opening an earlier version of an object
Abandoning changes
Suppose youve made some changes to an object and saved the changes, and now you dont want the changes to be preserved. You can abandon the changes. Abandoning changes automatically checks the object back in to the public repository. Checking an object in and abandoning the changes you made to it while you had it checked out restores the objects status in the public repository to checked in and restores its state to what it was before checked out. Other authors can check the object out. To abandon changes 1. In the Repository pane, right-click the object you want to check in without preserving the changes youve made. 2. In the context menu that appears, point to Repository, and then click Abandon Change(s).
23
Figure 14 - Selecting a version 3. From the list of versions, double-click the one you need. Or, if you dont need any, click OK. If you recovered an earlier version, it is now the version in your workspace, which is hwat you see in Studio. 4. To restore this recovered version of the object to the public repository, check it out, then check it in.
Creating a folder
Whether you create a flow or copy one for modifying, you may want to create a new folder for it. To create a folder 1. Right-click the Library folder in the navigation pane and click New Folder. 2. In the dialog box that appears, type the name of the new folder in the text box, and then click OK. Notes: In Studio, you cannot give two folders the same name. Naming in Studio is not case-sensitive. Names can be a maximum of 128 characters long.
Creating flows
Lets suppose that you want to check a network connection between your computer and a server. The following topics will guide you through creating and modifying a flow that pings the server and runs a traceroute command on the network between your computer and the server. We will change the flow inputs from user prompts to specific values, in order to make it possible for the flow to run fully automatically. Our work will follow approximately these general steps: 1. Create a folder for holding the flow and its operations. 2. Get started with one of the following means: Finding the flow that you want to use and making a copy of the flow (see Finding a flow or operation). To get the flow that you want to work on, you might need to import a repository. In our example you dont, but for information on importing a repository, see Importing a repository.
24
3. If necessary, change how values are assigned to inputs. 4. Record reporting data (identifiers for aspects of the flow) for the inputs. 5. Look at the results and filters of each operation to make sure youre getting the data you need out of the operations. 6. If you need more flow variables, create them. 7. Review the flow, step, operation, and transition descriptions for usefulness to Central users. 8. Test the flow. 9. To make the flow available to Central users, you publish your repository.
Creating a flow
The main steps of creating a flow, once you have created or imported the operations that you will use in it, are: 1. Creating the flow, as described in this section. 2. Adding operations as steps. 3. Creating connections (known as transitions) between steps so each response for a step takes the flow to another step. 4. Creating one or more return steps to end the flow and assigning each return step a flow response. 5. Saving the flow. 6. Debugging the flow. For information on debugging a flow in Studio, see Debugging a flow in Studio. Tip: To help with understanding the steps, open the Restart Service Tutorial Flow.
Note: To create a blank flow, right-click a folder, point to New, and then select Flow. To open the Restart Service - Tutorial flows Properties sheet and authoring canvas 1. Find the Restart Service Tutorial Flow in the Library. 2. To open the Restart Service Tutorial Flow Properties sheet, right-click the flow name and then click Properties. 3. To open the Restart Service Tutorial Flow canvas in the authoring pane, double-click the flow name. To create a flow 1. Highlight the folder in which you want to create the flow. 2. From the File menu, point to New and then click Flow. 3. Name the flow, using standard characters. In Studio, you cannot give two flows the same name. Naming in Studio is not case-sensitive. Names can be a maximum of 128 characters long.
A new flow diagram appears in the authoring pane. You can also create a flow from one of several templates that are designed specifically for completely some frequently undertaken tasks. These templates give you a head start by providing the steps needed to complete those common tasks. For information on creating a flow from a template, see Creating a new flow.
25
In the Library, the new flow is marked with the Warning symbol ( ) and its name appears in red as long as it is incomplete. Moving the cursor over the name of an incomplete flow displays a tool tip that specifies how the flow is incomplete.
Figure 15 - Templates for commonly used flows 2. Select the flow template that meets your needs, and then click Create. The flow opens in the authoring pane.
also contain a folder called Samples which show you examples of using many of these operations. Note that the Accelerator Packs, Integrations, Operations, and Utility Operations folders are sealed, as indicated by the lock on the folder icon ( ). It contains sealed (read-only) flows and operations. Sealed flows and operations are so widely useful and fundamentally important that HP OO does not allow them to be modified. You can make copies of sealed flows and operations and modify the copies. Tip: To provide yourself with quick access to flows and operations that you commonly use, drag them to the Bookmarks pane. For finding a flow or operation, the Search tab is a very useful alternative to browsing the Library. The Studio Search engine uses the Apache Lucene syntax. For more information on using the Search tab and the Apache Lucene syntax in Studio, see Searching for a flow or operation. Note: If the flow you need is in a repository that is not part of either your local Studio repository or the remote Central repository, you can get the flow into Studio by one of the following, depending on where the flow and its dependent objects (operations, system accounts, and other system objects that the flow uses) reside: Updating the local Studio repository from the Central repository Importing the remote repository into your local Studio repository
Topics within this section Searching for a flow or operation Descriptions: Finding the right operation
Figure 16 - Studio tabs To keep the Search pane open, click the pin icon ( ) in the upper-right-hand corner of the pane.
For most of your searches you can simply type the search term you are interested in and press ENTER on the keyboard. For instance, to search for the Restart Service flow, in the Search text box, you could type Restart Service or just service. The search results are displayed with the most relevant first. You can sort by any of the columns by clicking on the column header. Note that the Type field will help you determine whether the search result is an operation or a flow.
Figure 18 - Search results Note that you can read the flow or operations description, to see whether its the best choice. To quickly employ an operation or flow from the list of search results Open an operations Properties sheet or a flows diagram by double-clicking in the row of the operation or flow of interest. OR Drag an operation onto a flow diagram. To narrow your search down to particular fields Use the search syntax: <searchable_field_name>:<string to search for> Tip: The search uses a Boolean AND. If you type two words, the search returns only operations or flows that contain both words.
You can search for the following field names. Note that this list includes sample search strings. Flow or operation name Examples: name:Get Temp Dir name:Clear Temp Dir Operation type Examples: type:cmd Category Example: categories:network Input name Example: inputs:server Flow or operation ID Example: id: 1234-3453-3242-32423
28
Tips: When you have found an operation or flow that interests you, you can learn more about how to use it by locating it in the Library, right-clicking it, and then clicking either What Uses This or What Does This Use. For more information, see Finding out which flows use an operation. Before you search for an operation or flow from which a step was created, you can save yourself time by checking out the Advanced tab on the steps Inspector. The Advanced tab shows which operation or flow a step is associated with and the location of the flow or operation.
Note: Besides describing the flow, the description also tells you about the flow inputs, giving you hints to the kind of values to provide the inputs. To see an operations description Open the operation in the authoring pane, then click the Description tab. OR Double-click a step that was created from the operation and in the Inspector that opens, click the Description tab. Note: Besides describing the flow, the description also tells you about the flow inputs, giving you hints to the kind of values to provide the inputs. Tip: You can see operation and flow descriptions in the results area of the Search tab. For information on searching for an operation or flow, see Searching for a flow or operation. If you want to further explore an operation, highlight the step whose operation youre interested in, open its Inspector (by clicking the icon), and click the Description tab. Because the step was created from its operation, its description is the description of the operation. The description tells you about the operations (and steps) inputs and the operations responses and results, explaining each one. It may also include notes on restrictions and tips on usage, as in the following description of the Exchange Server Info operation.
29
You can also customize the format of the self-documentation that you generate. For more information, see Generating documentation in a custom format. Note: You cannot generate documentation on folders (such as subfolders of the Integrations and Operations folders) that are hidden in Central or on their contents. The Integrations, Operations, and Utility Operations folders are hidden from Central. Tip: To generate documentation for yourself on the contents of hidden folders, you can copy the folder to another location in the Library and then generate documentation for the copy.
30
To generate documentation of flows with the right-click command 1. Right-click the folder whose contents you want to see information about. 2. From the context menu that appears, point to Generate Documentation, and then click Standard Format. OR Create a flow that uses a Generate Documentation operation. For information on creating a Generate Documentation operation, see 3. In the Choose an output directory dialog, specify where OO should put the HTML files. The folder content for which you have generated documentation appears in your Web browser.
Figure 20 - Generated documentation for the Database Accelerator Pack 4. To view the operations in a subfolder, click the subfolder.
Figure 21 - Operations in the Accelerator Packs/Database/Microsoft SQL Server/Health Check/ subfolder 5. To view the documentation for a single operation or flow, do one of the following: Click All Operations in <foldername>, and then, in the list in the lower-left pane, click the operation or flow youre interested in.
31
After drilling down to the folder that contains the operation of interest, in the list in the lower-left pane, click the operation or flow.
The following screen shots show the documentation and diagram for the flow Integrity Check for DB.
Figure 22 Descriptions for flow, inputs, and responses of the flow If you scroll down, you find the flow diagram, then a repeated listing of the inputs and responses, then explanations of the steps in the flow:
32
Figure 23 - Detailed information about a flows steps Topics in this section Enabling Central users to generate documentation Generating documentation in a custom format
In addition, Central users can schedule the flow, which can take a while to generate its output if there are a large number of flows in the folder selected, at times of low Central usage. Further, assuming that the Central repository in the production environment is periodically updated with flows or flow changes promoted from the staging environment, regular scheduling of a Generate Documentation flow keeps the Central users fl ow documentation up to date. To create a flow with a Generate Documentation step 1. Create the flow.
33
For more information on creating flows, see Creating a flow. 2. Create a new operation, selecting Generate Documentation for the type of operation. In the operations properties, in the Library Path box, either type the location of the folder for which you want to generate documentation or click the Browse button to navigate to it. The Library Path always begins with /Library/. Usage of the operation: If you specify a folder that is hidden from Central, you will be providing Central users with documentation on flows and operations that they cannot see in Central. Note: If you specify a Library Path, the path may need to be updated in the operation if the Library folder structure changes. If you leave the Destination Directory field as a user prompt, the Central users can output the generated documentation to a folder of their choosing. By default, the Destination Directory field tries to get its value from the doc_targetDir flow variable. You can add a flow input that: Assigns its value to the doc_targetDir flow variable. The user can then assign a constant value when scheduling the flow.
For more information on creating operations, see Creating a new operation. 3. Create a step in the new flow using the Generate Documentation step. 4. Complete the flow with the Success and Failure return steps and steps providing any other functionality you desire.
34
Figure 24 - The Generate Documentation frameset In this topics descriptions of the templates, note the following definitions of the frames: overview-frame upper-left frame
35
Figure 28 - Operation frame Topics within this section .vm template file descriptions Structure of Generate Documentation output Modifying Generate Documentation templates
Generates a list of the subfolders of the folder and places it in the overview frame (upperleft). All_ops_template.vm Generates a list of all operations and places it in folderFrame (lower left). Header.html Places the header in headerFrame (upper right) Folder_overview_template.vm Generates information about one or more operations and places it in opFrame (lower right) All_folders_template.vm Generates a table of contents for the folders. Header.css See definition below. All_ops_template.vm Generates a list of all operations and creates a link to display it in folderFrame (lower left). Folder_contents.vm Generates a list of the clicked folders contents and creates a link to display it in folderFrame (lower left). All_ops_template.vm Generates a table of contents for all operations and the documentation for every child operation. Header.css See definition below. Op_template.vm Generates and creates link to display it in opFrame (lower right). Folder_overview_template.vm Generates a tabular summary describing the contents of a folder. Header.css See definition below. Folder_contents.vm Generates and creates link to display it in folderFrame (lower left). Op_template.vm Generates documentation for a single operation Header.css See definition below. Folder_template.vm Generates and creates link to display it in same frame (up to parent folder). Folder_contents.vm Displays folder contents in folderFrame. Flow_template.vm Generates the documentation for a single flow. Header.css See definition below.
37
Flow_template.vm Generates and creates link to display it in same frame (up to parent folder). Folder_contents.vm Generates a list of the folder contents and creates link to display it in folderFrame (lower left).
Folder_contents.vm Generates a table of contents for a single folder. Header.css See definition below. Op_template.vm Generates and creates link to display it in opFrame (lower right). Header.html The Hewlett-Packard banner Header.css Style sheet used for general fonts, colors, etc. Hp_rockwell.css Style sheet for the Hewlett-Packard banner Hp_steps_307x39.jpg Graphic for the Hewlett-Packard banner Logo_hp_smallmasthead.gif Logo for the Hewlett-Packard banner
Now, when you use the Generate Documentation command, the following will appear in the Select Documentation Generation Template drop-down list: Better_all_ops_template.vm
39
Better_folder_overview_template.vm Better_folder_template.vm
4. From the drop-down list, pick Better_folder_template.vm. For information on the structure of the .vm files and interaction of the frames that they define, see Template file descriptions and Structure of Generate Documentation output. To generate documentation in a custom format 1. Navigate to ..\Hewlett-Packard\Operations Orchestration\Studio\extra\template. 2. For any template that you want to customize: Make a backup copy of the template. Make a copy of the template. Rename the copy. In a text editor, make your changes to the copy. Back up the custom version of the template.
When you upgrade Studio, the templates will be overwritten. You can use the backups of your changed templates to restore your changes to the upgraded templates. 3. In Studio, right-click the folder whose contents you want to see information about. 4. From the context menu that appears, point to Generate Documentation, and then to Custom Format. 5. In the Select Documentation Generation Template dialog that appears, from the dropdown list, pick the custom template that you want to use. The Specify root file name dialog appears.
Figure 29 - Picking a target location for output 6. Navigate to an existing folder in which you want the generated HTML files to be placed.
40
7. In the File name box, type the name of the start-page file, and then click Save. By default, the name of the start file is index.html, which automatically opens in your default Web browser. If you give it a different name and/or extension, you will have to manually choose the program to use for opening the start page. The documentation is generated.
These referenced flows and operations are valuable as samples that you can copy, paste, and modify. To view an operations references 1. In the Library, right-click the operation or flow. 2. To view the references to the operation or flow, click What Uses This. OR To view the references from the operation or flow, click What Does This Use. Tip: To bring the last obtained references back up after you closed the References panel, click the References tab.
Note: If the changes you want to make are necessary only for a few uses and can be made in a step that was created from the operation, you may not need to modify the operation, but instead to make the necessary changes in the step. For more information on the differences between steps and operations, see Advanced flow, step, and operation concepts. For information on modifying steps, see the following topics: Inputs: Providing data to operations Outputs, responses, and step results Changing which operation a step is based on
You can copy, duplicate, and rename flows and operations with the context (right-click) menu. To copy or duplicate flows or operations 1. In the Library, find and right-click the flow or operation. 2. Point to Edit, then point to either Copy, Copy Deep, or Duplicate. If you duplicate the operation, the duplicate is automatically placed in the same folder as its original. If you copy the operation, you can paste it (CTRL+V) in any folder that is not sealed. If you click Copy Deep, not only the flow but also all the operations that the flow uses are copied.
3. If you clicked Copy, navigate to the location where you want to place the copy and then click CTL+V. You can rename the copy. Now youre ready to work with the flow.
When you delete a Library object (a flow, operation, or an object in the Configuration folder of the Library), it is removed from the Library. However, you can view a list of the objects that you deleted, and then restore any of them that you want back. The record of deletions starts from the first deletion you committed after installing Studio. Note: You must have read and write permissions for a deleted object that you want to restore. To restore a deletion 1. On the Repository menu, click View Delete History. Your history of deletions appear in the following dialog.
Figure 30 The history of deletions You can move through the history a page at a time with either the forward ( back ( ) browse buttons. ) or the
2. Click the Select box by the deletions that you want to restore, and then click Restore. Note that you can: Select All of the deletions for restoring. Clear All Selections that you have made. Cancel the restore action.
3. If the object that youre restoring was in a folder that was deleted since you deleted the object, the following dialog appears:
43
Figure 31 - Error when parent folder has been deleted To stop trying to restore the object, click Skip. OR To specify a new folder for the object, click Browse, navigate to and select the new folder, and then click OK. 4. If the object that youre restoring resided in a folder that was moved since you deleted the object, the following dialog appears:
Figure 32 Error when parent folder has been moved To stop trying to restore the object, click Skip. OR To specify a new folder for the object, click Browse, navigate to and select the new folder, and then click OK. OR Click Use Moved to restore the object to the parent folder at the parent folders new location.
Creating steps
There are several simple ways to create a step from an operation or flow (remember that when you create a step from a flow the flow is treated as a kind of operation). When you create a step from an operation, the step is an instance of the operation and so inherits the operations inputs, results, references, etc. You can change those elements of a step without affecting the operation from which the step was created. Important! Changing inputs or results on the operation that underlies the step also changes the inputs or results for every step that is an instance of that operation. Making changes to operations can therefore break any step (and its flow) was created before you changed the inputs, etc. in the operation. Operations should be generic enough to base many particular steps on them. Then you can make changes in the step to respond to particular situations. Adding steps to a flow Creating a step from commonly used flows and operations
44
Changing the Start Step Copying steps Modifying a step Re-arranging steps in the flow diagram Prompting the user before running the step
The flows at the top level of an Accelerator Pack tend to be full health checks, triage, diagnosis, and remediation. Integrations Operations and samples for using them that integrate HP OO with other enterprise software products, such as Hewlett-Packard Network Node Manager and BMC Remedy. Using these may require a creating a custom flow, because of the level of customization typical of enterprise software products that are used in a given datacenter. ITIL This folder contains flows that automate integrations to other Enterprise-level software in accordance with ITIL specifications. Operations This folder contains general-purpose operations that work with common protocols and software systems, such as LDAP and Linux. These operations are sealed and cannot be changed once you have installed HP OO Central. Because you cannot them, they should not have any static values set for inputs. All inputs should either prompt the user or be No Assignment. There are exceptions to this rule, such as when a very general purpose operation such as a WMI command is used. The flows in the Operations folder and its subfolders are meant to work as subflows. Flows that you would want to run as the parent flow are in the Accelerator Packs. Utility Operations Flows and operations that provide low-level functions that can be used across nearly the entire spectrum of technologies. These flows and operations provide capabilities such as calculating and filtering date and Time, and performing mathematical manipulations and comparisons.
45
Note: When you create a step in a flow by dragging a flow from the Library to the current flow canvas, the flow that you drag becomes a subflow of the flow into which you drag it. The first step that you drag to the flows canvas automatically becomes the Start Step of the flow , which is signified by a green outline of the step. Important: The step that you create should not be confused with the operation or subflow that the step is associated with. Steps are particular instances of operations or flows. If you make changes to make the effect of the operation specific to your flows current needs, you should make these changes on the step. For instance, to specify a host machine for the operation to run against, you should specify the host in an input to the step rather than to the operation. If you were to specifxy a particular machine in one of the operations inputs, the operation would break any flow that the operation was part of and that could not properly run against that machine. To add a step to a flow 1. From any one of the following, drag an operation or flow onto the authoring canvas: Repostory pane Search results Bookmarks panel
You probably want to rename the step to reflect its function within the flow (operation names are more generic than their use in a particular step). 2. To rename the step, in the flow canvas, right-click the step, click Edit Name, and then type the new name and press ENTER. 3. Configure the step as needed: Adding and defining data sources for inputs For more information, see Inputs: Providing data to operations. Adding results, defining and filtering their data sources, and storing their values in flow variables, and adding responses that determine the next step in the flow For more information on these items, see Outputs, responses, and step results. Adding transitions For more information, see Transitions: connecting responses to steps. In addition to creating a step by dragging an operation or flow onto a flows authoring canvas, you can create a step by copying an existing one.
MS SQL Server Connectivity Restart Windows Server manual SSHCommand Counter SendMail Iterator Ping RunScript Restart Windows Service EnableNode Http Client Detailed Return JRAS Command Release Lock Acquire Lock
Common Operations
To create a step from a Favorite Flow or Popular Operation 1. Open your flow in the flow canvas of Studio. 2. Do one of the following: In a blank area of the flows authoring canvas: OR Click the Bookmarks tab and then, in the Bookmarks pane that appears, drag either a flow from Favorite Flows or an operation from Common Operations to the flow diagram. Right-click, point to Insert, and then to either Favorite Flows or Popular Operations. In the menu that appears, click the operation or flow that you want to add to the flow.
3. Modify the step as needed, and connect it to its preceding and succeeding steps in the flow.
Copying steps
You can use an existing step as the basis for creating a new step in the same or a different flow, by copying the step, then renaming and modifying the copy. Doing so, you can save yourself time defining inputs, and creating filters, results, and other flow objects. Tip: In addition to the following two methods, you can also copy a step by holding down CTRL and dragging the step where you want a copy of it. To copy a step 1. On the canvas, right-click the step and then click Copy.
47
2. Right-click anywhere on the canvas and click Paste. To copy a step from one flow to another 1. Open the Design tab of the flow that has the step you want to copy. 2. Highlight the step, and then copy it using the right-click menu or the standard Windows accelerator keys for Copy (CTRL+c). 3. Open the Design tab of the flow where you want to use the step. 4. Paste the step where you want it. 5. Save your work.
Modifying a step
To change a steps inputs, results, or anything else about it other than where its transitions go, you open the steps Inspector. To open the steps Inspector 1. Double-click the step. OR Right-click the step and, in the right-click menu, click Properties. The Inspector opens, looking something like the following:
2. To keep the Inspector open so that you can shift its focus from step to step or to a transition without having to close and reopen the Inspector, click the pin icon ( ) at the right end of the Inspectors title bar.
48
49
Figure 33 - Transitions in a flow In addition to simply connecting steps, transitions are valuable for: Control who can continue with the flow beyond the transition. You might want to limit who can continue executing a flow beyond a certain transition for security reasons or because of who has the necessary knowledge to continue using the flow. You can exercise this control with gated transitions, or transitions that require membership in a certain HP OO role for the account that executes the flow. Gated transitions are colored red in the flow diagram in both Studio and Central. Provide a basis for calculating the value of a run of the flow. When you assign a value to a transition, then if the transition is followed during a run of the flow, its value is added to the value of the flow for that run. The total value of the flow for that run is the sum of the values that have been assigned to the transitions that were followed. Central users can see this value in the Central dashboard. Providing flow users with information on what happened in a step. Because what takes place in a step determines which transition is followed, the transitions descriptions appears in the Results Summary area of Central as the Message describing what happened in each step. The following screen shot from Central shows four transition descriptions, as they appear in the Results Summary area. Note that they describe what happened in the step from which they originated.
50
Figure 34 - Central Results Summary In the transition description, you can include dynamically changing data that came from the steps operation or elsewhere in the flow run. You do so by storing the data in a flow variable, then, in the description, including a reference to the flow variable. For example, a step that carries out a ping command can place the host machines name into a flow variable called host. To use this value in the transition description you can reference it with the syntax ${host}. A description from the success response might read Successfully pinged ${host}.. When this is run in Central against a host named server1, the summary description will read Successfully pinged server1. Adding a transition Re-arranging transitions
Adding a transition
To add a transition between two steps 1. With the flow open on the authoring canvas in Studio, on the step that you want to connect to the next step, click the x that represents one of the responses, and drag to the step that that response should lead to. When you move the mouse over the x, the response is labeled with the response. The transition that you create is also labeled with the response from which it originated. 2. To open the inspector for the transition, select the transition by single-clicking it or its name, and then click the Inspector tab at the bottom of the flow canvas (or double-click the transition). 3. The transitions Inspector appears. The following example is the Inspector for the success transition that connects the Select a Service steps success response to the next step. The transitions Inspector appears. The following example is the Inspector for the success transition that connects the Select a Service steps success response to the next step.
51
Figure 35 - Transition Inspector By default, the transition name is the same value as the name of the response where it originates, but you can change the transition name to any text you want. 4. To change the transitions name, in the Name text box, type the new name. 5. To limit who can run the step beyond the transition, in the Gated Transition area: Select the Check users roles before proceeding check box. In the Required Role drop-down list, select the role that the user should be a member of in order to continue executing the flow.
6. To require that the run be handed off following the transition, click Hand-off flow run after this transition. 7. To count completion of the transition in the flows value, type a value (in American dollars, with two decimal places) beside Flow Transition Value. 8. In the Description text box, type a description. Note: To show the flow user (in the Summary Information area of the Ops Flows tab) with a description of what happened in the preceding step that caused this transition to be followed, this is where you type a description of the steps action and outcome. You can use flow variables to store changeable information for using here. For example, to identify a server whose name is stored in the servername flow variable, you could type, Server ${servername} is available for connection. 9. Click OK and save your work.
Re-arranging transitions
You might want to move and reshape transitions to tidy up your flow or to separate transitions that are in a stack. (By default, transitions that have the same origin and destination steps are stacked on each other.) You can move and reshape transitions and move transition names with two versions of clicking and dragging. To add curve-defining points and change a transitions shape 1. Position your mouse over the transition where you want to place the curve-defining point.
52
2. To create the point, hold down SHIFT and click the mouse. 3. Drag the point until the transition curves the way you want it to. For instance, in the following flow, wed like to move the second Iterator steps failure transition so that it doesnt cross any transitions.
Figure 36 - Before SHIFT+dragging a transition Using the procedure described above, we drag the transition to a new location. Note the curvedefining point that was added.
Figure 37 - After SHIFT+dragging the transition To remove a curve-defining point Position the cursor over the point, hold down SHIFT, and click the mouse. Click the name and drag it where you want it to be. To move a transition name
Return steps
Return steps are the step representation of flow responses. There are four kinds of return operations, which indicate four primary possible end states to the flow. Resolved: Diagnosed:
53
These return steps are sealed, so you cannot modify them. To add a return step to the flow 1. From the flow diagram toolbar, drag the appropriate return operation to the flow canvas.
Figure 38 - Return step icons You can change the response of a return step to more accurately reflect the outcome that led to the return step. For example, if the outcome that led to an Error:Failure return step were not a failure in an operation but a result that did not meet a required threshold, then you might want to create a new response for the Error:Failure step that reflects this outcome. 2. To change the response of a return step, in the flow diagram, right-click the return step, point to Select Response, and click the desired response. OR To create and assign a new response to the return step, right-click the return step, point to Select Response, and click Add New Response, then name the new response.
a step in a flow from the operation, we can change the steps host input data assignment to a specific value: the target IP address for that particular flow. You can assign a flow inputs value to a flow variable and configure a step input to get its value from that flow variable. You can also configure alternative data sources (such as a user prompt, a constant, user credentials) for a step input if the flow variable that is its data source has not been defined. Note: If you dont specify a valid data source for a step input, the input by default prompts the user. This requires, of course, that the user have the information necessary for the flow to do its work. Creating an input Specifying how an input gets its value Providing a list in a user prompt input Inputs and flow run scheduling Removing an input
Creating an input
The procedure for creating an input is essentially the same, regardless of whether you create the input on a flow, a step, or an operation. To create an input 1. To open the flow or operations Properties sheet, in the Repository pane, navigate to and double-click the flow name and then click the Properties tab at the bottom of the authoring pane. 2. On the Inputs tab, click Add Input, and then name the input. Warning: Do not name the input service or sp. Doing so can create errors in flow runs in certain situations. For more information, see the HP OO Central Users Guide (Central_UsersGuide.pdf) or the HP OO SDK Guide (SDKGuide.pdf). The new input appears in its own row.
Figure 39 - Flow Properties sheet with a new input The column labels for the last column are slightly different in a step Inspector, but they specify the same components of an input. In both operations and steps, the last column shows the source of the value for the input if it cannot be assigned from a flow variable. 3. To change the inputs name, double-click in the rows Input column and type the new name.
55
4. If the inputs data is required for the step (or later steps in the flow) to function, select the Required check box. One of the first considerations in creating an input is the Type of its value assignmentthat is what kind of value is assigned to it. You can change the type of value assignment either here or in the input editor. 5. To change the type of value assignment, click in the rows Type column and select one of the assignment types from the drop-down list: Single Value List of Values Credentials Not Assigned The Not Assigned type is available in this column only for operations and flows. To change the source of the inputs value, you open the input editor. 6. To open the input editor for defining how the input gets its data and how it behaves otherwise, click the right-pointing arrow at the end of the inputs line ( ). For more information on how to specify the data source of an input, see Specifying how an input gets its value.
The input editor provides you with more ways to specify how the input gets its data. To define the data source for an input 1. To open the input editor for defining how the input gets its data and how it behaves otherwise, on the Inputs tab, on the line of the input of interest, click the right-pointing arrow ( ). The input editor looks like the following:
56
Figure 40 - Input editor Note that here as well as on the Inputs tab, you can: Change the inputs name and type. Make the input required (or not). Values (either single values or lists of values) Credentials
After selecting an input type, you will specify where the input gets its value. The input type affects the inputs possible data sources and thus the options that you see in the input editor. 2. To select how the input gets its value, from the Input Type list, select one of the following: Single Value List of Values Select this input type for an input that provides multiple values to a multi-instance step or an iterator step. Credentials Not Assigned
Next you specify where the input gets its value. 3. To assign the input its value from a flow variable, in the Assign from Variable list box, select or type the name of the flow variable. By default, the box contains the name of the input as the name of the flow variable. OR To specify explicitly that the input not get its value from a flow variable, select <not assigned>. Notes: Among the flow variables whose values you can assign to the input are reserved flow variables, whose values are always available for referencing anywhere in the flow. For more information on them, see Reserved flow variables. If the Input Type is Not Assigned and you choose Not Assigned in the Assign from Variable box, the operation will fail.
57
Tip: If you assign an input a specific value but leave the inputs name in the Assign from Flow Variable box, the input tries to obtain its value from a flow variable of the same name as the input. As a result, a Central user who creates a schedule for the flow can assign a different value (in the Scheduler dialog box) to the input. If you do not enable the input to get its value from a flow variable of the same name, then even if the Central user specifies a different value for the inputs name when scheduling the flow, the scheduled flow run(s) will still use the specific value that you have assigned the input in Studio. If you selected <not assigned> in the Assign from Variable box, or if the flow variable that you specify there doesnt exist or has no value stored in it, the input gets its value by the means you select in the Otherwise list box. 4. To encrypt the inputs value, under Input Properties, select the Encrypted checkbox. When you encrypt the inputs value, it appears as a row of asterisks when the flow is run in Central. Important: When the inputs assignment is The Logged In Users Credentials, its value is always encrypted. 5. To make the input required, select the Required box. For constant values, user prompts, and the Previous Steps Result, you can record the value of the input in a domain term that you choose. The value will be available for recording in the flows run histories in Central. This means that the inputs value can be used when the flow is used for diagnostics or auditing. You can make sure that the value fits a certain format, such as email, filename, IP address, alphanumeric, a phone number, etc. 6. To validate the inputs value with a format, in the Validation Format drop-down list, select a format. 7. To record the inputs value in the flows run histories in Central , from the Record Under dropdown list, select the domain term under which you want to record the inputs val ue. The Input Data Flow and Configuration sections of the input editor change according to the input type that you selected. To specify the data source for the input, use one of the following procedures: Creating a single constant input value Creating a single input value from what the flow user types Creating a single input value from a flow user selection Creating a constant list of input values Creating an input value list from text the flow user types Creating an input value list from flow user selections Creating the inputs value from the previous steps result Assigning credentials as the inputs value
8. Save your work. 9. To modify another input without closing the input editor, scroll through the steps inputs by clicking the up or down arrow ( ) beside Inputs Summary.
2. In the Otherwise: Use Constant Configuration section, in the Constant Value box, type the value for the input to have without changing. OR Type the flow variable reference, using the following format: ${flowvariablename} Tip: To specify a null value when the data source type is Specific Value: After selecting A Specific Value as the data source type, click in the Value box, but do not type anything.
Creating a single input value from what the flow user types
To specify a constant input value obtained from user-entered text 1. When completing the procedure To define the data source for an input, choose Single Value in the Input Type list box. 2. In the Otherwise list box, select Prompt User. 3. In the Otherwise: Prompt User Configuration section, beside Prompt For, select Text. 4. In the User Message box, type the prompt text that lets the flow user know what kind of data you need from him/her.
59
1. Still in the Otherwise: Prompt User Configuration area, in the List Source list, select Flow Variable. 2. In the Named list, type or select the flow variable that contains the list. 3. In the Source Delimiter box, type the character (or characters) that divide the elements of the list from each other. 5. In the User Message box, type the prompt text that lets the flow user know what kind of data you need from him/her.
You could successfully type the following in the Constant Value box: 10.2.0.200|18.35.100.7|${flowvariableA}|${flowvariableB} In that case, the operation that uses this host input would run on the machines with the following IP addresses: 10.2.0.200 18.35.100.7 10.51.0.5 12.225.8.71 220.220.3.9 10.51.110.12
60
For more information on assigning the value of a multi-instance steps list input to a flow variable, see Moving data into and out of a multi-instance step.
Creating an input value list from text the flow user types
When you prompt the user to type a list of values for the input to use, the users list must use the delimiter specified in the input for separating values. To specify a constant list of input values obtained from user-typed text 1. When completing the procedure To define the data source for an input, choose List of Values in the Input Type list box. 2. Under Input Properties, in the Input Delimiter box, type the character or character sequence that separates the elements in the list. 3. In the Otherwise list box, select Prompt User. 4. In the Otherwise: Prompt User Configuration section, beside Prompt For, select Text. 5. In the User Message box, type the prompt text that lets the flow user know what kind of data you need from him/her. Make sure that the prompt text tells the user how to type a successful list, particularly with attention to the delimiter character (or character sequence) that is required. Note particularly that inclusion of a space when the delimiter character sequence doesnt specify one is an easy way to fail.
For more information on domain terms, see Domain terms for Dashboard charting. In the Named list box, select the domain term list you want to present to the user. Flow Variable The list presented to the user is populated by the contents of a flow variable. 1. Still in the Otherwise: Prompt User Configuration area, in the List Source list, select Flow Variable. 2. In the Named list, type or select the flow variable that contains the list. 3. In the Source Delimiter box, type the character (or characters) that divide the elements of the list from each other. 6. In the User Message box, type the prompt text that lets the flow user know what kind of data you need from him/her or, in the case of list prompts, the fact that he or she can make multiple selections, if that is possible.
Logged-in User Credentials The logged-in user is considered to be the user account under which the flow is started.
Removing an input
To remove an input from a step 1. Open the Inspector for the step youre interest ed in or the flow or operations Properties sheet. 2. On the Inputs tab, on the list of inputs, highlight the input that you want to remove, and then click Remove Input.
As part of the data you are testing with a response rule To see whether an output string or error string contains a value that you have stored in a flow variable.
In scriptlets In operation parameters If an operation parameter takes a value, you can access that value by referencing a flow variable that contains it.
To create a flow variable from an input 1. Open the operations or flows Properties sheet or the step Inspector. 2. On the Inputs tab, select an input or create a new one. 3. On the inputs row, click the right-pointing arrow ( The input or result editor opens. 4. In the editor, in the Assign to Variable box, name the variable that you want the value assigned to. 5. Save your work. To create a flow variable from a result 1. Open the operations Properties sheet or the st ep Inspector. 2. On the Results tab, create a new result. 3. In the new results row, under Assign To, select Flow Variable. 4. Under Name, specify the name of the new flow variable. 5. Under From, specify the source of the value for the flow variable. 6. If necessary, create one or more filters for the result. For more information on creating a filter, see Filtering outputs and results. 7. Save your work. ).
For example, to create and assign a value to a global flow variable in a Rhino script, you would use a command with the following syntax: scriptletContext.putGlobal("<globalflowvariablename", <value>); For more information on creating scriptlets, see Scriptlets.
EMERG List Type LocalOrRemote MailBodyType NASDiagnostics ClearedAlertList|ActiveAlertList Local Host|Remote Machine html|text Memory Troubleshooting|NAS Detect Device Boot| NAS Device File System|NAS Duplex Data Gathering| NAS Flash Storage Space|NAS Interfaces| NAS Module Status|NAS OSPF Neighbors| NAS Routing Table|NAS Topology Data Gathering| Hardware Information NNM - Lifecycle State NNM - Node Management Modes NNM Priority NetDiagTests Registered|In Progress|Completed|Closed Out of Service|Managed|Not Managed None|Low|Medium|High|Top All|Autonet|Bindings|Browser|DcList|DefGw|DNS|DsGet Dc| IpConfig|IpLoopBk|IPSec|IPX|Kerberos|Ldap|Member| Modem|NbtNm|Ndis|NetBTTransports|Netstat|NetWare| Route|Trust|WAN|WINS|Winsock Notification Option Radia Priorities RemedyCaseStatuses RemedyUrgency RemoteOrLocal RS_Previous_Response RS_Previous_Transition RS_Previous_Transition_Annotation run_id scp_copyAction ScriptLanguages SelectionListDeleteOrZip Service Desk Object Email|Display|Write to File|None Must|Should|May|MayNot|ShouldNot|MustNot New|Assigned|Work In Progress|Pending|Resolved|Closed High|Medium|Low|Urgent remote|local The response of the previous step The transition from the previous step The annotation of the transition from the previous step Initial value: -1 To|From vbscript|jscript LocalDelete|LocalZip|RemoteDelete|RemoteZip Servicecall|Incident|Change|Workorder|Problem|Person | Workgroup|Organization|Service|ServiceLevelAgreemen
66
t| Project|Configuration|MainCon ServiceStatus SFTP_operations Running|Stopped|Paused cd|ls|pwd|lpwd|lls|chgrp|chmod|chown|compression| symlink|get|lcd|lstat|mkdir|put|rm|stat|exit SiteScopeAckType SNMPVarbindType Enable|Disable TIMETICKS|COUNTER|GAUGE|INTEGER|OID|STRING| ADDRESS|HEX SqlAuthentication SQLDBType SQLReportingServerFormat Windows|Sql Oracle|MSSQL|Sybase HTML3.2|HTML4.0|HTMLOWC|MHTML|IMAGE|EXCEL|CS V| PDF|XML String Comparator Match Type Exact Match|Contains|Contains Once|Does Not Contain| Match All Words|Match No Words|RegEx TimedOut TomcatActions VMWareActions WMIQueryFormat WindowsClusteringStates WindowsRegistryValueType Initial value: null Start|Stop|reload|undeploy Start|Stop|Enumerate|Status csv|text Online|Offline REG_SZ|REG_EXPAND_SZ|REG_BINARY|REG_DWORD| REG_MULTI_SZ WindowsScriptLanguages WindowsServiceStartupMode WindowsServiceStatus WMIQueryFormat Yes-No VBScript|Jscript Boot|System|Auto|Manual|Disabled Running|Stopped|Paused csv|text Yes|No
To diagnose a problem, you need to run health checks against a database server, an application server, a web server, and a router. You could find your diagnosis much more quickly if you could run the four health checks simultaneously. You have a software upgrade to install on 100 servers. If you could install it on 25 servers simultaneously, you could upgrade all the servers in a quarter of the time it would take to upgrade them all one at a time. One of the steps in a diagnostic flow creates a trouble ticket or creates and sends an email. It would speed up resolution if the flow could keep running with subsequent steps while the one step is creating the ticket or email. To run entire flows in parallel, you can do either of the following: On the Schedule tab in Central, schedule simultaneous runs of a flow. Specify parallel automatic runs of a flow by a URL.
Within a flow, you The three kinds of steps that have concurrent processing are: Parallel split step, in which one step contains several series of steps that execute simultaneously. Parallel split steps are intended for performing dissimilar and separate series of steps at once. Each series of steps is called and represented visually in the flow diagram as a lane. The steps contained in each lane are called lane steps. The lanes series of lane steps are much like a subflow and you might think of them as such, but in several respects, including movement of data into and out of them, they are very different from a subflow or flow. In the scenario in which you want to run several different kinds of health checks simultaneously, you could create a parallel split step with four lanes. In one lane, you would create the lane steps necessary to run a health check on the database server; in the next the steps necessary to run a health check on the application server, and so forth. For more information, see Parallel split steps. Multi-instance step, which executes simultaneously with multiple members of a list provided for a value in an input of the steps operation. You can throttle a multi-instance step, which means limiting how many values it can process at once. In the example of upgrading many servers at once, lets assume that you have a step that is associated with the subflow that performs the upgrade and that this step takes the target input that specifies which server the subflow runs against. You could turn this step into a multiinstance step and supply it with a list of the servers you want the subflow to upgrade. The step would then run the check against all those servers simultaneously. If running the subflow against too many target servers simultaneously would bog down your infrastructure, you could throttle the multi-instance step by specifying that it would only process, say, 25 target inputs at once. For more information, see Multi-instance steps. Nonblocking step, which allows the flow to continue with subsequent steps while the nonblocking step is still executing. In the case of a step that opens a trouble ticket, you could make the step a nonblocking step, thus allowing the flow to proceed while the step creates the ticket. For more information, see Making steps nonblocking.
68
When working with parallel split steps, also keep the following in mind:
69
To create a parallel split step 1. On the Studio toolbar, click the parallel split step icon ( 2. Create the step sequence you want within each lane. You create a lanes step sequence by creating steps within each lane, using the same techniques and following the same rules that you do when creating a flow, with the following considerations: Lanes cannot contain return steps, so you connect all step responses either to the next step or to the exit point of the lane. You can find information on success, failure, and other responses and results of the lane steps in the debugger, and Central users can find this information in the flows run-history reports. )and drag to the flow design.
The step appears with the minimum number of lanes (two) by default.
It doesnt take long for the lanes default size to be over-crowded by the steps that you create.
Figure 41 - Crowded lanes To give your steps more room, you can move the parallel split step and expand each lane.
70
3. To move the parallel split step as a whole, click the icon that represents the entire step
and drag the step where you wish. 4. To expand a single lane, select the lane by clicking in a blank part of the lane and drag the side or corner handles until its as large as you want. 5. After expanding the lanes, you can connect the steps within each lane. As noted above, all step responses must be connected either to a subsequent step or to the lane-end icon ( ).
6. To connect the parallel split step to the rest of the flow: If the parallel split step is not the start step, connect the step that precedes the parallel split step to the parallel split step icon. Connect the parallel split steps done response to the flows next step.
At this point, a flow with a very simple parallel split step might look like the following:
Drag the lane-start icons connector from the lane step that is its current target to the step that you want to be the lanes start step.
Renaming lanes
To rename a lane 1. Right-click the lane and, in the drop-down menu, click Edit Name. 2. In the text box that appears, type the new name of the lane.
Rearranging lanes
You can move lanes up or down in the parallel split step. Note, however, that all the lanes begin at the same time, and that their graphical order does not affect the order in which their processing occurs. To rearrange lanes Right-click the lane that you want to move and in the drop-down menu, click either Move Lane Up or Move Lane Down, as appropriate.
Multi-instance steps
Suppose you want to run the Windows Diagnostic flow on 100 servers. Rather than creating a step that runs the flow on a single server, you can make the step that is associated with the flow into a multi-instance step and run the flow on all 100 servers at once. A multi-instance step is a step that you can supply with many values for an input, which values are used by multiple, simultaneously running instances of the step. This enables the flow that contains the step to simultaneously run, for instance, many instances of the same operation on different targets. However, if running the flow on 100 servers simultaneously will slow down your system s performance, you can, in effect, set a throttle level for the flow by specifying how many servers the multi-instance step should simultaneously start the flow for. Multi-instance steps are always checkpointed, and you cannot remove the checkpoint. This means that if a run is interrupted while the multi-instance step is running, then when you restore the run, it is restored to the point just before the multi-instance step started (for more information on checkpoints, see Checkpoints: Saving a flow runs progress for recovery ).
instance step. This is so important that well put it another way: Only the group done response should lead to a flow return step, that is, to the end of the flow. In its simplest form, this is the paradigm for how a multi-instance step should be used in flow design:
Figure 43 - The essentials of using a multi-instance step in flow design More realistically, you probably want to have some other operations follow from the multi-instance steps various responses. Note that the following example still follows the essential pattern: Of the Ping steps four responses (success, failure, host not found, and group done), only the group done response goes to a return step. The failure and host not found responses each lead to an email step both of whose responses then connect back to the (multi-instance) Ping step. The success response leads to a chain of steps, but all the responses in that sequence sooner or later lead back to the (multi-instance) Ping step.
Good design: Connecting response destinations back to multi-instance step There are two reasons that all the responses in a path of steps that follows from a multi-instance step should ultimately connect back to the multi-instance step: In the multi-instance step, the result of each instance is evaluated as it becomes available and the response for that result is chosen without waiting for the other instances results to become available for evaluation. Thus if steps that follow the multi-instance steps responses do not
73
loop back to the multi-instance step but go to return steps that complete the flows run, the run cannot discover whether there are other results to evaluate. As a result, in the following example, only one email will be generated by the flow, for the first instance to return a result.
Bad design: Response destinations NOT connected back to multi-instance step The other reason to connect all response destinations back to the multi-instance step is that if you use the bad design in a subflow, a run of the parent in Central cannot be handed off or interrupted subsequent to the step that is made from this subflow, because some results of the multi-instance steps instances remain unprocessed.
This way of processing multiple instances of a step and their results relates to one of the benefits of using the multi-instance step as opposed to the parallel split step: While the parallel split step waits for all of its lanes to complete processing before the flow can move on to the next step, in a multi-instance step, the flow continues executing with subsequent steps (based on the response chosen) for the multi-instance steps first-completed instance while the other instances are still processing. Thus the multi-instance step can work more efficiently for its purpose (to run the same operation with multiple targets) than the parallel-split step. 1. As soon as one of the instances of the multi-instance step completes processing, its response is chosen by the evaluation rules and the run proceeds with subsequent steps for that instance. 2. Meanwhile, the other instances continue processing. As each instances processing within the multi-instance step completes, its result is stored to await its turn for further processing. At this point, the run begins to handle the multiple instances of the step serially. 3. When the first instance and any subsequent steps have completed, and you have connected this last step back to the multi-instance step, then the run returns to the multi-instance step and repeats the steps in the sequence for the result of the next instance to have completed. (If no other instance has completed processing within the multi-instance step yet, the run waits for the next instance result to become available.)
1. Right-click the step and, in the context menu that appears, click Toggle Multi-instance. The step changes to the following appearance (in which the multiple instances of the step are suggested by the layered outlines):
Multi-instance step Note that the step now has the additional response group done. For more information on using the group done response, see the preceding topic. 2. Open the step inspector, and then open the input editor for the input to which you want to supply multiple values. 3. To specify that the inputs value is a list, select the The value of this input is a list checkbox, and then, in the List Delimiter text box, type a delimiter (a character that separates the elements in the list). By default the delimiter is a comma. Important Notes: Your delimiter must accurately reflect the character or combination of characters that separates the list elements. For instance, if your list includes a space between list elements, you must include the space in the delimiter that you specify. Consider the following list: 10.51.0.36, 10.51.0.37 If you specified only the comma (,) as the delimiter, the value for the input in one of the steps instances would be 10.51.0.37, which could cause an error. Central users who schedule flows that contain multi-instance steps must know what the delimiter is, so be sure to let them know. When you make a step into a multi-instance step, you cannot either add or remove specification of the step as a checkpoint.
4. Provide the input (or the flow variable from which the input gets its value) with a list that uses the same delimiter as that which you specified. How you supply the list depends on how you obtain the list. For instance, you might get it from an integration with another program. From within the flow, you can supply the list to the multi-instance step directly, in the Value text box (when you select A Specific Value for the inputs assignment); or you can get the list from a flow variable. 5. To revert the step to a single instance step, right-click the step and, in the context menu that appears, click Toggle Multi-instance again.
75
Any flow variables that are created in an instance of the multi-instance step are local to the instance in which they are created and populated. Only global flow variables (created by scriptlets) continue after the instances run completes. You make data generated within the step available outside the step the same as you do for any other type of step: by creating a global flow variable in a scriptlet or (when the step is a subflow) by creating a flow output field.
Therefore, if you assign the want to reference each element in the list inputs list, you need to reference the flow variable that has the same name as the list input. For example, suppose a flow like this one.
This flow has the following features: The Remote Traceroute step is a multi-instance step. Remote Traceroute step target input is a list input and is assigned to a flow variable named machine. The values in the list of the input target are the names of the machines that Remote Traceroute will target. The Send Mail steps should send a success or failure email for each target machine in target.
To include the name of each target machine in the body of the email that one of the Send Mail steps sends for each result, the body of the email must reference the flow variable target, not the flow variable machine. If the email body referenced machine, it would print the entire list, rather than the particular target machine for which Remote Traceroute just succeeded or failed.
76
You might specify, for instance, that the email body for the Send Mail steps on the success path and failure path include the following, respectively: Remote Traceroute succeeded for ${target}. Remote Traceroute could not connect to ${target}.
2. Connect the done response to the next step. Note: When you add concurrent processing to a step, you cannot either add or remove specification of the step as a checkpoint.
All the lane steps in a parallel split step are checkpointed, and you cannot remove the checkpoints. You can remove the checkpoint from the steps that process each of a multi-instance steps instances.
To create a checkpoint in a step 1. Open the flow diagram in Design view, and open the Inspector for the step to which you want to add the checkpoint. 2. On the Advanced tab, select the check box by This step saves the whole run state. To remove a checkpoint from a step 1. Open the flow diagram in Design view, and open the Inspector for the step to which you want to add the checkpoint. 2. On the Advanced tab, remove the selection from the check box by This step saves the whole run state.
Scriptlets
When you have obtained data from an operation such as ping, traceroute, or the http operation get, you probably want to test, format, manipulate, or isolate a particular piece of the results. Or perhaps you want to use a value from a flow variable to compare your results against. Using a scriptlet, you can perform these tasks and anything else that is possible with JavaScript or Perl. Scriptlets are also uniquely suited to obtain various side effects subsequent to the operations core actions and to otherwise extend the operations capabiliti es. A scriptlet is a Sleep or JavaScript (Rhino) script that is contained in an operation. Scriptlets provide more control than operation output filters and response, for evaluating output, determining results and responses, or adding variables to the flow. You can use JavaScript or Perl scriptlets: In the body of an operation, step, or flow (on the Scriptlet tab of each). To filter a flow, step, or operations results. As a rule for an operations response.
For instance, in the Network Check flow, the TraceRoute operation counts how many network links, or hops, there are between the computer running the flow and the target computer. In addition being able to test the number of hops in the operations rules to determine the operations response, you could add the scriptlet that is used in the Evaluate Expression operation, which compares two values. With this script, you could test the number of hops with a threshold and pass the evaluation to another step or flow, for evaluation of the systems health or for communication to the user. Tip: If you know how to script in either the two scripting languages used in HP OO, JavaScript (Rhino) or Sleep, you can use the HP OO scriptlet templates for those languages to learn the syntax and objects that HP OO requires for exchanging information with the scripting language. The scriptlet templates are available on the scriptlet tab of an operations Properties sheet or steps Inspector. Following are some considerations to remember when using a scriptlet: As with other uses of operations, you create a scriptlet on an operation for a generic use that you can apply over and over. You create a scriptlet on a step when the scriptlet is specialized to the conditions of that step.
79
For instance, you might add a scriptlet to a step to evaluate and/or format data that is returned from the steps operation. If you then store the data in a flow variable and pass it to one of the fields in the flows result and repeat this with other results, you can incrementally create a trail of the data that youve discovered. You might add a scriptlet to a flow (on the Scriptlet tab of the flows Properties tab) when the flow will be used as a subflow within another flow and thus will function as an operation. After the subflow has obtained some data that you have passed to a field in the flow result, you might manipulate the data in the flow result field before passing it to the parent flow. HP OO automatically creates from each input a variable of the same name. Therefore, a scriptlet can access values by using variables with the same name as the inputs.
Creating a scriptlet
To view a scriptlet or the scriptlet template 1. On an operations Properties sheet or steps Inspector, click the Scriptlet tab. 2. If the operation does not already contain a scriptlet, then to view the scriptlet template, click Insert Template and select the language in which you will write your script. Tip: For examples of existing scriptlets, look in operations in the content that ships with HP OO (such as the operations under the Operations\Linux\Red Hat folder). To filter step or flow results with a scriptlet 1. On the Results tab, open the filter editor of the result that you want to filter with a scriptlet by right-clicking the right-pointing arrow on the results row. 2. In the filter editor, click Add to create a new filter. 3. In the Select Filter dialog, select Scriptlet. 4. Create the scriptlet, test the filter, and save your work. To see the syntax for functions that help perform common tasks, click Insert Template. The scriptlet template provides commonly used functions and their syntax. For more information on creating filters, see Filtering outputs and results. To create a scriptlet rule for an operation response 1. On the Responses tab of the operations Properties sheet, click Add to add a response. OR Right-click the right-pointing arrow on the row of the response of interest. 2. In the Rule Type drop-down list, select Scriptlet. 3. Create the scriptlet. To see the syntax for functions that help perform common tasks, click Insert Template. The scriptlet template provides commonly used functions and their syntax. 4. Save your work.
Debugging a scriptlet
To debug a scriptlet 1. Before starting to debug the flow, from the Tools menu, click JavaScript Debugger. The JavaScript Debugger starts.
80
2. From the Debug menu, select Break on Function Enter. All the scriptlets that the flow, its steps, and its operations contain loads into the Scriptlet debugger. 3. To set a breakpoint on one or more lines in a scriptlet, in the JavaScript Debugger, click the line of interest. A red dot appears beside the line.
Figure 44 JavaScript Debugger breakpoint set for scriptlet line Note: If you have created a breakpoint on a scriptlet line, when the JavaScript Debugger is closed, it does not stop the script at the breakpoint. 4. In Studio, to set a breakpoint on the step, right-click the step, point to Debugging, and then click Set Breakpoint. 5. To start debugging the flow, in Studio, click the Execute Flow button (
81
).
The Studio Debugger starts. When the Studio Debugger reaches a step with a script in it, focus switches to the JavaScript Debugger. As the scriptlet runs, the current values of local and global flow variables in the context appear in the Value column of the Context panel. When the JavaScript Debugger reaches the breakpoint that you set, you can set a particular flow variables value to watch. 6. To watch a particular flow variable, with the scriptlet paused, in the lower-right panel, type the name of the flow variable to watch in the Expression box.
Operation outputs
Operation outputs used to be called results. The raw output is all of the operations return code, data output, and error string. The raw output is not directly visible in Studio, except as the raw result of a step that was created from the operation.
82
The primary and other outputs are portions of the raw outputfor example, success code, output string, error string, or failure messagethat you specify as an output. You can narrow a primary or other output to a more highly focused selection by creating one or more filters for the output. For more information on filtering outputs, see Filtering outputs and results.
Besides evaluating outputs, you can pass them as data to other steps in the flow or to other flows by storing their values in flow variables. You can create filters to extract and modify parts of the result. Note, however, that you cannot pass values to the global context except with a scriptlet. For information on using a scriptlet to pass values to the global context, see Scriptlets. Most operations have outputs that are specific to the operation. Even so, you will frequently encounter the following outputs when working with operations in the Librarys Accelerator Packs, Integrations, and Operations folders: returnResult The primary output of the operation. When you see returns: wi th no field named, this is usually the output. The primary output is also accessible via Result with a capital R (Which is universal). response (or returnCode) A code or string used to determine the response the operation will take. failureMessage An internal output provided by the infrastructure. If an operations returns a failure, this output provides the exception. Note that many operations do not use this output.
Responses
Responses are the outcomes of operations. In a step created from an operation, each response is the starting point from which a transition may be connected to another step (or back to the same step). Rules that evaluate the operations output fields determine which of the several available responses will be the operations actual response for the current run. Thus the outcome of the evaluation of one steps operation outcome determines which will be the next step in the flow run. For information on creating responses and their rules, see Responses: Evaluating results.
Step results
Step results are the steps analog to the outputs of the operation from which the step was created. You create the step results You can pass step results as data to other steps in the flow or to other flows. You can create filters to extract and modify parts of the operations output. For example, suppose you only want the maximum, minimum, and average round-trip times for a ping operation to a certain server. You could extract all three pieces of information from the ping operations raw results into several filtered results for the operation by filtering the raw results into three filtered results. Then you can use those filtered results to do the following: Create response rules (evaluators) that test one or more of the filtered data results to determine the next step of the flow. By passing the filtered data as values to flow variables, make them accessible to operations and transitions later in the flow, and through prompts that reference the flow variables, to the users of the flow.
83
If the flow is a step in another flow (that is, a subflow of a parent flow), pass the data in the filtered results to fields in the flows result, thus making the properties available to operations, steps, and transitions in the parent flow. For more information on filtering outputs, see Filtering outputs and results. You can pass the step results value to either: A local flow variable. A flow output field for the flow.
For information on creating filters, see Filtering outputs and results. 3. Save your work.
3. To create filters for the output data in the secondary output, click the right-pointing arrow ( at the end of the row. The filter editor opens for you to create filters. For information on creating filters, see Filtering outputs and results. 4. After creating the filter or filters you need, close the filter editor. The Filters column in the outputs row reports the filter that you have created or, if youve created more than one, how many filters you have created. 5. Save your work. To delete a result from a step 1. On the Results tab of the operation, select the result you want to delete, and then click Remove Result. 2. Save your work.
85
Note: To work with a ping operation, you can either create your own ping operation or copy the existing Ping operation and work with the copy. If you are working with a copy of the existing Ping operation, youll note that some results that are available by default extract the data that you would otherwise isolate with filters.
Creating a filter
Frequently, you will create a series of filters to extract exactly the data that you want. To filter an operation output or step result 1. To create one or more filters for an operations primary output , with the operations Properties sheet open on the Outputs tab, click Edit Filters. OR To create filters for one of the operations secondary outputs, at the right end of the outputs row under Available Outputs, click the right-pointing arrow ( ). OR To create filters for a step result, open the steps Inspector and, on the Results tab, at the right end of the results row, click the right-pointing arrow ( ). The filter editor appears.
86
Figure 45 - Filter Editor The upper-left box builds a list of the filters as you create them. When you create a filter and have selected a filter type, the upper-right box (labeled No Filter Selected in the above screen shot) contains controls for modifying filters depending on the kind of filter you select.
2. To add a filter, click Add, and then select the type of filter from the drop-down list in the Select Filter box that appears. 3. Define the filters particulars in the Details for area at the upper-right of the filter editor. When you create multiple filters for a result, they appear in a list. Tip: While you have the filter editor open, you can click the upwardor downward-pointing arrows ( ) to change which result youre creating filters for. Although filters are frequently applied to operation outputs or step results, when you filter an outputs or results data, the data is the filters input. Thus, in the filter editor, you put your test data in the Test Filter Input box. 4. To obtain realistic data for testing, click Clear to empty the Test Filter Input box, and then do one of the following: If the data can be generated by a local command-line command, click Quick Command and then, in the text box that appears, type a command that generates the desired data. If the data is produced by means that you cannot reproduce with a simple command-line command, you can: a. Run the flow in the Debugger. b. Highlight the relevant step. c. In the Step Result Inspector, copy the contents of the Raw Result tab.
87
d. In the filter editor, paste the contents into the Test Filter Input box. 5. In the filter editor, click Test All Filters. OR Select the filters you want to test and click Test Selected Filters. The filters are applied (in top-to-bottom order) to the data in the Test Filter Input box, and the filtered results appear in the Test Output box. For specifics on the kinds of filters you can create and on saving filters, see Filter details.
Filter details
See the following subtopics for defining particulars of each kind filter (for information on creating filters, see Creating a filter): Diff Case Extract Number Format Line Count Regular Expression Remove Duplicate Lines Replace Round Number Scriptlet Select Line Select Range Sort Strip Strip Whitespace Table
In the following descriptions, remember that the data on which the filter operates is the filters input, even though the data may have come from an operation output or step result. Thus, in the filter editor, you put your test data in the Test Filter Input box.
Diff Case
A Diff Case filter changes all the characters in the string either to upper case or to lower case. If you leave the To Upper Case check box unchecked, the filter changes all the characters to lower case.
Extract Number
An Extract Number filter extracts the first number found in the result. The filter treats an unbroken series of integers as a single number. For instance, the Extract Number filter would extract the number 123 from the strings 123Test or Test123.
Format
A Format filter attaches text to a result or output or replaces the original content with the text. In the Text box, type the text you want to attach to the result or use to replace the result.
88
In the Place Input At list, select Beginning or End respectively to prepend or append the text OR To replace the output with the text, select Replace.
Line Count
A Line Count filter outputs the total number of lines of the result. There are no settings to edit for this filter.
Regular Expression
Filters the raw results using a regular expression (regex). For more information on regular expressions, see Working with regular expressions.
Figure 47 - Regular Expression filter definition In Expression type, select the type of regex to apply. In Expression value, type the regex. Select Filter Entire Input or Filter line-by-line, according to how you want the filter applied to the raw results. To make the regex not case-sensitive, select Ignore case.
Replace
Replaces the first or last instance or all instances of one string with another string.
89
Figure 48 - Replace All filter definition In the Find box, type the target string (the string to search for and replace). From the Replace drop-down list, select First, All, or Last, depending on which instances of the target string you want to replace. In the With box, type the string to replace the target string with. To make the search not case-sensitive, select the Ignore case checkbox.
Round Number
Rounds numbers as you specify in the filter editor.
Figure 49 - Round Number filter definition To specify the accuracy of the rounding, type the number of decimal places the number should be rounded to in the Number of Decimal Places. Select either Floor, Round, or Ceiling, to specify how the number should be rounded: Floor always rounds the number down and Ceiling always rounds the number up. Round rounds the number up if the last meaningful place is 5 or more, and down otherwise.
Scriptlet
Filters data with a scriptlet that you create, with the same sort of scripting environment that you use when creating a scriptlet for an operation or step.
90
Figure 50 - Scriptlet filter definition From the Type drop-down list, select the JavaScript (Rhino) or the Sleep scriptlet language. If you choose JavaScript (Rhino) as the type of script, the text box starts you out. To get started with lines that you will need for the scriptlet to work as a filter, click Insert Template. The template that is inserted is specific to the language that you chose and includes the most commonly used commands for accessing flow variables (whose values are context data), operation results, and inputs and setting and manipulating flow variable values and results. To debug the script, click Check Script.
Select Line
Defines a line that you want to extract from the raw results.
Figure 51 - Select Line filter definition From the Line Select Method list, select a criterion for the line that youre interested in. In the Parameter text box, type a string that the string contains. From the Line Ending Type group, select the type of line ending according to whether the text that youre filtering was generated on a Unix (which ends lines with LF) or Windows (which ends lines with CR/LF). Auto, the default selection, accepts both Unix and Windows type line endings.
Select Range
Defines a string that you want to extract from the input data. The two criteria for defining the string are: length in characters and position of the first character from the start of the input data.
91
Figure 52 - Select Range filter definition In the start and length boxes, type the zero-based start position and the character length of the string that you want extract from the raw results.
Sort
Sorts the input data by line.
Figure 53 - Sort filter definition Specify the direction of the sort. If you choose to treat the data as numbers, the lines that do not begin with numbers are sorted to the bottom.
Strip
Strips characters from the raw results.
92
From the Strip Method list, select how you want the filter to strip the raw results. You can specify stripping all characters up to or up to and including, or all characters after, or after and including the string that you specify in the Characters to strip text box. In the Characters to strip text box, type the string to find.
Strip Whitespace
Removes all the whitespace characters from the front and the end of the raw results. There are no settings to specify for this filter.
Table
A table filter does not convert the raw results into a table, but enables you to manipulate the raw results as if they were a table, including sorting columns and selecting columns, rows, and blocks.
Figure 55 - Table Sort filter definition Note: Row numbering is 0-based, and column numbering is 1-based. In the Column Delimiter list, choose the character that will serve to divide the data into columns in a meaningful way. In the Row Delimiter list, choose the character that will serve to divide the data into rows in a meaningful way.
Note: Two or more consecutive white spaces count as a single white space, so a column may be occupied by data that you expected to find in a column to the right. For example, this behavior will appear if you apply this filter to the output of a dir command-line command with whitespace specified as the column delimiter. To treat the members of the first row as column headers, select First Row is Header. To remove the first row, select Strip First Row of Result. To sort on a column, type the column number in the Sort On Column box. Column numbering is 0-based. The value -1 means do not sort on any column. To specify ascending order, select the Ascending box. By default, the sort order is descending. To select a row you want the filter to extract, type the row number in Select Row and in Select Width type the number of columns in that row that you want extracted. Remember that row numbering starts with 0. To select a column you want the filter to extract, type the column number in Select Col and in Select Height type the number of rows in that column that you want extracted. Remember that column numbering starts with 1.
93
For example, to extract the first 5 rows of the 2 nd through 4th columns, you would specify the following. In these settings, the first two settings define the rows selected, and the second two settings define the rows selected. In Select Row: 0 In Select Height: 5 In Select Col: 2 In Select Width: 3
The value -1 has specific effects for the Select Row, Select Col, Select Width, and Select Height boxes: In Select Row, -1 selects all the rows in the data. In Select Height, -1 selects all the remaining rows in the data below the row specified in Select Row. In Select Col, -1 selects all the columns in the data. In Select Width, -1 selects all the remaining columns in the data to the right of the column specified in Select Col.
A particular response is selected when a rule or set of rules that describes a particular condition of the operations result is true. A rule compares a value that you specify with a value in a field of an operations raw results:
94
The above screenshot illustrates several faces of rules that you will want to remember: The response types are: Success, or resolved: Diagnosed: No action: Failure:
If you create more than one rule for a response (such as the port open response), then all the rules for that response must evaluate to true for the response to be chosen. Responses are evaluated in the order in which they are listed on the operations Responses tab. The first response whose rule or rules evaluate to true is the response chosen. So if the port open responses rules evaluate to true, then that is the response chosen, even if the rule for port listening would also evaluate to true. The order of responses can be very important for obtaining the most helpful outcome for your flow. If you specify a default response, that is the response chosen if none of the responses rules evaluate to true.
To create a response 1. On the Responses tab of the operation, click Add Response. 2. To make a response the one chosen if an operation fails to execute, select the responses check box in the On-Fail column. 3. To create a rule for the response, at the right end of the responses row, click the right-pointing arrow ( ). 4. In the response rule editor, click Add. 5. In the Apply Rule to Field column, select the results field that has the content you want to test a rule against. 6. In the Rule Type column, pick the comparison or match that you want the rule to test. 7. In the Rule Text column, type the text to use in the test.
Figure 56 - Defining a rule Using the rule editor, you can make the changes described above, or: Filter the operation result before applying the rule. Test the rule. Drag system evaluators (rules), filters, or a scriptlet into the rule.
Note: In a rule, when you use a mathematical comparator (such as =, !=, <, >) in an evaluation of a string that starts with a number, the comparator compares only the numerical portion of the string. For example, if you compare 123 with 123Test using != (does not equal), the evaluation would be false, although 123 is clearly not the same as 123Test. You can work around this issue, however, by comparing the strings with the Not Exact Match evaluator.
95
8. To open the rule editor, at the right end of the rules row, click the right-pointing arrow (
).
Figure 57 - Rule editor Note: If you choose Scriptlet as the rule type, the rule editor changes to a scriptlet editor, as you use elsewhere. For more detailed information on creating and using scriptlets (including saving scriptlets for re-use), see Scriptlets. For information on creating scriptlet filters, see Filtering an operations results. Now you can test the rule and/or create a filter for filtering the results in the field before applying the rule. 9. To test or refine the rule, click the right-pointing arrow to open Rule Details. The rule type that you chose in the rule editor appears in Rule Details also, already selected in the Rule Type drop-down list. 10. In Rule Details, to choose another rule type, select a different one in the drop-down list. 11. For most of the rule types, in the Text box, type the text that you want to test comparison with and, if you want to ignore case, select the Ignore Case check box. OR For Regular Expression rules, specify the regular expression and its application as you do when creating a Regular Expression filter for operation results. For information on creating Regular Expression filters, see Filtering outputs and results, and for details on filter types, see Filter details. 12. To work on a rule for another of the operations responses, click the up or down arrow beside Responses Summary. Tip: Response rules are evaluated in the order in which they appear in the operations Responses tab. When you run a flow, the response of the first rule that evaluates to true is selected as the response of the step. So the order you provide to the responses can determine whether users obtain the desired results from the flow.
96
To add a response to the flow 1. On the flow Properties sheet (with the flow diagram open, click the Properties tab at the bottom of the window), click Responses. 2. Click Add Response and then, in the text box that appears, type the name of the response. Tip: To delete a flow response, on the Outputs tab, click the response you want to delete and then click Remove Response.
3. To close the Properties sheet and save changes, click OK and the press CTL+S.
97
Figure 58 - Icons panel 2. In the Icons panel click the subpanel name that contains the icon you want, find the icon, and drag it onto the step.
Flow Design
Many flow design issues are those that you will conclude on your own. However, those included in this section are important to keep in mind. Do not create flows that create unlimited growth in memory. For example, a flow that runs an infinite loop, in which the flow sleeps, performs some tasks, then goes back to sleep. In this case, the Run History grows until the system runs out of memory. You can use flows to simplify flow design, thus making it possible to: Separate the programming tasks into smaller, more manageable pieces. Test parts of the flow individually. Reuse the pieces that you create.
Test parts of the flow individually. Reuse the pieces that you create.
For example, suppose you want to copy a set of files from one server share to another. You could: 1. Create a step from the Iterator operation, providing something list inputs such as the following for the Iterator step (and specifying a semicolon [;] as the separator between the members of the list). \\server1\share1\fileAAA.zip,\\server2\share2\fileAAA.zip; \\server1\share1\fileBBB.zip,\\server2\share2\fileBBB.zip; On the first iteration, the Iterator step extracts \\server1\share1\fileAAA.zip,\\server2\share2\fileAAA.zip. 2. To use \\server1\share1\fileAAA.zip as the source pathname and \\server2\share2\fileAAA.zip as the destination pathname, you create two ListItemGrabber steps, one to extract the source pathname and one to extract the destination pathname. Alternatively, you could simplify the flow and create a reusable piece by doing the following: 3. Create a flow that consists only of the two ListItemGrabber steps and the success and failure return steps. 4. Drag the flow onto the parent flow, to create a step from the subflow. In this case, you need to enable the parent flow to use data that have been created or modified by the subflow. In this example, a copy step in the parent flow needs each source pathname and destination pathname. For the technique for passing information from a subflow to its parent flow, see Passing data from a subflow to a parent flow.
3. In the parent flows authoring canvas, open the Inspector for the step that was created from the subflow. 4. Create a step result, using the procedure described in Step results. 5. In the new step results row, under Assign To, select Flow Output Field.
99
Figure 59 - Step Inspector Advanced tab 2. On the Advanced tab, under Operation, click Select. The Select Operation dialog box appears.
3. Navigate to and select the operation that you want to base the step on, and then click OK. Note: The steps name is unaffected by your having changed th e underlying operation, so if the step was named for the previous operation, it may look as if the step had not changed. However, the Advanced tab, under Operation, reflects your change. 4. Rename the step to reflect the change in operations. 5. Save your work.
Step descriptions
A description that includes likely search words helps you or others find your flow. Suppose, for example, you modified a copy of the Network Check flow. The description Performs a ping and a traceroute to the server, a Search tab search with the following: description:ping traceroute would find any flows and operations that have either or both of the words ping and traceroute in the description of the flow or one of its steps. To create a description for the step or flow 1. On the flows Properties sheet or steps Inspector, click the Description tab and type a description of the step. 2. Click OK, and then save your changes.
Debugging flows
The Debugger in Studio helps you track down the causes of errors and unexpected behaviors in flows that you test there. It does so by displaying the following information: A tree showing the steps executed Step results and operation outputs generated for each step Flow variable values in the various contexts current to each step The transition description for each transition followed
101
You can also set breakpoints for the Debugger and force response choices in order to zero in on the behavior you want to test. All of this capability focuses on fixing broken flows and on the types of data described. To learn particularly how a flow that has steps that use parallel processing will behave in Central, there is no substitute for running the flow in Central in a staging environment after testing the flow in the Studio Debugger. In the Studio Debugger, when you have the Central repository open, you can choose whether to debug the flow in Central or in Studio. Particularly when a flow contains parallel processing, it behaves differently in Studio than it does when run in Central. Key information: Parallel processing in a flow (processing carried out in one or more nonblocking, multi-instance, or parallel split steps) that takes place in parallel in Central, runs serially in the Studio Debugger. In a parallel split step, the lanes always execute serially. In Central, they all begin at the same time, and the order in which they finish depends on variable factors that cannot be predicted in Studio. Thus the Debugger cannot predict considerations such as in the case of conflicting writes to the same flow variable, which lane writes to the flow variable last. On the other hand, in Studio, you can manipulate the order in which the lanes will finish in the Debugger in order to test, in a controlled fashion, various scenarios. In a multi-instance step, the instances are executed serially. While this means that you are not testing under actual conditions, it does allow you to examine how long it takes each instance to finish. Nonblocking steps do not behave as nonblocking steps in the Debugger. That is, in the Debugger, steps that follow a nonblocking step do not execute until the nonblocking step has completed.
Debugging a flow
You debug a flow from within Studio, whether you are debugging it in Central or in Studio. Best Practice: It is best practice to debug subflows before debugging their parent flows. When debugging a flow you might find the keyboard shortcuts useful. For the Debuggers keyboard shortcuts, see Debugger keyboard shortcuts. The following procedure applies both to debugging a flow in Central (connected to the public repository) and to debugging one in Studio (connected either to the public or to the private repository). To debug a flow 1. In the Library, right-click the flow, and then click Debug in Studio or Debug in Central, as appropriate. OR Open the diagram of the flow you want to debug and then, in the authoring pane, click the Debug Flow button ( ). The Studio debugger opens. The toolbar for the Debugger contains the controls youll use to run the flow, whether to completion or step by step. When you run the flow from start to finish, the run is interrupted only by any breakpoints that you may have set.
102
Figure 61 - Studio Debugger toolbar 2. To run the flow to its end, click the play icon ( OR To run the flow step by step, click the step over icon ( ) or press F6 for each step. ) or press F11.
Lets look at what we can learn from the Debugger with the Windows Health Check flow.
Figure 62 - Flow Debugger mid-flow Run Tree shows each step that runs, including steps in subflows of the flow. Steps that will run simultaneously in Central are run in a serial sequence in the Debugger.
103
Breakpoints & Response Overrides Breakpoints are flags that enable you to automatically pause a run at a certain step in order to examine the results, the path of the run, or the values in the flow variables at a that point. Response overrides force the response that you selected, regardless of the response chosen by evaluation of the relevant operations result. This panel lists those elements and enables you to remove them or enable or disable them for this run. Transition History lists the transitions that have been followed in the run and displays their descriptions (thus rewarding the best practice of providing a description for each transition). Step Result Inspector shows the raw results (the results of the steps operation) and the filtered results of the step. Context Inspector displays the values that are current to flow variables (global as well as local) for each step.
3. To see the information in each of these panels for a completed step, click the step in Run Tree. 4. In the Step Result Inspector: To see the raw result of the step, click Raw Result:
To see other results that you may have created, click Other Results:
5. To see the flow variables and their values for the steps inputs and the step and global context, navigate to the appropriate section of the Context Inspector.
104
In the Context Inspector: Step inputs values are the values that have been assigned to the input before the step started. The values in the Step Context section are the values that are updated after the step has begun. A steps context is the collection of flow variables and their value assignments in the local contexts of the steps parent flow (and, if the steps parent flow is a subflow, that flows parent flow). For this step (one of the multi-instance ping steps instances), the Step Inputs include the host flow variable for the step, and the step context includes the gotback flow variable and the host flow variable from the context of this instance of the multi-instance step. The text boxes that contain the values for flow variables are color coded, as in the following example.
Figure 63 - Color coding of flow variable values Blue signifies a value that has been changed by or within the run. Green highlights a new variable.
To step into and out of a subflow 1. To step into a steps subflow, click the step-into icon ( 2. To step out of the subflow, click the step-out icon ( To reset and restart the flow in the Debugger In the toolbar, click the reset-flow icon ( ) or press F12. ) or press F5. )or press F7.
Before the flow is restarted, the values of its flow variables are reset to the values that they had when you opened the Debugger.
105
The run pauses with the step for which you set the breakpoint pending. For information on setting breakpoints, see Working with breakpoints. The Context Inspector shows the current values of the Step Inputs and Step Context as of the point at which the step is pending.
Figure 64 - The Debugger Context Inspector Now you can: Change values used in the execution of this step. Change values used in a later step.
3. To change the value of a flow variable used in this step, the flow variable must provide the value in a step input. The flow variable must therefore be listed under Step Inputs, so you change the value for the flow variable there. In the example shown here, the step is a multi-instance step. You could add another IP address to the list in the host flow variable. OR To change the value of a flow variable that is accessible in this step but is used in a later step, change the value for the appropriate listing under Step Context. 4. Continue to play or step through the flow. OR To reset any flow variable values that you have changed to the values that were set the last time you saved the flow, click the reset-flow icon ( ).
106
You set breakpoints in the flows diagram, but you can enable or disable any breakpoints that you have set from inside the Debugger. To set a breakpoint With the flow open in the authoring pane, right-click the step where you want to set the breakpoint, point at Debugging, and then click Set Breakpoint.
Note: You cannot create a breakpoint from within the Debugger, although the Debugger is where you enable and disable breakpoints. To enable or disable a breakpoint 1. To open the flow in the Debugger, click the debug icon ( ) in the toolbar.
2. In the Debugger Breakpoints & Response Overrides panel, the Breakpoints tab shows the existing breakpoints:
Figure 65 - Enabling and disabling breakpoints 3. Select or de-select the breakpoints checkbox.
To set a response override for a single step 1. With the flow open in the authoring pane, right-click the step whose response you want to override. 2. In the drop-down menu, point at Debugging then Override Response, and then click the response you want to force the step to have. After you have created a response override here, then in the Debugger you can enable or disable the override, or choose a different response for it.
107
To enable, disable, or choose a different response for the response override 1. To open the flow in the Debugger, click the debug icon ( ) in the toolbar.
2. In the Debugger Breakpoints & Response Overrides panel, the Response Overrides tab shows the existing response overrides:
Figure 66 Working with response overrides 3. Scroll up or down to the response override of interest. 4. To enable or disable the response override, select or de-select its checkbox. 5. To choose a different response for the override, click the down arrow and select the response. To manually choose a response for every step in the run 1. Before the run starts or at any point at which the run is paused, click the override responses icon ( ) in the Debugger toolbar.
terms to work on them, then check them in to commit your changes to the public repository. The checkout/checkin requirement for working in the public directory prevents change conflicts. When a flow that you have perfected on the development server is ready for the real world, you then publish the flow from the development Central server to the Central server in the production environment. You develop flows offline, in your local repository, then publish them to the public repository on the Central server. When you work offline (that is, you are not working in a public Central repository), you do not need to check out an object to work on it. Publishing to the Central repository will, however, involve checking affected objects in to the Central repository. When you are offline, you can also export and import selected portions of a repository. Only the author who creates a local repository has access to it. No one can either update or publish to a local repository that you created except you.
For discussion of the scenarios in which you might want to use multiple repositories, see Repositories: Libraries for flows and their objects. To work in another repository, you add it and then open it. To add a repository 1. On the Repository menu, click Add Repository. The following dialog appears:
Figure 67 - Adding a repository 2. In the Repository Name text box, type a name for the repository. The name can be anything youd like it to be. 3. To add a local repository, select Add/Create local repository and specify a location for the repository folder. Note: if there is already a repository stored at the location you specify, you are prompted to type or browse to a different location.
109
OR To add a repository on the Central server, select Add remote Operations Orchestration Software repository and then: a. In the drop-down list of communication protocols, select the protocol that Central uses for communications. By default, Central uses the https protocol. c. In the text boxes to the right of the list, type the Central servers name and the port that it uses for HP OO communications. By default, the port for Central when it uses the https protocol is 8443. 4. To open the repository after you create it, click Open repository after adding. 5. Click OK. The repository is added to the list of available repositories. To open a repository for authoring 1. On the Repository menu, click Open Repository. 2. From the list of available repositories, select the one you want to work in.
To publish or update flows, operations, and other HP OO objects from one repository to another, you must first set a target repository. The repository that is not the target repository is the source repository. Note: You cannot set the open repository as the target repository. Because storage of the repositories resides outside of Studio, you do not need to set a target repository for exporting or importing When you publish, you are publishing from the source to the target.
110
When you update, you are updating from the target to the source.
When you publish or update, you can pick and choose which groups of objects you publish, with the constraint that when a flow is published, all of its dependent objects that is, the operations and system objects that that flow uses are published or updated with the flow. For information on publishing and updating flows, operations, and system objects, see Moving flow elements between repositories.
To publish to a repository 1. With the local repository open, set the public repository as the target repository. 2. On the Repository menu, click Publish Source to Target - Preview. OR Click the Publish/Update tab at the bottom of the Studio window. 3. Click the pin icon ( ) to keep the Publish/Update panel open.
112
Tip: If you are publishing and realize that you might need to update from the target repository, then at the left end of the Publish/Update panels toolbar, click either the Update Preview icon ( ) or the Publish & Update Preview icon ( ). The Publish/Update panel lists any conflicts between the source and target versions of the two repositories objects. 4. To completely expand each folder in the dialog box, click the plus sign ( ).
Figure 69 - Publish/Update panel Note the following information in the dialog: The version information and last-modified time/dates for both the local and the target versions The action, Delete or Add, that will be effected by applying the changes, and the pathname of the repository on which the changes will act. Folder contents that you have not changed since the last time you published the repository are listed, but the action selected for them is No Change ( ). If there is a conflict between versions of objects, you can examine the two versions of the object individually, or side by side. Key information: When you preview publishing, a conflict is reported only if there have been changes to both objects of the same name in the target and the source repositories. Suppose, for instance, the following. a. Local repository X and the public repository are in synch. d. You import a new version of testflow1 to local repository X. e. From a second local repository Y, you publish another version of testflow1 to the public repository. Now testflow1 has changed in both local repository X and in the public repository. A conflict will be reported for testflow1 when you preview publishing from local repository X to the public repository. In this example, there are conflicting versions of testflow1 on the local and target repositories. 5. To look at either of the versions by itself, right-click in the row for the object (testflow1), and then, in the menu that appears, click Open Local or Open Target, depending on which you want to examine. The flow diagram of version that you select opens in the authoring pane of Studio, above the Publish/Update panel. OR To look at both versions side by side, , right-click in the row for the object (testflow1), and then click Compare. In the flow diagram(s), you can make and save changes.
113
6. After comparing the objects and possibly making changes, choose an action for each object or folder: Tip: Note that in the Publish & Update Preview, you can choose to publish some objects and update others.
OR
To change the object in the target repository, click the upward-pointing arrow
. ).
To delete the object or folder from the source, click the downward-pointing arrow ( To take no action, click the No Change icon ( ).
Right-click the object and choose the corresponding command: To update the object from the target, Modify <objectname> in local To publish the object to the target, Modify <objectname> in target To take no action, No Change ).
7. To apply the changes that youve specified, click the Apply icon ( 9. Save your work.
8. When a message appears saying that all changes have been successfully applied, click OK.
name in the same location in the target and source repositories, but that have two different IDs. Suppose, for instance, the following: The local repository and the public repository are in synch, and both contain testflow1. In the public repository, you delete testflow1 and then add another version or instance of testflow1.
Now the ID of testflow1 in the public repository is different from the ID that testflow1 has in local repository. A conflict will be reported for testflow1 when you preview updating from the public repository to the local repository. 4. To completely expand each folder in the dialog box, click the plus sign ( ). Important: If there is a conflict between versions of objects, you can examine the two versions of the object individually, or side by side. In the illustration, there are conflicting versions of testflow on the local and target repositories and a new flow, testflow2, that was published to the Public repository from another local repository.
Figure 70 - Update panel with conflict 5. To look at either of the versions by itself, right-click in the row for the object (testflow1), and then, in the menu that appears, click Open Local or Open Target, depending on which you want to examine. The flow diagram of version that you select opens in the authoring pane of Studio, above the Publish/Update panel. OR To look at both versions side by side, right-click in the row for the object (testflow1), and then click Compare (or double-click the row).
115
You can make and save changes in the local repositorys flow diagram. (Note that the target [i.e., Public] repositorys flow diagram is read-only.) 6. After comparing the objects, choose an action for each object or folder: Tip: Note that in the Publish & Update Preview, you can choose to publish some objects and update others.
OR
) to update the local repository with the object from the public ) to copy the local version of the
If you are updating, click the downward-pointing arrow ( object to the public repository. To take no action, click the No Change icon ( ).
Right-click the objects row and click either Select Incoming (to update the local repositorys version of the conflict from the Public repository) or Select Outgoing (to publish the local repositorys version of the conflict to the Public repository. OR For more detail on what it will mean to select the incoming version or the outgoing version of the conflict, highlight the objects row, right-click, and choose the corresponding command: To update the object from the target, Modify <objectname> in local To publish the object to the target, Modify <objectname> in target To take no action, No Change ).
7. To apply the changes that youve specified, click the Apply icon ( 8. Save your work.
116
Exporting a repository
To make flows and OO objects available to an author with whom you do not share a public repository, you can export the flow and its dependent objects as a repository, which other Studio authors can then import. Exporting repositories to a safe backup location is also how you create backups of your flows and their dependent objects. To export a repository 1. In the Library, right-click the folder that contains the OO objects you want to export, point to Repository, and then click Export as New Repository. 2. In the Select Repository Directory dialog, navigate to the location where you want a new folder to reside. 3. In the File name box, type the folder name. The folder should not be an existing folder. 4. Click Save. The Export Options dialog appears.
5. In Export Options, select any items that you want not to include in the exported repository. If you are going to import the exported repository to the installation of Studio where youll use it, you dont need to include HP OO content. If any of your flows use HP OO content and you are going to open the exported repository without importing it, then be sure to include HP OO content in the export (that is, do not exclude it). The starred items (RASes, selection lists, system accounts, and HP OO content) are excluded from the export (even if you have not marked them for exclusion) if they are not referenced by a flow or operation that youre exporting. If you are going to use the Shell Wizard to add an operation that runs a Windows or Linux shell (command-line) command to the repository that you are exporting, it is recommended that you export the entire Studio Library, rather than a subfolder of the Library. If you export a subfolder of the Library and are going to point the Shell Wizard or Web Service Wizard at the resulting export, be sure not to exclude OO content from the export. If you do so, the repository must include either the SSH Shell or Telnet Shell operation. SSH Shell or Telnet Shell operation are part of the default OO Content, so you must include the OO Content in an export when the Shell Wizard will add a shell operation to the resulting repository. Among the other items you can exclude from the export of the repository, you might want to exclude any of the following if they are specific to one environment and youre exporting the repository for use in a different environment: Remote Action Services (RASs) A RAS is an reference to RAS that enables a flow to carry out commands outside HP OO or on a remote computer, or to integrate with other application programming interfaces Selection lists Stored lists that are presented to the user. System properties Global flow variables with values that never change and so can be used in many flows, saving you the time of recreating the flow variable each time you need to use it. System accounts These are user credentials that are hidden behind the system account name by which they can be referenced. Important: Keep in mind that the items that you select are those that you want to exclude from the export. That is, they are those that you do not want to export. 6. To give everyone read, write, execute, and link permissions for the flows, operations, and HP OO objects (such as selection lists) that you have created or have the right to modify and are exporting, select Give EVERYBODY group full access to exported items for which you have write access. 7. Click OK.
Importing a repository
To obtain additional existing flows and operations which may have been created by someone else or are in a new Accelerator Pack you can import a repository or a Java archive (.jar) file, if the repository has been stored in that format. When you import a flow, you also import the flows configurable HP OO objects, such as domain terms and filters that have been saved as system filters, that are used by the flow or its operations.
118
Remember: When you import a flow or operation, youre importing the object, not a copy or instance of it. Further, the object can only exist in one place within the repository. An operation can reside anywhere in the library relative to the flow or flows that use it. To import a repository 1. Either select or create a folder in the Library. 2. From the Repository menu, choose Import Repository. If you have a flow or operation open in the authoring pane, a message appears, prompting you to allow the program to close all editors. 3. If you see that message, click OK. 4. In the Select Repository Directory or .jar dialog box that opens, navigate to the directory that contains the repository (which may be an Accelerator Pack) or .jar file that you want to import, and then click Open. After Studio checks for differences between the source and target repositories, the Importing from dialog box opens.
Figure 72 - Importing dialog box This dialog lists the folders whose contents you will import. The Library folder contains the flows and operations that youre importing. The Configuration folder contains domain terms and HP OO objects.
When you expand a folder, the dialog shows this information for each object to be imported within that folder. Note that even if the action shown for a folder is No Action ( ), there may be changes within that folder for you to examine. 5. To completely expand each folder in the dialog box, click the plus button ( ) in the toolbar.
When you expand the folders, the dialog shows similar information for each OO object.
119
Figure 73 - Selecting objects to import Note particularly the following information for the items in the target repository that exist in both the target and the source. The Revision (version) number for the item in the target and in the source Who created or changed the item, and on what date A description of the change, or notation that there is no difference between the two apart from a date stamp. In this example, by the way, the folders and their contents have not been changed since they were exported. When you import a folder or OO object that you havent changed since you exported it, the folder or object is listed, but the No Change icon ( ) is highlighted for it. When you click the Apply button ( ), no action will be taken on that item. ).
Note: You can view only the conflicts by clicking the View All Changes button (
6. To import a folder and its contents or an OO object to the target repository, under Action, click the upward-pointing arrow ( ) for the appropriate row. OR To leave an object as it is in the source, click the no-change icon ( ). Tip: You can take the same action for all the objects within a folder by clicking the upward-pointing arrow or the no-change icon for the parent folder. 7. In the toolbar of the dialog, click the Apply button ( ).
When repositories are exported, they reside outside of Studio, so to import them you do not need to set a target repository.
120
Validating repositories
For a flow to run, the flow itself, its operations, and any system accounts used in the flow must be valid. You can check an individual flow or operation for problems (by highlighting the flow or operation in the Library and then clicking the Problems tab). (See What a flow needs to be valid.) Or, to discover and correct in one sweep any problems that there might be, you can validate an entire repository. This validates all the flows, operations, and system accounts in the repository. To validate a repository With the repository open, from the Tools menu, click Validate Repository. A list of any problems, with their location and description, appears, as it does when you use the Problems tab, to guide you in repairing the problems.
Encrypting repositories
Creating encrypted copies of local repositories protects snapshots of your work from tampering or theft. When you encrypt a local repository, you are making a copy of the repository and encrypting the copy. To modify in anyway, publish to, update from, import to, or export an encrypted repository, you must type the correct password. Notes: You can only encrypt a local repository. If Studio has the public repository open, the commands related to encrypting repositories are unavailable. The entire repository is exported to the encrypted copy, regardless of which folder within the repository is selected. When you encrypt a repository, the original, unencrypted repository remains open in Studio. Once you have created an encrypted repository copy in a given location, you cannot re-encrypt a repository or encrypt another repository to the same location.
Encrypting a repository
When you encrypt a repository, you are exporting it and encrypting the export of the repository. To encrypt a repository 1. With the local repository that you want to encrypt open, on the Repository menu, click Encrypt Repository. The following dialog appears:
121
Figure 74 - Encrypting a repository 2. In New Repository, type a path and name for the new copy of the repository. OR Click the button to navigate to the desired location or repository and name the encrypted copy. 3. Type and confirm a password for the encrypted copy, and then click OK.
Decrypting a repository
To decrypt a repository 1. Open the encrypted repository. 2. From the Repository menu, click Decrypt Repository. Suppose you want to create a second encrypted copy of the repository, with a different password. You do so by re-encrypting the repository.
Figure 75 - Re-encrypting a repository 3. In New Repository, type a path and name for the new copy of the repository. OR Click the button to navigate to the desired location or repository and name the encrypted copy. 4. Type and confirm a password for the encrypted copy, and then click OK.
When you run the Web Services Wizard, you provide it with the WSDL for a given Web service. The WSDL string you provide as a pointer can be a files location and name or a URL. For instance, suppose you have an application called AlertAlert that creates a ticket through a Web service and API, and you want to tell AlertAlert to create a ticket. The Web Services Wizard extracts, from the Web services WSDL, the applications APIs for the actions that can be performed with the application, such as creating or changing a ticket. The WSDL defines the Web services methods, the inputs that each method needs, and the required format for each input. When you provide the wizard with the WSDL (in our example, for AlertAlert) and run the wizard, it generates operations that can run against the Web service. The operations appear in the Studio Library, with the required inputs created. You can use the operations in flows. To run a flow that uses one of these operations, in Studio youll need to create a remote ac tion service (RAS) that points to the Web service. To create operations for a Web service with the Web Services Wizard 1. In the HP OO home directory, in \Studio\tools\ double-click Wswizard.exe. The WebService Wizard starts.
Figure 76 - WebService Wizard 2. In the Specify WSDL file or URL box, type the URL or file location of the WSDL. OR Click Browse and navigate to the location where you want to store the files. The WSDL location can be the URL of a RAS reference that you created in Studio, because the RAS that the pointer references is a Web service. 3. Click Next. A progress box appears while the wizard loads the WSDLs.
124
Figure 77 - Choosing operations to create The page lists all the WSDLs methods, which can be turned into operations. 4. Deselect (remove the check from the checkbox of) the methods that you do not want to turn into operations, and then click Next. The Select Repository page opens, in which you will specify the folder where a repository is created to contain the new operations. It is recommended that you specify a folder that is currently empty. 5. Under Enter the repository to open, type the path and folder where you want to create the repository containing the operations the wizard creates, and then click Next. OR Click Browse and navigate to the location where you want to create the repository, and then click Next. The wizard completes creating the operations and placing them into the repository that you specified. 6. To create more operations, click Next and repeat the earlier steps in this procedure. OR If you are finished with creating new operations by this method, click Finish. 7. Open Studio and import the repository that you just created.
125
The RAS must be installed on the computer where it extends a flows operations. You could use a RAS to accomplish the following: Integration with the Exchange API. Restarting a server in a different domain from the one in which Central is installed. If you have installed a RAS on a machine in the domain of the server youre going to restart, you can run a flow that restarts the server by pointing the flow at the RAS on that domain. Carrying out an operation on a Windows server when Central was installed on a Linux server. Distribution of the load of your automation across multiple servers.
A flow that uses a RAS requires a RAS reference on the Central server that points to the RAS. A complete RAS reference on the Central server has a name and a URL that accesses the RAS. Therefore, to make a flow that works outside HP OO, you may need to install the RAS, then configure a RAS reference for your flow. When you installed Central and Studio, the RAS reference RAS_Operator_Path was created on Central. If your flow can use this RAS, you only need to confirm the availability of the RAS. However, if your flow uses a RAS that has a different path from the existing RAS, you would need to add and configure a new RAS service. When you integrate HP OO with another API, you use the Operations Orchestration Software Development Kit (SDK) and C# or Java to implement the IAction interface, then deploy the operation to the Remote Action Service (RAS). This level of authoring requires the ability to program with .NET or Java as well as Windows Scripting Host or Perl scripting. Topics in this section How Central runs RAS-dependent operations Checking the availability of a RAS Adding an existing RAS Adding a RAS reference Reconfiguring an existing RAS reference Changing RAS references Creating operations that access Web services Troubleshooting the running of RAS-dependent operations Creating operations from RASes Removing a RAS reference Importing RAS content
126
These pieces of information are specified in the RAS Operation fields on the operations Properties sheet. Operations in the Integrations, Operations, and Utility Operations folders in the Library already have this information provided. If you change the URL of the RAS, you must also change the URL of the RAS reference in Studio. Creating a RAS-dependent operation from scratch, includes: Creating a DLL or .jar to contain the operations definition. Specifying that DLL or .jar in the installation of a RAS service for running the operation. in the operations RAS Operation fields, providing the name of the operation class, the DLL or .jar, and the name of the RAS pointer.
For information on specifying values for the RAS Operation fields on a RAS operations Properties sheet, see RAS operation: IAction programming for a RAS.
Figure 78 - Remote Action Services sheet The RASs availability is reported in the Availability column. 3. If the RAS is not available, click the right-pointing arrow at the end of the RAS pointers line, and then correct the location of the RAS in the URL box.
To add an existing RAS 1. Open the Configuration\Remote Action Services sheet. 2. Under Discovered RAS, select the RAS that you want to make available to your operations, and then click the Add button under Discovered RAS. 3. In the dialog that appears, name the new RAS. The new RAS appears in the list of RASes above.
Figure 79 - Settings for HTTP Proxy In the Host text box, type the machine name or IP address of the server on which the proxy resides. In the Port text box, type the port that the proxy uses. In the Username and Password text boxes, type the credentials required to use the proxy.
128
Figure 80 - HP Gateway proxy settings In the Host text box, type the machine name or IP address of the server on which the proxy resides. In the Port text box, type the port that the proxy uses. In the Realm text box, type the name of the Hewlett-Packard Gateway realm that the gateway is a member of.
5. To check availability, click the left-pointing arrowhead at the top right of the RAS editor, and then click Check Availability. Doing so checks for the availability of the services URLs and displays their availability (or lac k of availability) in the Availability column. 6. Click Check Availability. The availability or lack thereof appears in the Availability column. 7. When the RAS is available, click OK at the bottom of the pane, and then save your changes.
129
Figure 81 - Settings for HTTP Proxy In the Host text box, type the machine name or IP address of the server on which the proxy resides. In the Port text box, type the port that the proxy uses. In the Username and Password text boxes, type the credentials required to use the proxy.
Figure 82 - HP Gateway proxy settings In the Host text box, type the machine name or IP address of the server on which the proxy resides. In the Port text box, type the port that the proxy uses. In the Realm text box, type the name of the Hewlett-Packard Gateway realm that the gateway is a member of.
4. To check availability, click the left-pointing arrowhead at the top right of the RAS editor, and then click Check Availability. Doing so checks for the availability of the services URLs and displays their availability (or lack of availability) in the Availability column. 5. When the RAS is available, save your changes and close the editor. OR To work on another RAS, click either the up arrow or the down arrow at the top left of the RAS tab, below the save icon.
For more information, see RAS operation: IAction programming for a RAS. All the iAction-based operations provided in the OO content folders (the Integrations, Operations, and Utility Operations folders) include, in the Override RAS field, a reference to the overrideRAS, overrideNRAS, or overrideJRAS flow variable. It is strongly recommended that when you create a RAS operation or create an operation from an iAction, you include the flow variable reference ${overrideRAS} in the Override RAS field. There are two ways to change a RAS reference. Which you choose to do depends on why and when you want to change it: When you create an iAction operation, you can change the RAS reference by dragging a new RAS reference from the Configuration\Remote Action Services folder to the globe icon ( ) in the RAS: field of the Inputs tab on the operations Properties sheet. You can only change the RAS reference this way on the operation itself. When you are creating a flow step based on an operation that was created from an iAction, the preferred way to change the RAS reference is to override it, using a flow variable whose value is the name of a RAS reference that you have created in the Configuration\Remote Action Services folder. Doing so enables you to do one of the following: Change the RAS reference for a given flow without changing the underlying operation. Run the flow on multiple RASes by creating a flow or step input that prompts the user for a value (the name or URL of the RAS reference) and then assigns the users response to the overrideRAS flow variable.
To change the RAS reference on the operation On the Inputs tab of the operations Properties sheet, drag a RAS reference from the Configuration\Remote Action Services folder to the globe icon ( label. To override the default RAS reference with another RAS reference 1. Create either a flow input or, on the step created from the operation containing the RAS reference, a step input. 2. Specify that the input assign its value to the flow variable that is referenced in the relevant operations Properties sheet Inputs tab, in the Override RAS field. In operations provided in OO content, the flow variable referenced in the Override RAS field is overrideRAS, overrideJRAS, or overrideNRAS. 3. Make sure that the Override RAS field references the flow variable to which the flow input you created in the preceding step . ) beside the RAS: field
Or suppose that you want an operation to perform a Web search using the Google search engine. You would locate the GoogleSearch Web service WSDL and navigate to the WSDL in the Web Service Wizard. From the list of methods that appear in the Wizard, you would select doGoogleSearch and, by clicking Generate XML, create the XML that defines an operation that performs the Google search. Note: To use RAS-dependent operations, you must also configure HP OO for extended functionality. For information on doing so, see Administering Operations Orchestration Software (AdminGuide.pdf). For information on using the WebService Wizard, see Creating operations from Web services.
3. Provide the flow variable rasname as an input to the RAS operation that restarts the server. You might want to rename the RAS operation in the RAS operations rasname property.
To import custom Web service content, you create, name, and assign a URL to a RAS reference. Identification of the RAS by primarily by name rather than by URL means that changing the URL in the Studio enables you to use the RAS in multiple locations.
132
The Configuration folder contains a Remote Action Services folder that holds the existing RAS pointer. Now youre ready to import Web service content (operations and flows) from a RAS. To configure a RAS reference using an existing, discovered RAS 1. In the Library, right-click the Configuration\Remote Action Services folder, and then click Open. The Remote Action Services sheet opens in the authoring pane. 2. Under Discovered RAS, select the discovered RAS for which you are going to create a pointer, and then click the lower Add button. 3. To check availability, click the left-pointing arrowhead at the top right of the RAS editor, and then click Check Availability. Doing so checks for the availability of the services URLs and displays their availability (or lack of availability) in the Availability column. 4. When the RAS is available, save your changes and close the editor. Topics in this section Creating operations from a RAS
Note: Because all RAS actions have to implement the IAction interface, in order to make the third-party library work, you probably must build an IAction class that contains the library. 3. To make sure that your remote or extended RAS operations function correctly: After the RAS that you need is installed and configured in Studio, be sure to check its availability in Studio. For information on checking the availability of an RAS, see Checking the availability of an RAS. You may also want to make sure that the RAS youre using supports your operation. To do so, you can import the operations in the RAS and review them. See Creating operations from RASes.
Note: By default, the operation that you create from the IAction bases any responses only on IAction return codes. However, after you have created the operation, you can create response rules that test any other output of the IAction.
Studio has by default system evaluators for validating the following: Alphanumeric Email Filename IP address No white space Numeric Phone number
Evaluators can use standard evaluators such as =, !=, Begins with, Contains, Match All Words, Match At Least One Word, etc., or they can use evaluation tools such as the following: Regular expressions For information on creating regular expressions, see Working with regular expressions. Scriptlets References to shared evaluators
Creating an evaluator
To create an input-validation evaluator 1. In the Library, right-click the Configuration\Evaluators folder and click New. OR Click Open, and in the System Evaluators sheet that appears, click Add. 2. In the Select Evaluator drop-down list that appears, select an evaluator or evaluation tool and click OK. 3. In the next box, name the evaluator and click OK. The new evaluator appears in the list of evaluators in the System Evaluators sheet. 4. To complete the evaluator, click the right-pointing arrow ( ) at the right end of the row.
The system evaluator editor opens. Its appearance depends on the kind of evaluator you 5. In the Compare To box, type the string that you want to use the evaluator to test the input. 6. To clear the contents of the Test Filter Input box, click Clear. 7. Test the evaluator by either: Typing a sample of the text you want to validate Click Quick Command; in the Input box that appears, type the command and arguments that obtain output that you want to validate or test; and then click OK.
8. Save your work. For instance, to create an evaluator that validated input for URL format, you could select the evaluator Begins With and then, in the Test text box, type http://www. Or you could describe the start of a URL with a Regular Expression.
Editing an evaluator
To modify an evaluator 1. In the Library, open the Configuration\Evaluators folder. 2. Right-click the evaluator you want to modify and click Open. 3. Make changes as you did in the procedure for creating an evaluator.
135
4. Save your work. To edit another evaluator without closing the editor Click Previous Item or Next Item.
Deleting an evaluator
To delete an evaluator 1. Open the System Evaluators sheet. 2. In the list of evaluators, select the one you want to delete, and then click Remove. 3. Save your work.
To record an input for Dashboard reporting With the Inputs tab open for the input you want to record, select Record for reporting and in the drop-down list select the domain term under which you want it recorded.
The value of the input for this flow will be reported to Central. Any Dashboard chart that has an axis that presents data recorded for the domain term that you chose will show this inputs value on that axis.
The domain terms that you can use for reporting data to Dashboard charts include the following. Some of them have values by default; others obtain their values from the flows inputs; yet others have the values that you create for them. Action The action that the flow performed. You add these values to the list, then enter them as values of inputs that are associated with this term. Alert The identity of the alert that you want to associate with the flow. The value associated with Incident can be supplied by a flow input. Category The category of the flow. A number of categories are supplied by default; you can add to the list of categories. CI Minor Type These terms could be the divisions of CI Types (see next domain term). For instance, if network hardware is a CI Type term, then CI Minor Type terms might include router, server, gateway, etc. You add these values to the list, then enter them as values of inputs that are associated with this term. CI Type These terms could be the major divisions of IT infrastructure elements, such as network hardware. You add these values to the list, then enter them as values of inputs that are associated with this term.
137
Configuration Item Specific servers, routers, switchers, applications or other elements in your IT establishment. The value associated with Configuration Item can be supplied by a flow input.
Incident The incident that triggered the running of the flow. The value associated with Incident can be supplied by a flow input.
Problem The issue that the running of the flow is meant to correct. You add these values to the list, then enter as values of inputs that are associated with this term.
Severity The severity of the problem, incident, or alert that triggered the flow.
138
Figure 84 - Specifying a display for users 2. To provide a title for the message, in the Prompt Title box, type the title. 3. To specify a width and height for the display, type the width and height, in pixels, of the message or prompt of the appropriate text box. 4. In the Prompt Text box, type the text to be displayed. 5. Save your changes.
139
Figure 85 - Assigning a flow to a category You can create new categories as you can any other domain term. For information on adding new domain terms, see Domain terms for Dashboard charting.
Figure 86 - Selection list editor 3. Give the selection list a description, if you wish. 4. To add an item to the list, click Add and name the item.
140
5. To remove an item, click Remove. 6. To close the selection list editor, click the X that is on the same level with Selection Lists. To edit a selection list 1. In the Repository pane, right-click the Configuration\Selection Lists folder and click Open. The list of selection lists appears. 2. To edit the list, click the right-pointing arrow ( 4. To remove an item, click Remove. 5. To close the selection list editor, click the X that is on the same level with Selection Lists. To remove a selection list 1. In the Repository pane, click the plus sign to the Configuration\Selection Lists folder. 2. Right-click the selection list that you want to remove, then click Remove. 3. Click OK, then save your work. ) at the right end of the lists row.
3. To add an item to the list, click Add and name the item.
141
Figure 87 - System account editor 3. Type the user name of the account that the system account represents, using the following syntax: <domain>\<username> 4. Click Assign Password and in the box that appears, type the password, then type it again when prompted. 5. Give the system account a description, if you wish. 6. Click the Save icon and then, to close the system account editor, click the X that is on the same level with System Account.
142
The following two tables describe the permissions and which of them are needed for objects in Studio. HP OO objects and the permissions needed to work with them Object Folder View contents Add to contents
143
Action
all children of the folder) Move Rename Flow or operation View/open Modify Rename Execute/Run Use as a step or sub-flow System accounts, selection lists, and other objects in the Configuration folder View account name Change account password Rename account Use in flow or operation Use at runtime Read Read, Write Read, Write Read, Link To Read, Execute Read Read, Write Read, Write Read, Execute Read, Link To Read, Write Read, Write
How your changes to permissions are applied differs slightly, according to whether you apply them to an object or a folder: For a folder, you can choose to apply the permissions to all the contents of the folder, recursively. For a flow or operation, you can choose to apply the permissions to all the flows, operations, and system objects (domain terms and other items in the Configuration folder) that reference or are referenced by the flow or operation for which youre defining permissions. References can be indirect as well as direct. Note: While you can set permissions directly for system accounts, you can only implicitly set permissions for all the other system objects in the Configuration folder (by specifying that the permissions you set for a flow or operation be applied to all the objects that the flow or operation references). To set permissions for folders or HP OO objects
144
1. In the Library, right-click the operation, flow, or system account and, on the right-click menu, click Permissions. A dialog box similar to the following appears.
Figure 88 Setting permissions Tip: You can hide the groups for which there are no permissions set by selecting the Show only groups with permissions set box.
2. Select permissions for each group of users according to the access that you want them to have. Notes: When you change a permission for a group, the box for that permission is outlined in black. For each parent folder of the flow, specify the same permissions that you did for the flow.
The Apply to box appears as Apply to contents or Apply to referenced objects, depending on what kind of object youre specifying access permissions for: For folders, it reads, Apply to contents. For flows, operations, and system accounts, it reads, Apply to referenced objects. In this dialog, Referenced objects means not only flows, operations, and system objects that this object refers to, but also flows and operations that refer to this object. 3. If youre setting permissions for a folder, to apply the folders access permissions to all the flows, operations, and subfolders (and their contents), select Apply to contents. OR If youre setting permissions for a flow, operation, or system account, to apply the objects access permissions to all the flows, operations, and other system accounts that refer to the object or that the object refers to, select Apply to referenced objects. Now, do you want to apply only the changes in permissions that you have made and not yet applied (those which are bold in the grid), or all the permissions that currently appear in the matrix? 4. To apply only the changes that have not already been applied to the folder or object, in the drop-down list beside the Apply to box, select Changes.
145
OR To apply all the permissions currently specified in the grid, including the settings you have just specified, then in the drop-down list beside the Apply to box, select All. The following step assumes that you are specifying permissions for a folder. 5. To apply these permissions to any flows, operations, or system accounts that are subsequently created within the folder, select Copy permissions to new content when created . When you select this checkbox, the permissions that you have set for the folder override default permissions that you have set for a group. For example, suppose you have: Set the Write permission in the default group mask for the LEVEL_THREE group. In the permissions for folder A, set only the Read permission for the LEVEL_THREE group. Specified that the folder A permissions be applied to anything created in the folder in the future.
If you then create a flow in folder A, the LEVEL_THREE group will have Read but not Write permission for the new flow. (You can subsequently change the LEVEL_THREE groups permissions for the new flow.) For information on setting default permissions for a group, see Setting default access permissions for groups. 6. Click OK and save your work.
If you then create a flow in folder A, the LEVEL_THREE group will have Read but not Write permission for the new flow. (You can subsequently change the LEVEL_THREE groups permissions for the new flow.) To set default access permissions for groups 1. On the Tools menu, click Set Group Mask. 2. In the following dialog, select the permissions for each group that you want that group to have in Studio and Central by default on all new HP OO objects, and then click OK.
146
After you create an operation, you complete the operations Properties sheet. The following procedure tells you about the Properties sheet items that are common to all the operation types. After you finish this procedure, specify the properties that are particular to the operation type that you have created. Operation-specific properties are described in the list in Types of operations: setting properties, following this procedure. To create an operation 1. Right-click the folder in which you want to create the operation, point to New, then to Operation, and then select the desired type of operation from the list that appears. 2. In the dialog box that appears, type a name for the new operation in the text box and then click OK. Notes: Naming in Studio is not case-sensitive, and you cannot give two operations the same name. Names can be a maximum of 128 characters long. The Properties sheet for the new operation appears in the authoring pane.
3. To assign the operation to a category for search purposes, click Assign Categories and then select a category from the list. Note: Because Central users never see operations, it is not necessary to select Hide in Central. 4. If the operation requires an input, click the Inputs tab and then click Add Input. You can obtain input values from flow variables. 5. Add any necessary inputs and assign them their data sources. 6. In the dialog that appears, type the input name and then click OK. For information on adding inputs, see Inputs: Providing data to operations. For information on using flow variables when assigning a data source to an input, see Flow variables: Making data available for reuse. 7. Add and define any output data. For information on adding and working with output data (results), see Outputs, responses, and step results. 8. Create any responses needed.
147
For information on defining rules that govern which responses are chosen for the operation, see Responses: Evaluating results. For information on the response definitions that are particular to each type of operation, see Types of operations: setting properties, following this procedure. 9. To document the operation for the Central user, click the Description tab and write the description in the text box. 10. Finish specifying properties as described in the following section (Types of operations: setting properties), and then click OK. In the Library, if the new flow is invalid or incomplete, its name is displayed in red type. Moving the cursor over the name of an incomplete operation displays a tool tip that specifies how the operation is incomplete. (To review the requirements for a valid operation, see the list that comes before this procedure.)
For the command-line, http, secure shell, and telnet operations, you can add the op-timeout input, which is optional, and specify a time value for the input, in milliseconds. The default value is 2 minutes, or 120000 milliseconds. You add the op-timeout input as you do any other. For the steps to add an input, see the procedure To create an operation. Note: RAS operations cannot take op-timeout inputs, because they only act as proxies for IActions. Any operation timeouts must be programmed in the IAction. For some of these operation types, there are various ways to create the operation. Where relevant, discussion of the operation type includes recommendations on which method to use. In the following screen shots, note that the Properties sheet for an operation includes the operations universally unique identifier (UUID) and last modified date.
148
Figure 89 Cmd (shell) operation properties For information on the values you need to provide for the inputs, see the Description tab of the operation. On the Responses tab, in the response editor (which you open by clicking the right-pointing arrow in the responses line), you can use the following terms in the Apply Rule to Field column for building statements to which a response is bound. For more information on these terms, see the Description tab of the operation, under Extra Results. Code Output String Error String FailureMessage TimedOut
Http operation
Use for simple put or get operations, retrieving docs such as log files from an intranet or extranet. Because IAction programming would not accomplish these tasks in a significantly different way or offer advantages over a standard http operation, this is the method of choice.
149
Figure 90 - Http operation properties Following are the inputs to Http operations, and what they need for values: Method Http protocol methods. Pick one from the drop-down list. Url The URL of the target Web page. Protocol The version of the http protocol. Pick the version that the target server supports. Body If the request has a body, the data of the body, as defined in RFC 2616. On the Responses tab, in the response editor (which you open by clicking the right-pointing arrow in the responses line), you can use the following terms in the Apply Rule to Field column for building statements to which a response is bound. For more information on these terms, see the Description tab of the operation, under Extra Results. code Http return code as described in RFC 2616. reason A text string for the return code as described in RFC 2616. headers Response headers as defined in RFC 2616. document The actual document that was returned by the server. FailureMessage The message that you receive on failure. TimedOut Compare TimedOut to true (without the quotation marks).
150
Figure 91 - Perl script operation properties Following are the inputs to Perl script operations, and what they need for values: Script File The Perl script to run Args The arguments that you pass to the script Timeout The maximum time allowed for execution of the script. On the Responses tab, in the response editor (which you open by clicking the right-pointing arrow in the responses line), you can use the following terms in the Apply Rule to Field column for building statements to which a response is bound. For more information on these terms, see the Description tab of the operation, under Extra Results. Code The numeric return code of the operation. If the operation succeeds, this value is typically 0. Output String The standard output of the operation (what the operation writes to stdout). Error String The error output of the operation (what the operation writes to stderr). Script Response For script operations, the string that is returned by the script. Script Result For script operations, the output that is returned by the script. FailureMessage
151
The message that you receive on failure. TimedOut Compare TimedOut to true (without the quotation marks).
Programming that you carry out with scriptlet operations can also be carried out with command or IAction programming operations. For more information on when command or IAction programming operations are indicated, see their descriptions in this list.
Figure 92 RAS operation properties Following are the inputs to RAS operations, and what they need for values: Action Class The name of the action class from which the operation is to be created. Archive The name of the Java Archive (JAR or .jar) file or dynamic-link library (DLL or .dll) file in which the action class is contained
152
RAS The name of the RAS reference that you configured in Studio. The reference is to a default or custom RAS that you installed, on which the operation executes the action class. To change the RAS reference, drag a RAS reference from the Configuration\Remote Action Services folder to the globe icon ( ) beside the RAS: field label. RAS Override - The name of a RAS to use in place of the one associated with the operation (the one specified in the RAS field, described above). Tip: You can create and use a flow variable, such as ${rasOverride} to store the RAS that the override specifies. For information on either changing the RAS reference in the operation or overriding it in the step, see Changing RAS references. On the Responses tab, in the response editor (which you open by clicking the right-pointing arrow in the responses line), you can use the following terms in the Apply Rule to Field column for building statements to which a response is bound. For more information on these terms, see the Description tab of the operation, under Extra Results. FailureMessage The message that you receive on failure. TimedOut Compare TimedOut to true (without the quotation marks). For more information on RASs, JARs, and DLLs and how you can use them to extend the functionality of flows, see Operating outside Central with Remote Action Services and Creating IActions for operations.
Scriptlet operation
Use for creating a scriptlet that you want to have available for reuse in multiple flows.
153
Figure 93 - Scriptlet operation properties Use for gathering up to four pieces of data and passing them to flow variables for use elsewhere in the flow. One of the uses of a Scriptlet operation is to provide user prompts when, in order for the flow to run fully automatically, the step must be able to alternatively obtain the prompts input value from a flow variable. Following are the inputs to Perl script operations, and what they need for values: Fields 1 through 4 The four fields that you can populate using the inputs that you define for this operation. On the Responses tab, in the response editor (which you open by clicking the right-pointing arrow in the responses line), you can use the following terms in the Apply Rule to Field column for building statements to which a response is bound. For more information on these terms, see the Description tab of the operation, under Extra Results. Fields 1 through 4 The contents of the four fields in which you have stored the data from the inputs. FailureMessage The message that you receive on failure. TimedOut Compare TimedOut to true (without the quotation marks). Result The output that is returned by the script.
154
Figure 94 - Secure shell operation properties For information on the values you need to provide for the inputs, see the Description tab of the operation. Notes: In the Host input, to specify a particular port for the host, specify the host and port with the following syntax: <hostname>:<portname> The Pty checkbox creates a pseudoterminal so that Unix operations that require a terminal can be run from a secure shell operation that you create. Warning: A pseudoterminal does not distinguish between the standard output (or output string) and standard error (or error string) but takes both. As a result, the error string is always empty. On the Responses tab, in the response editor (which you open by clicking the right-pointing arrow in the responses line), you can use the following terms in the Apply Rule to Field column for building statements to which a response is bound. For more information on these terms, see the Description tab of the operation, under Extra Results. Code Output String
155
Telnet operation
Use for sending messages or commands to a server using the telnet protocol.
Figure 95 - Telnet operation properties Following are the inputs to Perl script operations, and what they need for values: Command The shell command that the operation executes Arguments The command-line arguments (switches) Environment Additions to the existing environment variables Path The path to the shell command Tip: To specify a particular port for the host, specify the host and port with the syntax: <hostname> <portname> Note that for telnet operations, the separator between <hostname> and <portname> is a whitespace. Host The target computer for the secure shell command
156
Port The port through which the operation connects to the target computer Session Name The name for the session that you want to store in the context On the Responses tab, in the response editor (which you open by clicking the right-pointing arrow in the responses line), you can use the following terms in the Apply Rule to Field column for building statements to which a response is bound. For more information on these terms, see the Description tab of the operation, under Extra Results. Code The numeric return code of the operation. If the operation succeeds, this value is typically 0. Output String The standard output of the operation (what the operation writes to stdout). Error String The error output of the operation (what the operation writes to stderr). FailureMessage The message that you receive on failure. TimedOut Compare TimedOut to true (without the quotation marks).
Note: The Shell Wizard cannot communicate with a server that does not have either an SSH or a Telnet server installed. To create a cmd (or Shell) operation using the Shell Wizard 1. In the HP OO home directory, in \Studio\tools\, click or double-click shellwizard.exe. The Shell Wizard starts. 2. In the Enter the repository to open text box, type the location of the repository in which you want to create a command-line (or shell) operation. OR Click Browse, navigate to the location of the repository, and then click Open. Important: If you point to an empty or nonexistent folder, the wizard creates a folder of that name in that location, if necessary, and creates a new repository. The new repository contains only what is needed to run the operations that you create, including either the SSH Shell or Telnet Shell operation, which enables the running of the operations that you create in this wizard. If you point to an existing repository, the repository must include either the SSH Shell operation (if you use the SSH protocol) or the Telnet Shell operation (if you use the telnet protocol). If it does not include the appropriate Shell operation, you will not be able to
157
complete this wizard. The SSH Shell and Telnet Shell operations are included in Studios default content (operations, flows, and HP OO objects). However, if you export a subfolder of the Studio Library as a repository, you must include default content in the export. If you do include default content in the export, only the default content that is used by a flow or operation in the folder that youre exporting is included in the export . Therefore, it is strongly recommended that you point the Shell Wizard to an empty folder (which you can then import into your Studio repository) or at an export of the entire Studio Library.
4. In the Specify flow information page of the wizard, in the Enter a name box, type a name for the flow that the wizard will create for the shell (command-line) operation. 5. Complete the Enter a brief description box, and then click Next. Keep in mind that Central users may choose your flow based on the description that you type.
158
6. Under Connection Info, in the Host to Connect to box, type the name or IP address of the computer on which you will run the command. 7. In the Username and Password boxes, type the credentials of the account name under which the command will run on the specified host. 8. Under Choose a protocol, select either ssh or telnet, according to which protocol you want to send the command under, and then click Next. It is recommended that you select SSH. The next page of the wizard contains a command window on the host machine.
159
Figure 96 - command-line window on host computer 9. Type the command or command sequence that you want to execute. 10. To add an operation (and step that is an instance of the operation) that executes the command sequence that you have entered, click Add Step. 11. To create another step in the flow that the Shell Wizard creates, type another command or sequence of commands, and then click Add Step. You can add as many steps as you wish. 12. When you are done adding steps, click Next. The wizard adds the operation and step to the flow that you specified. If you see the following error, the cause is that you are adding the operation to an existing repository, and the repository does not include the SSH Shell operation (if you are using the SSH protocol) or the Telnet Shell operation (if you are using the telnet protocol).
160
Click OK, and then do one of the following: Export the default public repository (the Studio Library, not a subfolder of the Library) to the repository that you created for this wizard, and then re-run the wizard. Re-run the wizard, pointing it to an empty or non-existent folder.
For example, suppose the information that an input variable needs from a Ping operation is the packet loss. The output of pinging the IP address 111.111.111.111 looks like the following: Pinging 111.111.111.111 with 32 bytes of data: Reply Reply Reply Reply from from from from 111.111.111.111: 111.111.111.111: 111.111.111.111: 111.111.111.111: bytes=32 bytes=32 bytes=32 bytes=32 time=27ms time=26ms time=29ms time=28ms TTL=246 TTL=246 TTL=246 TTL=246
Ping statistics for 111.111.111.111: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 26ms, Maximum = 29ms, Average = 27ms To extract the number of packets lost, you can instruct HP OO to search for the string Lost = followed by any number. Using a regular expression will help. A regular expression allows you to search not only for exact text but also for classes of characters as well. For example to match any digit you can use the wildcard \d. Therefore, in the above example, a search using the regular expression Lost = \d would return the string Lost = 0. The key wildcards for regular expressions are:
Wildcard ^ $ . \b \B
Uses Matches the beginning of a string Matches the end of a string Any character except newline Word boundary Any except a word boundary
161
\d \D \n \r \s \S \t \w \W
Any digit 0-9 Any non-digit Newline Carriage return Any white space character Any non-white space character Tab Any letter, number or underscore Anything except a letter, number or underscore
Effect Match zero or more Match one or more Match zero or one Match exactly n occurrences Match n or more occurrences Match between n and m occurrences Match either a, b, or c Match anything except a, b or c Match anything between a and c Match a or b Escape a special character (for example \. Means . not match anything
Using these wildcards and modifiers, the following regex extracts the IP address from the ping output: \d{1-3}\.\d{1-3}\.\d{1-3}\.\d{1-3} When using the results filter in Studio, you can combine multiple regexes to isolate the value that you need. For example, consider the output of the Unix ps command: F 0 0 S S R UID 512 512 PID 21604 2659 PPID 21603 21604 C 0 0 PRI 75 76 NI 0 0 ADDR SZ 1096 1110 WCHAN wait TTY pts/1 pts/1 TIME 00:00:00 00:00:00 CMD Bash Ps
162
You could create the following filters to extract the time for the ps command: 1. In Studio, open the Unix ps operation. 2. Open the Output String Field Filters dialog box. For information on opening the Output String Field Filters dialog box and performing the following tasks, see Filter details. Extracting the time for ps requires two regexes, one to filter the output down to the line for ps and the second to extract the time. 3. Add a new regular expression filter. 4. For the expression value, type .*ps (any characters ending with ps; be sure not to omit the leading period [.]) and check the Filter line by line box. 5. Click Test Selected. In the Test Output box, the only output is the line containing ps. 6. To extract the time from the line, add a new regular expression filter. 7. For the expression value, type \d*:\d*:\d* (three sets of digits separated by colons) 8. Click Test Selected. The test output now shows only the time from the ps line. Now you can assign this value to a variable. For information on storing values in variables, see Inputs: Providing data to operations or Flow variables: Making data available for reuse.
163
To mark a flow as hidden 1. Open the flow and then, to open the flows Properties sheet, click the Properties tab at the bottom of the authoring pane. 2. On the Advanced tab, select Hide in Central, and then save your work. To select which groups have the read permission 1. In the Library, right-click the flow, and then click Permissions. 2. In the Permissions dialog that appears, select the Read permission for the groups you want to be able to see the flow in Central and Studio, and then click OK.
164
Programming operations with Web extensions requires advanced .NET or Java programming skills.
To implement the IAction interface, see the HP OO SDK. To implement Java IActions, interfaces, and classes, see the Java Extension Service SDK. To implement .NET IActions, interfaces, and classes, see the C# SDK.
4. Compile the project. A sample ant project (with source code and reusable build file) is available at: JavaExtensionService/samples/MailAction. 5. Create a .jar file that contains all class files. Do not include third-party libraries in the JAR file that you create. For an example, see the sample ant project at: JavaExtensionService/samples/MailAction. 6. Copy the .jar file into the repository folder. 7. Copy all third-party .jar files into the lib subdirectory of your repository folder. 8. Restart the Central Web application.
Debugging IActions
The most efficient means of debugging IActions is line-by-line debugging in your preferred integrated development environment (IDE). This primarily involves connecting the IDE to the RAS remote debugger.
3. Restart the RSJRAS service, using the following sequence of command-line commands: net stop rsjras net start rsjras 4. With RAS running, set a break-point in the IAction code. 5. Connect the IDE to the RAS remote debugger. You are ready to start debugging the IAction.
166
Troubleshooting
A flow, operation, or system object that I know exists does not appear in my Library.
You may not have read permission for the item. If you do not have read permission for an object, it does not appear in the Repository pane.
An error reports that I have lost the lock on the public repository
This error might appear when you try to import a repository to the public repository. One possible cause is that Central was re-started while Studio was open. This can happen if, for instance, your computer has a power-saving scheme that causes it to hibernate after some period of inactivity.
167
To regain a lock on the public repository: In Studio, open a private repository and then open the public repository.
After deleting a step then undoing the deletion, changes are not saved
Steps to reproduce: 1. With a flow diagram open, delete a step. 2. Save your work. 3. Undo the deletion. 4. Make changes to the step that you deleted. 5. Save your work. Expected result: The changes that you make to the step after undoing its deletion are saved. Actual result: The changes that you make to the step after undoing its deletion are not saved. Subsequent saves work correctly. Workaround: After undoing the deletion, editing and saving, move the step again and save. Subsequent changes will be saved correctly.
Index
.vm template files, 36 Accelerator Packs importing, 118 Access permissions creating group masks for, 146 setting defaults for groups, 146 Administrator and forcible checkins, 23 Authoring canvas keyboard shortcuts, 18 Authoring objects controlling access to, 143 Authoring pane keyboard shortcuts, 18 Authoring pane, overview, 13 Authors, multiple. See Multiple authors Bookmarking, 42 Bookmarks pane, overview, 16 Breakpoints disabling, 107 enabling, 107 Categories, 139 Central and RAS-dependent operations, 127 Changes 168 abandoning, 23 Checkin, 10 abandoning changes, 23 Checkins forcible, 23 Checkout, 10 reverting, 23 Checkpoints, 78 cmd operations Shell Wizard, 157 Command-line operation. See Shell operation Concepts advanced, 7 Concurrent execution, 67 Concurrent processing multi-instance steps, 72 Configuration folder objects recovering deleted, 42 Configuration Item defined, 137 Configuration objects checking in, 19, 20 checking out, 19, 20 context defined, 6
global, defined, 6 local, defined, 6 Controlling access to authoring objects, 143 copyright notices, ii Custom IActions Creating, best practices, 166 Dashboard Reporting Quick View, 136 Data passing, 99 Data movement, 99 Debugger changing flow variable values, 106 keyboard shortcuts, 19 overview, 102 resetting flows within, 102 restarting flows within, 102 Deletions restoring, 42 DescribeFlows.vm template files structure, 38 Descriptions, 101 Domain terms adding, 138 categories, adding, 138 creating, 137 defined, 137 Evaluators creating, 135 deleting, 136 editing, 135 Filters, 86 creating, 86 re-using, 94 saving, 88, 94 Flow checking in, 19, 20 checking out, 19, 20 debugging, 101 description, 29 return step, adding, 54 searching, 27 searching, 27 step versus operation, 46 step versus subflow, 46 Flow design simplifying, 98 Flow operations advanced authoring, 5 Flow output fields, 99 169
Flow state defined, 78 Flow variables, 63 changing values within Debugger, 106 creating, 63 creating, 64 global, 7 global, creating, 64 local, 7 reserved, 65 scope, 7 Flow, creating overview, 24 Flow, parts, 1 Flows. See also Operations, See Flows adding steps, 45 advanced concepts, 7 and subflows, 99 bookmarking, 42 categories, 139 checkpoints, 78 copying, 41 creating, 24, 25 creating steps, 45 deploying changes, 163 finding, 26 gated transitions, 164 hiding from Central, 164 importing, 118 inputs, 8, 54 limiting use, 164 moving between repositories, 110 outputs, 82 providing with data, 54 recovering deleted, 42 renaming, 42 requirements, 2 responses, adding, 97 running automatically, 101 sealed, 27 sealed, defined, 7 self-documentation, 30, 33 steps. See Steps testing, 163 transitions. See Transitions Folders creating, 24 Generate documentation modifying custom templates, 39 Generate Documentation command, 30, 34 custom, 34 operation, 30, 33 Global context, 6 Global flow variables
creating, 64 Good first place to go, 1 Group masks creating, 146 Group permissions, 143 Groups setting default access permissions for, 146 How do I... folder, 1 HP OO objects permissions, setting, 144 Http operation properties, response definitions, 149 IAction class execute() method, 165 IActions creating for operations, 165 Icons pane keyboard shortcuts, 19 Icons pane, overview, 16 Inputs, 8, 54 and flow run scheduling, 62 assigning data sources to, 56 creating, 54, 55 deleting, 63 encrypting, 56 flow variables, 65 recording for Dashboard Reporting, Quick View, 136 removing, 63 user prompts, supplying lists to, 61 Inspector keyboard shortcuts, 19 opening, 48 Keyboard shortcuts, 18 Keyboard shortcuts Authoring canvas, 18 Authoring pane, 18 Debugger, 19 Icons pane, 19 Inspector, 19 Library pane, 18 Properties editors, 19 Scriptlet panel, 19 Lane steps creating, tips, 72 Lanes changing start step, 71 rearranging, 72 renaming, 71 legal notices, ii copyright, ii restricted rights, ii 170
trademark, ii warranty, ii Library object checking in, 21 checking out, 21 earlier version, 23 Library objects recovering, 42 Library pane keyboard shortcuts, 18 Library, overview, 10 Lists for user prompts, 61 Local context, 6 Login switching, 108 Messages displaying to users, 138 Multi-instance steps, 67, 72 and data movement, 75 creating, 74 debugging, 77 in flow design, 72 throttling, 77 Multiple authors and version control, 10 Nonblocking steps, 67, 77 creating, 77 OO objects controlling access to, 143 permissions, 143 Operation checking in, 19, 20 checking out, 19, 20 description, 29 output data, 6 raw results, 6 response, 7 scriptlet, 6 searching, 27 Operation outputs filtering, 86 Operation responses rules, 94 Operations advanced authoring, 5 advanced concepts, 7 and Web services, 131 architecture, 6 bookmarking, 42 compared with steps, 8 copying, 41
core functionality, 6 creating, 147 creating from a RAS, 133 creating from Remote Action Services, 132 creating from Web services, 123 creating IActions for, 165 creating with IActions, overview, 165 defined, 6 finding, 26 finding flows that use them, 41 information flow, 6 inputs, 8 optional inputs, 148 outputs, 82 outputs, adding, 84 outputs, deleting, 84 outputs, filtering, 86 properties, 148 Properties sheet, 147 Quick View, 3 recovering deleted, 42 renaming, 42 response definitions, 148 responses, 82, 83 scriptlets, creating, 79 sealed, 27 sealed, defined, 7 types, 148 viewing many, 30 viewing more information, 41 What does this use, 41 What uses this, 41 Ops flow. See Flow Output data, 6 Outputs adding, 84 changing the source, 84 deleting, 84 described, 8 Palettes Steps and Callouts, 13 View Options, 14 Parallel execution, 67 Parallel processing. See Concurrent processing Parallel split steps, 67, 68 and data movement, 69 and scriptlets, 69 creating, 70 debugging, 71 lane order, 69 lane steps, creating, 72 lanes, changing start step, 71 lanes, rearranging, 72 lanes, renaming, 71 Perl script operation 171
properties, response definitions, 151 Permissions setting, 143 setting for HP OO objects, 144 setting for system objects, 144 Properties editors keyboard shortcuts, 19 Quick View inputs, recording for Dashboard Reporting, 136 Operations, 3 RAS. See Remote Action Services RAS operation properties, response definitions, 152 RAS reference changing, 130 overriding, 130 RAS references adding, 128 configuring from existing RAS, 132 reconfiguring, 129 removing, 134 RAS-dependent operations troubleshooting, 132 RASes creating operations from, 132 RASes, external adding operations, 133 creating operations from, 133 RASs Adding an existing, 127 availability, checking, 127 Using, 126 Raw results defined, 6 References to operations finding, 41 Regex. See Regular expressions Regular expressions, 161 Remote Action Services. See RASs Repositories, 108 adding, 109 Backing up, 123 Backup, importing the, 117 decrypting, 122 encrypted copies, 122 encrypting, 121 exporting, 117 importing, 118 opening, 109 previewing the publish, 112 previewing the update, 114 private, 108
public, 108 public, undoing, 117 publishing, 112 restoring, 123 setting a target repository, 111 source, 110 target, 110 update, undoing, 117 updating, 114 validating, 121 Repositories, encrypted opening, 122 Repository, public publishing to, 111 updating from, 111 Response defined, 7 Responses defined, 83 Overriding within Debugger, 107 restricted rights legend, ii Results adding, 85 changing the source, 86 deleting, 85 described, 8 filtering, 88 Results, step defined, 83 Return steps adding, 53 changing responses, 53 defined, 53 Sample flows How do I... folder, 1 Scheduling and inputs, 62 Scriptlet defined, 6 Scriptlet operation properties, response definitions, 153 Scriptlet panel keyboard shortcuts, 19 Scriptlets, 79 and parallel split steps, 69 creating, 79, 80 debugging, 80 saving for reuse, 82 Sealed defined, 27 Secure shell operation properties, response definitions, 154 172
Selection lists, 140 Self-documentation flows, 30, 33 Shell operation properties, response definitions, 148 Shell operations Shell Wizard, 157 Shell wizard creating operations with, 157 Shortcuts keyboard, 18 Single-response steps creating, 78 Start Step changing, 47 Step icons changing, 97 Steps adding, 45 adding to flows, 46 advanced concepts, 7 changing icon, 97 changing operation, 100 compared with operations, 8 connecting, 49 copying, 47 copying between flows, 47 creating, 44, 45, 46 descriptions, 101 inputs, 8 modifying, 48 moving, 49 nonblocking, 77 nonblocking, creating, 77 results, 82, 83 results, adding, 85 results, deleting, 85 single-response, 78 transitions. See Transitions user prompts, 49 Steps, multi-instance. See Multi-instance steps Steps, parallel split. See Parallel split steps String formats. See Evaluators Studio. See Studio good first place to go, 1 keyboard shortcuts, 18 Library, 10 starting, 10 visual overview, 10 Subflows using, 98 System accounts, 141
creating, 141 deleting, 142 editing, 142 System evaluators, 134 System objects permissions, setting, 144 Target repository setting, 111 Telnet operation properties, response definitions, 156 Template files, 38 structure, 38 Toolbar overview, 13 palettes, 13 Steps and Callouts palette, 13 View Options palette, 14 trademark notices, ii Transitions, 49 adding, 51 creating, 49
moving, 52 User messages displaying, 138 User prompt inputs supplying lists to, 61 User prompts selection lists for, 140 Users switching, 108 Variables. See Flow variables Version control, 10, 19 Version, earlier opening, 23 Versions managing, 23 warranty, ii Web Service content using, 134 Web services creating operations from, 123
173