# Build Extension in Workspace

After creating and downloading the **Extension Workspace**, the next step is to **implement the custom logic** inside the workspace and package it as a JAR file that can be installed and used in ONEWEB.

The workspace serves as a **standard Java project template** that developers can extend using familiar Java and Maven tools.

***

### Preparing the Workspace

1. Copy the downloaded **workspace ZIP file** to a suitable directory on your machine
2. Extract (unzip) the workspace
3. Open the extracted project using any **Eclipse‑based IDE** with **Maven** installed
   * Examples: Eclipse IDE, Spring Tool Suite (STS)

Once opened, the workspace behaves like a regular Maven‑based Java project.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FH0gAWtvfar3DIxxvaiS9%2F0?alt=media" alt=""><figcaption></figcaption></figure>

***

### Required Classes to Implement

To build a Custom Extension, the developer must implement **three mandatory classes** provided in the workspace.

> **Important Rule**\
> The **class names and package names of these three classes must not be changed**.

***

#### 1️. NodeExtentionExecute

* This is the **core execution class** of the custom node
* Developers must **override the `execute` method**
* All custom logic of the extension is implemented here

Responsibilities typically include:

* Reading input parameters
* Executing custom business logic
* Invoking external libraries or services
* Setting output values

***

#### 2️. InputModel

* Defines the **input Business Object** for the custom node
* Represents all data passed into the extension from the process
* Fields in this model must align with the JSON configuration defined during workspace creation

***

#### 3️. OutputModel

* Defines the **output Business Object** for the custom node
* Contains values that are returned to the process after execution
* Output fields can be mapped to downstream process activities

***

#### 4️. Supporting Classes (Optional)

* Developers may create **additional supporting classes** as needed
* These can include:
  * Utility classes
  * Service classes
  * Helper methods
* These classes behave like any normal Java project classes

✅ You are free to design and organize supporting classes as required\
❌ Do **not** rename or move the three mandatory classes listed above

***

### Building the Extension (Generating JAR)

Once development is complete:

1. Use **Maven build** to package the project
2. Run a standard Maven build command from the IDE or command line
3. Ensure the build completes successfully

When the build succeeds:

* A **JAR file** is generated automatically
* The JAR file is located in the project’s **`target`** directory

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FCzabi9TkHyIQUImk6qur%2F1?alt=media" alt=""><figcaption></figcaption></figure>

This JAR file is the final **Custom Extension artifact**.

***

### Next Steps

After the JAR file is generated, it can be:

* Installed into an application
* Used as a **Custom Activity Node** in Process Designer
* Reused across multiple workflows
* Shared with other ONEWEB users

***

### Development Guidelines

* Keep the `execute` method focused and efficient
* Validate input parameters defensively
* Clearly define input and output models
* Handle exceptions gracefully
* Test the extension independently before installation
* Version your extension JAR carefully

***

### Summary

Building an extension in the workspace is the core development step for Custom Extensions.

Key points:

* Workspace is a Maven‑based Java project
* Three mandatory classes must be implemented
* Custom logic is written in `NodeExtentionExecute`
* Input and Output are defined via Business Models
* Supporting classes are allowed
* Maven build produces the final extension JAR

This approach allows developers to build **powerful, reusable, and enterprise‑grade custom activity nodes** that integrate seamlessly with ONEWEB Process Designer.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onewebstack.com/designer-reference/process-designer/process-designer-component/custom-extensions/build-extension-in-workspace.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
