組建和測試 runbookBuild and test runbooks

重要

此版本的 Orchestrator 已達終止支援,建議您 升級至 Orchestrator 2019This version of Orchestrator has reached the end of support, we recommend you to upgrade to Orchestrator 2019.

Runbook Designer是用來建立、管理和執行 runbook 的工具。The Runbook Designer is the tool that you use to create, manage, and run runbooks. 您也可以在 Orchestration 主控台中執行 runbook 並查看其狀態。You can also run runbooks and view their status in the Orchestration Console.

若要建立 runbook,請將活動拖曳至工作區。To build a runbook you drag activities onto the workspace. 活動是 runbook 的組建區塊。Activities are the building blocks of runbooks. 一般情況下,個別活動都會執行三個動作:In general, individual activities perform three actions:

  • 存取已發佈資料Access published data

  • 執行某個動作Perform some action

  • 發佈新資料Publish new data

如需活動類型的詳細資訊,請參閱 控制 runbook 活動For more information about types of activities, see Control runbook activities.

Runbook Designer 窗格Runbook Designer Panes

Runbook Designer 介面會組織成下列四個窗格。The Runbook Designer interface is organized into the following four panes.

窗格Pane 描述Description
連線Connections 資料夾結構,您可以在其中組織 Orchestrator 系統中的工作流程,以及編輯資料夾的許可權。The folder structure where you can organize workflows in the Orchestrator system and edit permissions on folders. 也提供 Runbook 伺服器全域設定的存取權。Also provides access to Runbook Servers and Global Settings.
Runbook Designer 工作區Runbook Designer workspace 您建立 Orchestrator runbook 的工作區。The workspace where you build Orchestrator runbooks. [連線] 窗格中 ,選取資料夾中的 runbook 會以索引標籤的方式列在工作區頂端。The runbooks in the folder selection in the Connections pane are listed as tabs across the top of the workspace. 當您在 runbook 中選取索引標籤時,它會顯示在 [Runbook Designer] 工作區中。When you select a tab in a runbook, it is displayed in the Runbook Designer workspace.
活動Activities 包含所有可用的 ( 標準活動或可從整合套件 ) 取得的活動,以便在 runbook 中使用。Contains all the activities available (either standard activities or activities available from integration packs) for use in runbooks. 您可以將活動從 [ 活動 ] 窗格拖曳至 [設計] 工作區,然後將它們連結在一起以形成 runbook。You drag activities from the Activities pane into the Design workspace, and then link them together to form runbooks.
LogLog 記錄,顯示目前 runbook 的活動和歷程記錄。Logs showing the activity and history for the current runbook. 如需詳細資訊,請參閱 Orchestrator 記錄檔。For more information, see Orchestrator Logs.

依活動名稱和類別名稱排序活動Sorting activities by activity name and category ame

協調器可讓您依活動名稱或依類別目錄名稱,以字母順序排序活動。Orchestrator lets you sort activities alphabetically by activity name, or by category name. 依預設,活動會依類別排序,例如 Runbook Control、電子郵件、檔案管理、監視、通知、排程、系統、文字檔管理和工具。By default, activities are sorted by category, such as Runbook Control, Email, File Management, Monitoring, Notification, Scheduling, System, Text File Management, and Tools.

使用下列步驟,依活動名稱和類別目錄名稱排序活動。Use the following steps to sort activities by their activity name and category name.

依活動名稱依字母順序排序活動To sort activities alphabetically by activity name

  • 在 [ 活動 ] 窗格中,以滑鼠右鍵按一下類別名稱以選取 [ 所有活動]。In the Activities pane, right-click a category name to select All Activities.

    活動依活動名稱的字母順序排序。The activities are sorted alphabetically by activity name.

依分類名稱依字母順序排序活動To sort activities alphabetically by category name

  • 在 [ 活動 ] 窗格中,以滑鼠右鍵按一下類別名稱以選取 [ 預設]。In the Activities pane, right-click a category name to select Default.

    活動依類別目錄名稱的字母順序排序。The activities are sorted alphabetically by category name.

變更圖示Changing icons

您可以在活動名稱上按一下滑鼠右鍵,然後選取 [ ] 或 [ ],將每個活動圖示的預設大小從小型變更為大型。You can change the default size of each activity icon from small to large by right-clicking an activity name and selecting Small or Large .

