使用工作流程啟動工作 - AWS 規範指引

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

使用工作流程啟動工作

建立稱為工作流程的作業流程。在成功完成先前作業後,工作流程中的作業與相依性相互關聯。

使用控制-M 網站

若要從 Control-M 使用者介面啟動工作,請執行下列動作:

  1. 在規劃域中,新增一個新的工作區。這將開啟一個具有空資料夾物件的畫布。

  2. 在功能表列上,選擇 [新增 Job],選擇 [微焦視窗] 或 [Micro Focus Linux] 工作,然後將其拖曳到資料夾的正面上。

  3. 工作顏色變為綠色後,將其放下。右側窗格包含 [一般]、[排程]、[必要條件] 和 [動作] 區段。若要建立工作,請參閱 Con trol-M 文件中的標準指示。

  4. 如需為微焦點工作建立 Control-M 的指示,請參閱 Control-M 文件。對於此試驗,請針對五個工作重複步驟 2 至 4,將每個工作從aws-mf-job1aws-mf-job5命名。

  5. 若要將這些工作連接至您想要的流程,請選擇工作物件下方的條件三角形,然後將其拖曳至下一個工作。例如,選擇下方的條件三角形aws-mf-job1,然後將其拖曳到上面aws-mf-job2。此動作aws-mf-job1會成為的前置任務。aws-mf-job2默認情況下,現在aws-mf-job1必須成功完aws-mf-job2成才能運行。

下圖顯示了基本作業流程的 Control-M Planning 檢視。

工作流程圖表,右側窗格中包含屬性。

影像由 BMC Software, Inc. 提供 ©2022

使用 JSON

可以使用 JSON 編碼相同的流程。在 GitHub 回購中,示例代碼位於文件中Folder-Custom-M2-Replatform.json

{ "aws-custom-m2": { "Type": "Folder", "ControlmServer": "psctm", "OrderMethod": "Manual", "Application": "AWSM2", "SubApplication": "Replatform-Custom", "aws-mf-job1": { "Type": "Job:Micro Focus Windows", "ConnectionProfile": "MICROFOCUS-WINDOWS", "Enable JCL Variables": "unchecked", "Restart on Rerun": "unchecked", "Recapture ABEND Codes": "Ignore", "Recapture COND Codes": "Ignore", "Auto Adjust Restart": "Ignore", "Set MF_UCC11": "Ignore", "Restart with Modified JCL": "No", "Application": "AWSM2", "SubApplication": "Replatform-Custom", "Host": "microfocus-es-host", "Output": {} }, "aws-mf-job2": { "Type": "Job:Micro Focus Windows", "ConnectionProfile": "MICROFOCUS-WINDOWS", "Enable JCL Variables": "unchecked", "Restart on Rerun": "unchecked", "Recapture ABEND Codes": "Ignore", "Recapture COND Codes": "Ignore", "Auto Adjust Restart": "Ignore", "Set MF_UCC11": "Ignore", "Restart with Modified JCL": "No", "Application": "AWSM2", "SubApplication": "Replatform-Custom", "Host": "microfocus-es-host", "Output": {} }, "aws-mf-job3": { "Type": "Job:Micro Focus Windows", "ConnectionProfile": "MICROFOCUS-WINDOWS", "Enable JCL Variables": "unchecked", "Restart on Rerun": "unchecked", "Recapture ABEND Codes": "Ignore", "Recapture COND Codes": "Ignore", "Auto Adjust Restart": "Ignore", "Set MF_UCC11": "Ignore", "Restart with Modified JCL": "No", "Application": "AWSM2", "SubApplication": "Replatform-Custom", "Host": "microfocus-es-host", "Output": {} }, "aws-mf-job4": { "Type": "Job:Micro Focus Windows", "ConnectionProfile": "MICROFOCUS-WINDOWS", "Enable JCL Variables": "unchecked", "Restart on Rerun": "unchecked", "Recapture ABEND Codes": "Ignore", "Recapture COND Codes": "Ignore", "Auto Adjust Restart": "Ignore", "Set MF_UCC11": "Ignore", "Restart with Modified JCL": "No", "Application": "AWSM2", "SubApplication": "Replatform-Custom", "Host": "microfocus-es-host", "Output": {} }, "aws-mf-job5": { "Type": "Job:Micro Focus Windows", "ConnectionProfile": "MICROFOCUS-WINDOWS", "Enable JCL Variables": "unchecked", "Restart on Rerun": "unchecked", "Recapture ABEND Codes": "Ignore", "Recapture COND Codes": "Ignore", "Auto Adjust Restart": "Ignore", "Set MF_UCC11": "Ignore", "Restart with Modified JCL": "No", "Application": "AWSM2", "SubApplication": "Replatform-Custom", "Host": "microfocus-es-host", "Output": {} }, "leftbranch": { "Type": "Flow", "Sequence": [ "aws-mf-job1", "aws-mf-job2", "aws-mf-job3", "aws-mf-job5" ] }, "rightbranch": { "Type": "Flow", "Sequence": [ "aws-mf-job2", "aws-mf-job4", "aws-mf-job5" ] } } }

若要部署此流程,請使用控制-M 自動化 API:

ctm deploy Folder-Custom-M2-Replatform.json