アクティビティ
最新
生産性を高めるアクティビティ
Last updated 2024年6月21日

コネクション

このセクションは、コネクションを使用するサービスから API にアクセスするために必要なコネクションを設定するのに役立ちます。

このようなコネクションを設定するには、まず Integration Service でコネクションを作成します。Integration Service で作成したコネクションは、作業中のコード化されたオートメーションと同じ組織とテナント内でアクセスできます。connections オブジェクトを使用して、以前に Integration Service で作成したコネクションにアクセスし、対応する API にアクセスできます。

オートメーションが完成して Orchestrator にパブリッシュした後に、コード内で行った最初のコネクションの設定を上書きできます。

前提条件

Integration Service でコネクションを作成します。

  1. Integration Service にアクセスして [コネクション] に移動します。
  2. [コネクションを追加] を選択し、次のいずれかのアプリケーションのコネクションを作成します。
    • Microsoft OneDrive と SharePoint
    • Microsoft Outlook 365

手順

  1. Open an existing coded automation from the same organization, and tenant where you initially created your connection.
  2. Execute() の本体内に「connections」と入力し、Ctrl + Space キーを押して利用可能なコネクションを表示します。
    以前に connection を作成したアプリケーションに応じて、以下のコネクションの種類から選択できます。
    • Office365
  3. Further configure your connection by adding the Orchestrator folder name and the desired connection address, separated by underlines.
    たとえば、Orchestrator の My Workspace フォルダーとアドレス john.doe@company.com に対する OneDrive のコネクションは、「connections.OneDrive.My_Workspace_john_doe_company_com」とコードに記述します。
    推奨
    We recommend you to create your connections in one step to avoid potential errors. We also recommend you to create a variable for the connection. This way, if changes occur in Integration Service, you'll avoid updating every instance of the connection throughout your automation. Use the following approach:
    var myOneDriveConnection = connections.OneDrive.My_Workspace_john_doe_company_com;var myOneDriveConnection = connections.OneDrive.My_Workspace_john_doe_company_com;
    Avoid creating your connections in two separate steps like:
    var myOneDriveConnection = connections.OneDrive;
    conn.My_Workspace_john_doe_company_com;var myOneDriveConnection = connections.OneDrive;
    conn.My_Workspace_john_doe_company_com;
  4. Once you've established the connection, you can access the relevant APIs specific to a service through that connection.
    たとえば、OneDrive のコネクションを var myOneDriveConnection = connections.OneDrive.My_Workspace_john_doe_company.com のように設定した場合、myOneDriveConnection を使用して、サービスの API を使用できます。

Orchestrator でコネクションをオーバーライドする

  1. プロジェクトを Orchestrator にパブリッシュします。
  2. Go to the Orchestrator feed where you've published the project.
  3. Go to the published process and select Edit.
  4. [プロセスの設定] で、エントリ ポイントとして、設定したコネクションが含まれるコード化されたオートメーションを選択します。
  5. In Package Requirements, find and select the corresponding connection type for your coded automation.

    Be careful to select the connection type for your coded automation, as connections for XAML files within your project also appear in the list.

  6. Identify and select the account address you plan to associate with the connection when it runs.

Was this page helpful?

サポートを受ける
RPA について学ぶ - オートメーション コース
UiPath コミュニティ フォーラム
UiPath ロゴ (白)
信頼とセキュリティ
© 2005-2024 UiPath. All rights reserved.