-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(custom-connector): step by step guide on how to create a custom connector based on the rest connector #5202
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,97 @@ | ||||||||||||||
|
||||||||||||||
# Create a New Connector Based on the REST Connector | ||||||||||||||
|
||||||||||||||
## Step 1: Create a BPMN in the Web Modeler | ||||||||||||||
|
||||||||||||||
1. Open the Camunda Platform Web Modeler and log in to your account. | ||||||||||||||
2. Create a new project or open an existing one. | ||||||||||||||
3. Add a new BPMN diagram to your project: | ||||||||||||||
- Click `New Diagram`. | ||||||||||||||
- Name your diagram and click `Create`. | ||||||||||||||
Comment on lines
+9
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
|
||||||||||||||
## Step 2: Add the REST Connector to the BPMN | ||||||||||||||
|
||||||||||||||
1. In the BPMN editor, add a new task element to your diagram. | ||||||||||||||
2. Change the task type to `Connector`: | ||||||||||||||
- Click on the task element. | ||||||||||||||
- Select the wrench icon to change the element type and choose `REST Outbound Connector` from the Connectors section. | ||||||||||||||
Comment on lines
+16
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
3. Configure the REST Connector: | ||||||||||||||
- In the properties panel, fill out the required fields such as Authentication URL, HTTP method, and any headers or payload needed for the API request. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
|
||||||||||||||
## Step 3: Save the REST Connector as a New Connector Template | ||||||||||||||
|
||||||||||||||
1. With the REST Connector task selected, open the element template editor: | ||||||||||||||
- Click the `Save as Template` button. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
2. Enter the template details: | ||||||||||||||
- **Name**: Provide a name that clearly indicates the functionality of the template. | ||||||||||||||
- **Description**: Describe the main features and benefits of the template. | ||||||||||||||
- **Icon**: Optionally, upload a custom icon with supported formats: SVG, PNG, and JPEG. | ||||||||||||||
Comment on lines
+26
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
3. Click `Create Template` to save the new connector template. | ||||||||||||||
|
||||||||||||||
## Step 4: Customize the New Connector Using the Element Template Editor | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [vale] reported by reviewdog 🐶 |
||||||||||||||
|
||||||||||||||
1. Open the template editor for further customization: | ||||||||||||||
- Select the newly created template from the template list. | ||||||||||||||
- Click `Edit Template` to open the template editor. | ||||||||||||||
Comment on lines
+34
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
2. Customize the template: | ||||||||||||||
- Add or remove fields as required. | ||||||||||||||
- Adjust default values and input parameters. | ||||||||||||||
- Update the description and other metadata as necessary. | ||||||||||||||
Comment on lines
+37
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
3. Save your changes to finalize the customization. | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
## Example Overview | ||||||||||||||
|
||||||||||||||
In this guide, you'll learn how to create a custom connector that fetches data from the Star Wars API (SWAPI). By following the steps outlined below, you'll be able to incorporate this connector into your BPMN workflows seamlessly. | ||||||||||||||
|
||||||||||||||
### Step-by-Step Instructions | ||||||||||||||
|
||||||||||||||
1. **Create a `Rest Outbound Connector` Task** | ||||||||||||||
- Begin by creating a `Rest outbound connector` task in your workflow. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
- Define the URL using a FEEL (Friendly Enough Expression Language) expression, utilizing the `resource` and `index` variables. | ||||||||||||||
 | ||||||||||||||
|
||||||||||||||
2. **Click on `Save as`** | ||||||||||||||
- Save your current progress by selecting `Save as`. This will enable you to create a template from your configured connector. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
 | ||||||||||||||
|
||||||||||||||
3. **Fill Out Template Information** | ||||||||||||||
- Provide essential details such as the `Template Name` and `Template Description`. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
- These fields are crucial for identifying and understanding the purpose of the template. | ||||||||||||||
 | ||||||||||||||
|
||||||||||||||
4. **Open the New Connector Template in the Editor** | ||||||||||||||
- Access the newly created template in the editor to make further customizations and configurations. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
|
||||||||||||||
5. **Hide Unwanted Properties** | ||||||||||||||
- For properties that are not required in your connector, set their `type` to `Hidden`. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
- Example: Since authentication is not necessary, set it to `Hidden`. | ||||||||||||||
 | ||||||||||||||
Comment on lines
+68
to
+69
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
- Similarly, hide other fields such as `url`, `method`, `headers`, and `queryParameters`. If the `hidden` type does not apply, ensure that you remove the `feel` property. | ||||||||||||||
 | ||||||||||||||
|
||||||||||||||
6. **Create a Custom Group for the Star Wars API** | ||||||||||||||
- Introduce a customized group named `swapi` for organizing your Star Wars-related properties. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
 | ||||||||||||||
|
||||||||||||||
7. **Define the Properties in the SWAPI Group** | ||||||||||||||
- Map the properties within the new group to the variables defined earlier (`resource` and `index`). | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
- Set `resource` as a `Dropdown`. | ||||||||||||||
- Set `index` as a `String`. | ||||||||||||||
 | ||||||||||||||
Comment on lines
+79
to
+81
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
|
||||||||||||||
8. **Add an Icon** | ||||||||||||||
- Enhance your connector's visual appeal by adding an appropriate icon. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
 | ||||||||||||||
|
||||||||||||||
9. **Publish the Connector** | ||||||||||||||
- Once all configurations are complete, click on `Publish` to make your connector available for use. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
 | ||||||||||||||
|
||||||||||||||
10. **Access Your New SWAPI Connector** | ||||||||||||||
- The newly published SWAPI connector is now ready for use in your BPMN workflows. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
||||||||||||||
 | ||||||||||||||
|
||||||||||||||
## Conclusion | ||||||||||||||
|
||||||||||||||
By following these detailed steps, you have successfully created a reusable connector template based on the REST connector. This template streamlines interactions with the specified REST API and ensures consistency and standardization across different BPMN workflows. Enjoy integrating the power of the Star Wars API into your business processes! | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [prettier] reported by reviewdog 🐶
Suggested change
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[prettier] reported by reviewdog 🐶