コンテキストオブジェクト

コンテキストオブジェクト

お知らせ:当社は、お客様により充実したサポート情報を迅速に提供するため、本ページのコンテンツは機械翻訳を用いて日本語に翻訳しています。正確かつ最新のサポート情報をご覧いただくには、本内容の英語版を参照してください。

コンテキストオブジェクトは、Circuitの実行中に実行時情報にアクセスするために使用します。Circuit、状態、実行、タスクなどに関連するデータが含まれます。その構造とアクセス方法を理解することで、ワークフロー内で実行時データを動的に使用できます。これにより、ワークフロー自動化の効率性と適応性が向上します。

コンテキストオブジェクトには、Circuit内のすべてのJSON Path項目からアクセスでき、入力からではなくサーバーから、進行中の実行に関する包括的な情報を直接取得できます。

提供されている例と構文ガイドラインを参考にすると、Circuitのコンテキストオブジェクトをワークフローにスムーズに組み込み、よりコンテキストに沿ったデータ主導の実行が可能になります。

コンテキストオブジェクトの構造は次のとおりです。
{
'system': {
      'uuid': 'string', // unique identifier for the system
      'current_date': 'string', // current date in ISO 8601 format
      'current_time': 'string', // current time in ISO 8601 format
      'current_date_time': 'string', // current date and time in ISO 8601 format
      'timestamp': 'string', // current timestamp in ISO 8601 format
},
'portal': {
      'id': 'string', // unique identifier of the org
      'name': 'string' // name of the org
},
'requestor': {
      'id': 'string', // unique identifier for the requestor
      'name': 'string', // name of the requestor
      'メール': 'string', // メール of the requestor
      'first_name': 'string', // first name of the requestor
      'last_name': 'string', // last name of the requestor
      'timezone': 'string', // timezone of the requestor
      'contact_email': 'string', // contact メール of the requestor
      'contact_mobile': 'string' // contact mobile number of the requestor
},
'circuit': {
      'id': 'string', // unique identifier for the circuit
      'name': 'string' // name of the circuit
},
'execution': {
      'id': 'string', // unique identifier for the execution
      'name': 'string', // name of the execution
      '説明': 'string', // 説明 of the execution
      'parent_execution': {
            'name': 'string', // name of the execution
            '説明': 'string', // 説明 of the execution
            'type': 'string', // type of execution (e.g. api, sdk,test-run)
            'origin': 'string', // name of the service origin being executed
            'start_time': 'ISO 8601' // timestamp for when the execution started
   },
  'type': 'string', // type of execution (e.g. api, sdk, test-run)  
   'origin': 'string', // name of the service origin being executed
   'start_time': 'ISO 8601', // timestamp for when the execution started
   'meta': {} // metadata associated with the execution
},
'current_state': {
'name': 'string', // name of the current state in the execution
'type': 'string', // type of the current state (e.g. function, circuit, Webhook, etc.)
'start_time': 'ISO 8601' // timestamp for when the current state startd
},
'integration': {
'id': 'string', // unique identifier for the integration
'name': 'string', // name of the integration
'service': 'string', // name of the service for the integration
'service_id': 'string', // unique identifier for the service of the integration
'表示設定': 'string' // 表示設定 of the integration (e.g.public, private)
}
'workspace': {
'id': 'string', // unique identifier for the workspace
'name': 'string', // name of the workspace
'表示設定': 'string' // 表示設定 of the workspace (e.g.public, private)
},
}
こちらは、構造とデータを示すCircuitのコンテキストオブジェクトの例です。実行中の内容には、具体的な情報が次の形式で含まれます。
'portal': {
      'id': 'OnboardXV',
      'name': 'OnboardPro'
},
'system': {
      'uuid': 'b3a92df8-77c6-4f0e-9c27-5abf3ebd3f1e',
      'current_date': '2025-01-14',
      'current_time': '14:52:31+05:30',
      'current_date_time': '2025-01-14T14:52:31+05:30',
      'timestamp': '2025-01-14T14:52:31.482Z'
 },