在設計工具中啟動 runbookTo start a runbook in the Designer

  1. 在 [連線] 窗格中,按一下 [ runbook ] 資料夾以查看可用的 runbook。In the Connections pane, click the Runbooks folder to see the available runbooks.

  2. 在 [設計] 工作區中,按一下 [runbook] 索引標籤。In the Design workspace, click a runbook tab.

  3. 如果 runbook 已簽出,請選取 [ 簽入 ] 按鈕。If the runbook is Checked Out, select the Check In button.

  4. 在設計工作區中,以滑鼠右鍵按一下 [runbook] 索引標籤,然後選取 [ 執行]。In the Design workspace, right-click the runbook tab and select Run.

  5. 在 [啟動 runbook ] 對話方塊中,移至 [可用 ( 的 ) runbook 伺服器] 方塊,然後選取適用的伺服器。In the Start Runbook dialog box, go to Available Runbook Server(s) box and select the applicable server.

  6. 按一下箭號按鈕,讓伺服器名稱現在位於 [選取的**Runbook 伺服器 ( ) ** ] 方塊中。Click the Arrow button so that the server name is now in the Selected Runbook Servers(s) box.

  7. 按一下 [啟動]。Click Start.

若要從 Runbook Designer 停止工作To stop a job from the Runbook Designer

  1. 按一下 [ 監視 Runbook ] 索引標籤。Click the Monitor Runbook tab.

  2. 在工具列上,按一下 [ 停止]。On the toolbar, click Stop.

測試您的 runbookTesting your runbook

建立 runbook 之後,您可以在生產環境中執行 runbook 之前進行測試。After you build a runbook, you can test it before it is run in production. 若要進行測試,請使用您在Runbook Designer中開始的Runbook TesterTo test, you use the Runbook Tester which you start in the Runbook Designer. Runbook Tester可讓您執行 Runbook,以查看每個活動的已發佈資料。The Runbook Tester lets you run the runbook to view the Published Data from each activity. 您可以執行整個 runbook、一次逐步執行每個活動,或是在特定活動上設定中斷點。You can run through the entire runbook, step through each activity one at a time, or set breakpoints at certain activities.

重要

Runbook Tester 會實際執行工作流程中的每個活動。Runbook Tester actually performs each activity within the workflow. 這些步驟並不是在模擬或虛擬化的環境中執行。The steps are not performed in a simulated or virtualized environment. Runbook 中參照的所有連線都是有效且功能完整的連線,因此修改或破壞連線系統中資料的任何活動,都會導致該資料遭到修改或破壞。All the connections referenced in the runbook are live and fully functional, so any activities that modify or destroy data in connected systems cause that data to be modified or destroyed. 例如,如果您使用 [查詢資料庫] **** 活動執行 DROP TABLE ImportantTable,實際上會從 Microsoft SQL Server 執行個體中刪除 ImportantTableFor example, if you use the Query Database activity to DROP TABLE ImportantTable, it actually deletes the ImportantTable from the instance of Microsoft SQL Server.

重要

請注意,用來啟動 Runbook 的帳戶必須具有本機電腦的權限才能順利執行。Note that the account used to start the runbook must have permission on the local computer to run successfully. 這些權限需求也適用於使用 Runbook Tester 測試 Runbook 的狀況。These permission requirements also apply when testing the runbook with the Runbook Tester. 若要順利測試您的 Runbook,請 as Administrator啟動 Runbook Designer。To successfully test your runbook, start the Runbook Designer as Administrator. 根據關聯,Runbook Tester 會 以系統管理員 身分執行,並使用較高 - 等級的安全性權杖。By association, the Runbook Tester runs as Administrator and uses the higher-level security token.

測試 runbookTo test a runbook

  1. Runbook Designer中開啟 Runbook,然後按一下功能表列上的 [ Runbook Tester]。In the Runbook Designer, open the runbook, and on the menu bar, click Runbook Tester.

  2. 如果出現提示,請按一下 [ 是] 以查看 runbook。If prompted, click Yes to check out the runbook.

  3. 若要在不停止的情況下從開始到結束執行 runbook,請按一下 [ 執行到中斷點]。To run through the runbook from beginning to end without stopping, click Run to Breakpoint.

    如果您想要一次逐步執行一個活動,請按一下 [ 步驟]。If you want to step through it one activity at a time, click Step.

  4. 查看 [ 記錄 ] 窗格,以查看每個活動的完成狀態。View the Log pane to see the completion status of each activity. 若要查看活動的詳細資料和已發佈資料,請選取活動,然後按一下 [ 顯示詳細資料]。To view the details and Published Data from an activity, select the activity, and click Show Details.

設定中斷點To set a breakpoint

  1. 選取要在其上設定中斷點的活動。Select the activity on which to set the breakpoint.

  2. 按一下 [ 切換中斷點]。Click Toggle Breakpoint.

  3. 按一下 [ 執行到中斷點]。Click Run to Breakpoint.

    執行中斷點的每個活動都會執行。Each activity up to the breakpoint runs. Runbook 會在使用中斷點執行活動之前暫停。The runbook pauses before running the activity with the breakpoint.

  4. 若要繼續前往 runbook 的結尾,請按一下 [ 執行到中斷點 ],或一次逐步執行一個活動,然後按一下 [ 步驟]。To continue through to the end of the runbook, click Run to Breakpoint again, or to step through it one activity at a time, click Step.

後續步驟Next steps