> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 新しいアクティビティを作成してワークフローに追加する

> Pega の Case ワークフローに Capture Data の Utility ステップを追加し、ページ、クラス、parameters、ローカル変数を含む CaptureData アクティビティを作成します。

次に、新しいアクティビティを作成してワークフローに追加します。

1. **Dev Studio** で、先ほど作成したケースタイプを開きます。

2. **Workflow** タブで、**Add life cycle** をクリックします。

3. *Collect Information* ステップを含む最初のステージを作成します。このステップを追加すると、ファイルを追加できるダイアログが開きます。

   <Frame>
     <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega5.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=8b436cd2d9111798240cdd92d9a6d8c6" alt="Collect Information ステップを含む 1 つの Collect Information ステージがある Case ライフサイクルを示す、Pega Dev Studio の Workflow タブのスクリーンショット。" width="581" height="362" data-path="images/flexi-capture/connectors/Pega5.png" />
   </Frame>

4. *Process* ステージを作成し、このステージに任意のステップ (例: *Change stage*) を追加して、**Save** をクリックします。

   <Frame>
     <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega6.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=43cb73291785c60573f05f08f93965d6" alt="Collect Information ステージと、Change stage ステップを含む Process ステージがある Case ライフサイクルを示す、Pega Dev Studio の Workflow タブのスクリーンショット。" width="635" height="217" data-path="images/flexi-capture/connectors/Pega6.png" />
   </Frame>

5. 次に、**Records → Process → Flow** をクリックして flow の一覧を開き、先ほど作成したケースタイプの *Process\_Flow* flow をダブルクリックします。

   <Frame>
     <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega7.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=5cd6edec274217796ad20f4d6e80061b" alt="ケースタイプの pyStartCase、Process_Flow、CollectInformation_Flow の flow を示す、Pega Dev Studio の Flow instances 一覧のスクリーンショット。" width="969" height="223" data-path="images/flexi-capture/connectors/Pega7.png" />
   </Frame>

6. *Change stage* ステップを *Utility* ステップに置き換えます。

   <Frame>
     <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega23.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=630270234941f44e9b7fd4fb20d66b3c" alt="Utility が選択された図形メニューと、Start ノードと End ノードの間に Utility 図形が配置された flow を示す、Pega Dev Studio の Process_Flow 図のスクリーンショット。" width="1050" height="436" data-path="images/flexi-capture/connectors/Pega23.png" />
   </Frame>

7. **Utility** アイテムをダブルクリックしてプロパティを開きます。アイテムの名前を *Capture Data* に変更します。**Rule** フィールドに *CaptureData* と入力してこの名前の新しいアクティビティを作成し、このフィールドの横にあるアイコンをクリックします。

   <Frame>
     <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega49.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=ec34a8bea0bcef37862e848b6c1cbe40" alt="名前が Capture Data に設定され、rule type として Activity が選択され、Rule フィールドに CaptureData が入力されている、Pega Dev Studio の Utility ステップのプロパティのスクリーンショット。" width="499" height="217" data-path="images/flexi-capture/connectors/Pega49.png" />
   </Frame>

8. 開いたウィンドウで、**Create and open** をクリックします。

9. **Pages & Classes** タブで、次の 3 つの object を作成します。

| **Page name**  | **Class**            |
| -------------- | -------------------- |
| Case           | Work-                |
| Attachment     | Data-WorkAttach-File |
| AttachmentInfo | Data-WorkAttach-File |

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega11.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=e98c02de75fcac36ea1ae3514a1dc9b5" alt="Case、Attachment、AttachmentInfo のページが Work- および Data-WorkAttach-File クラスにマッピングされている、Pega Dev Studio の CaptureData アクティビティの Pages & Classes タブのスクリーンショット。" width="959" height="227" data-path="images/flexi-capture/connectors/Pega11.png" />
</Frame>

10. **Parameters** タブで、次の 3 つの parameter を作成します。

| **Name**      | **Data type** |
| ------------- | ------------- |
| CaseId        | String        |
| jsonData      | String        |
| executionMode | String        |

<Frame>
  <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega31.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=c26312f4b0556614bc3f271afc80bdc8" alt="CaseId、jsonData、executionMode の String parameter を示す、Pega Dev Studio の CaptureData アクティビティの Parameters タブのスクリーンショット。" width="1309" height="342" data-path="images/flexi-capture/connectors/Pega31.png" />
</Frame>

11. 次の 3 つのローカル変数を作成します。

| **Name**    | **Data type** |
| ----------- | ------------- |
| LinkedRefTo | String        |
| Id          | String        |
| Index       | Integer       |

<Frame>
  <img src="https://mintcdn.com/abbyy/Xgx3EG8BZs5YQjIJ/images/flexi-capture/connectors/Pega32.png?fit=max&auto=format&n=Xgx3EG8BZs5YQjIJ&q=85&s=0a086f31fab450012abed0c47813b4e2" alt="String 型と Integer 型の LinkedRefTo、Id、Index 変数を示す、Pega Dev Studio の CaptureData アクティビティのローカル変数セクションのスクリーンショット。" width="610" height="278" data-path="images/flexi-capture/connectors/Pega32.png" />
</Frame>