'requestor': {
      'id': 'requestor456',
      'name': 'John Doe',
      'メール': 'johndoe@example.com',
      'first_name': 'John',
      'last_name': 'Doe',
      'contact_email' : 'requestor+メール@gmail.com',
      'contact_mobile': '+1234567890',
      'timezone': 'America/New York'
},
'workspace': {
      'id': 'workspace789',
      'name': 'My Workspace',
      '表示設定': 'private'
},
'circuit': {
      'id': 'circuit123',
      'name': 'My Circuit'
},
'execution': {
      'id': 'execution456',
      'name': 'My Execution',
      '説明': 'Sample execution',
      'parent_execution': {
            'start_time': '2023-09-19T16:13:49.357Z',
            'origin': 'Qntrl',
            'name': '7',
            'id': '9bdf89f2-f7a0-4329-b63d-e2ab53f20f8d',
            'type': 'test_run'
      },
      'type': 'api',
      'origin': 'My Service',
      'start_time': '2023-05-15T09:00:00Z',
      'meta': {}
},
'current_state': {
      'name': 'State1',
      'type': 'function',
      'start_time': '2023-05-15T09:05:00Z'
},
'integration': {
      'id': 'integration789',
      'name': 'My Integration',
      'service': 'My Service',
      'service_id': 'service123',
      '表示設定': 'public'
}

「My Function State」というステートで、実行ID、名前、開始時刻にアクセスするとします。これは、次の設定で実現できます。
{
'My Function State': {
'start': true,
'type': 'function',
'function_id': 'hello_world',
'parameters': {
'circuit_id': '$$.circuit.id',
'execution_id': '$$.execution.id',
'execution_name': '$$.execution.name',
'execution_start_time': '$$.execution.start_time'
},
'result_path': '$.result',
'next': 'End'
}
}







    • Related Articles

    • JSON Path

      お知らせ:当社は、お客様により充実したサポート情報を迅速に提供するため、本ページのコンテンツは機械翻訳を用いて日本語に翻訳しています。正確かつ最新のサポート情報をご覧いただくには、本内容の英語版を参照してください。 パスは、JSONオブジェクト内の特定の部分やコンポーネントを特定するために使用されます。これらのパスは「$」記号で始まり、JSONPath構文に従います。Input Path、Output Path、Result ...
    • 出力パス

      お知らせ:当社は、お客様により充実したサポート情報を迅速に提供するため、本ページのコンテンツは機械翻訳を用いて日本語に翻訳しています。正確かつ最新のサポート情報をご覧いただくには、本内容の英語版を参照してください。 出力パスでは、ステートの出力の一部を選択して、処理のために次のステートに渡すことができ、 JSON出力から不要なオブジェクトを除外できます。出力パスを指定しない場合、JSONノード全体(ステート入力、ステート結果、結果パスによって決定)がステート出力として次のステートに送信されます。 ...
    • 結果セレクターと結果パス

      お知らせ:当社は、お客様により充実したサポート情報を迅速に提供するため、本ページのコンテンツは機械翻訳を用いて日本語に翻訳しています。正確かつ最新のサポート情報をご覧いただくには、本内容の英語版を参照してください。 Result PathとResult Selectorは、実行が成功したときにステートの結果から動的データを抽出するために使用します。 Result Selector Result ...
    • 回路の作成と設定

      お知らせ:当社は、お客様により充実したサポート情報を迅速に提供するため、本ページのコンテンツは機械翻訳を用いて日本語に翻訳しています。正確かつ最新のサポート情報をご覧いただくには、本内容の英語版を参照してください。 サーキットは、Qntrlのさまざまなタブにわたるタスクの自動化に役立つ視覚的なワークフローです。サーキットは、作成済みテンプレートを使用するか、[ビルダー表示]または[コード表示]で一から作成できます。 サーキットの共通機能 組織ごとに作成できるサーキットは最大500件です。 ...