> ## 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.

# Creating a Pega activity

> Create a Pega activity in Dev Studio: add steps, parameters, and pages, and then set up loops, substeps, and When and Jump conditions for the connector.

[An activity](https://community.pega.com/knowledgebase/articles/introduction-activities) consists of a set of consecutive steps, each of which carries out a specific method or instruction.

To create a new activity, do the following:

1. In **Dev Studio**, click **Records → Technical → Activity** **→** **Create**.

2. Fill in the **Label** and **Identifier** fields and make sure that the activity is being created in the context of the case (for more details, see [Creating a case with a workflow](/flexi-capture/connectors/pega/pega-add-case-type)). Next, click **Create and open**.

   <Frame>
     <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega103.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=8cd995d8d4b9ffd076763b77e8123822" alt="Screenshot of the Create Activity window in Pega Dev Studio with the Label and Identifier set to SendForProcessing and the Apply to context set to the case." width="1224" height="560" data-path="images/flexi-capture/connectors/Pega103.png" />
   </Frame>

3. On the **Steps** tab that, add the required activity steps.

4. On the **Parameters** tab, specify the required variables. On the **Pages & Classes** tab, specify a page to be used for the activity steps.

## Setting up activity steps

To configure your activity, you need to create loops and substeps.

To create a loop, click **Loop** for a step and select a repetition type (in our example, **For each element in value list**) and a list of values. Click **Submit**.

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega104.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=4f5a706f2caf4eed0c21d69e122a39bb" alt="Screenshot of an activity step in Pega Dev Studio with the loop configuration popup set to repeat For each element in value list over the Case.pyAttachments value list property." width="1174" height="256" data-path="images/flexi-capture/connectors/Pega104.png" />
</Frame>

To create a substep, create a new step and drag it into the step for which the substep is being created.

<Note>
  When setting up the activity, you will also need to set up the following:
</Note>

* The **When** condition – This condition is checked before a step is carried out. Depending on the result, the step is either carried out or skipped.
* The **Jump** condition – This condition is checked after a step. Depending on the result, the activity can either advance to the next step or finish.
* **Label** specifies a step to which you can go from another step.
