${!!displayContext.bodyDisplay ? displayContext.bodyDisplay : ''}
diff --git a/src/designer/elsa-workflows-studio/src/components/editors/properties/elsa-single-line-property/elsa-single-line-property.tsx b/src/designer/elsa-workflows-studio/src/components/editors/properties/elsa-single-line-property/elsa-single-line-property.tsx
index b7421f99e..f56935f35 100644
--- a/src/designer/elsa-workflows-studio/src/components/editors/properties/elsa-single-line-property/elsa-single-line-property.tsx
+++ b/src/designer/elsa-workflows-studio/src/components/editors/properties/elsa-single-line-property/elsa-single-line-property.tsx
@@ -26,7 +26,7 @@ export class ElsaSingleLineProperty {
this.currentValue = e.detail;
}
- render() {
+ render() {
const propertyDescriptor = this.propertyDescriptor;
const propertyModel = this.propertyModel;
const propertyName = propertyDescriptor.name;
@@ -40,16 +40,22 @@ export class ElsaSingleLineProperty {
value = defaultValue ? defaultValue.toString() : undefined;
}
+ if (readonly)
+ {
+ const defaultSyntax = this.propertyDescriptor.defaultSyntax || SyntaxNames.Literal;
+ this.propertyModel.expressions[defaultSyntax] = value;
+ }
+
return (
this.onDefaultSyntaxValueChanged(e)}
editor-height="2.75em"
single-line={true}>
- {readonly ?
-
- :
+ {!readonly ?
this.onChange(e)} class="focus:elsa-ring-blue-500 focus:elsa-border-blue-500 elsa-block elsa-w-full elsa-min-w-0 elsa-rounded-md sm:elsa-text-sm elsa-border-gray-300"/>
+ :
+
}
);
diff --git a/src/designer/elsa-workflows-studio/src/components/screens/webhook-definition-editor/elsa-webhook-definition-editor-notifications/readme.md b/src/designer/elsa-workflows-studio/src/components/screens/webhook-definition-editor/elsa-webhook-definition-editor-notifications/readme.md
index e336158e4..b7acd4a5e 100644
--- a/src/designer/elsa-workflows-studio/src/components/screens/webhook-definition-editor/elsa-webhook-definition-editor-notifications/readme.md
+++ b/src/designer/elsa-workflows-studio/src/components/screens/webhook-definition-editor/elsa-webhook-definition-editor-notifications/readme.md
@@ -7,6 +7,10 @@
## Dependencies
+### Used by
+
+ - [elsa-webhook-definition-editor-screen](../elsa-webhook-definition-editor-screen)
+
### Depends on
- [elsa-toast-notification](../../../shared/elsa-toast-notification)
@@ -15,6 +19,7 @@
```mermaid
graph TD;
elsa-webhook-definition-editor-notifications --> elsa-toast-notification
+ elsa-webhook-definition-editor-screen --> elsa-webhook-definition-editor-notifications
style elsa-webhook-definition-editor-notifications fill:#f9f,stroke:#333,stroke-width:4px
```
diff --git a/src/designer/elsa-workflows-studio/src/components/screens/webhook-definition-editor/elsa-webhook-definition-editor-screen/readme.md b/src/designer/elsa-workflows-studio/src/components/screens/webhook-definition-editor/elsa-webhook-definition-editor-screen/readme.md
index 4485bfb7c..6ee89f279 100644
--- a/src/designer/elsa-workflows-studio/src/components/screens/webhook-definition-editor/elsa-webhook-definition-editor-screen/readme.md
+++ b/src/designer/elsa-workflows-studio/src/components/screens/webhook-definition-editor/elsa-webhook-definition-editor-screen/readme.md
@@ -7,11 +7,56 @@
## Properties
-| Property | Attribute | Description | Type | Default |
-| ------------------- | --------- | ----------- | ------------------- | ----------- |
-| `webhookDefinition` | -- | | `WebhookDefinition` | `undefined` |
+| Property | Attribute | Description | Type | Default |
+| ------------------- | ----------------------- | ----------- | ------------------- | ----------- |
+| `history` | -- | | `RouterHistory` | `undefined` |
+| `serverUrl` | `server-url` | | `string` | `undefined` |
+| `webhookDefinition` | -- | | `WebhookDefinition` | `undefined` |
+| `webhookId` | `webhook-definition-id` | | `string` | `undefined` |
+## Methods
+
+### `getServerUrl() => Promise
`
+
+
+
+#### Returns
+
+Type: `Promise`
+
+
+
+### `getWebhookId() => Promise`
+
+
+
+#### Returns
+
+Type: `Promise`
+
+
+
+
+## Dependencies
+
+### Used by
+
+ - [elsa-studio-webhook-definitions-edit](../../../dashboard/pages/elsa-studio-webhook-definitions-edit)
+
+### Depends on
+
+- [elsa-webhook-definition-editor-notifications](../elsa-webhook-definition-editor-notifications)
+
+### Graph
+```mermaid
+graph TD;
+ elsa-webhook-definition-editor-screen --> elsa-webhook-definition-editor-notifications
+ elsa-webhook-definition-editor-notifications --> elsa-toast-notification
+ elsa-studio-webhook-definitions-edit --> elsa-webhook-definition-editor-screen
+ style elsa-webhook-definition-editor-screen fill:#f9f,stroke:#333,stroke-width:4px
+```
+
----------------------------------------------
*Built with [StencilJS](https://stenciljs.com/)*
diff --git a/src/designer/elsa-workflows-studio/src/components/screens/workflow-definition-editor/elsa-activity-editor-modal/elsa-activity-editor-modal.tsx b/src/designer/elsa-workflows-studio/src/components/screens/workflow-definition-editor/elsa-activity-editor-modal/elsa-activity-editor-modal.tsx
index 2d4fdd6db..975ae5678 100644
--- a/src/designer/elsa-workflows-studio/src/components/screens/workflow-definition-editor/elsa-activity-editor-modal/elsa-activity-editor-modal.tsx
+++ b/src/designer/elsa-workflows-studio/src/components/screens/workflow-definition-editor/elsa-activity-editor-modal/elsa-activity-editor-modal.tsx
@@ -100,8 +100,9 @@ export class ElsaActivityEditorModal {
const activityModel: ActivityModel = renderProps.activityModel;
const inactiveClass = 'elsa-border-transparent elsa-text-gray-500 hover:elsa-text-gray-700 hover:elsa-border-gray-300';
const selectedClass = 'elsa-border-blue-500 elsa-text-blue-600';
-
+debugger
return (
+
this.dialog = el} >
diff --git a/src/designer/elsa-workflows-studio/src/plugins/http-endpoint-plugin.tsx b/src/designer/elsa-workflows-studio/src/plugins/http-endpoint-plugin.tsx
index 4ba7bd28f..cbb27c24c 100644
--- a/src/designer/elsa-workflows-studio/src/plugins/http-endpoint-plugin.tsx
+++ b/src/designer/elsa-workflows-studio/src/plugins/http-endpoint-plugin.tsx
@@ -10,10 +10,10 @@ export class HttpEndpointPlugin implements ElsaPlugin {
onActivityDisplaying(context: ActivityDesignDisplayContext) {
const activityModel = context.activityModel;
-
+
if (activityModel.type !== 'HttpEndpoint')
return;
-
+
const props = activityModel.properties || [];
const path = props.find(x => x.name == 'Path') || { name: 'Path', expressions: { 'Literal': '', syntax: SyntaxNames.Literal } };
const syntax = path.syntax || SyntaxNames.Literal;
diff --git a/src/designer/elsa-workflows-studio/src/plugins/webhook-plugin.tsx b/src/designer/elsa-workflows-studio/src/plugins/webhook-plugin.tsx
new file mode 100644
index 000000000..852adefc8
--- /dev/null
+++ b/src/designer/elsa-workflows-studio/src/plugins/webhook-plugin.tsx
@@ -0,0 +1,22 @@
+import {ElsaPlugin} from "../services/elsa-plugin";
+import {eventBus} from '../services/event-bus';
+import {ActivityDesignDisplayContext, EventTypes, SyntaxNames} from "../models";
+import {h} from "@stencil/core";
+
+export class WebhookPlugin implements ElsaPlugin {
+ constructor() {
+ eventBus.on(EventTypes.ActivityDesignDisplaying, this.onActivityDisplaying);
+ }
+
+ onActivityDisplaying(context: ActivityDesignDisplayContext) {
+ const activityModel = context.activityModel;
+
+ if (activityModel.type !== 'Webhook')
+ return;
+
+ const props = activityModel.properties || [];
+ const path = props.find(x => x.name == 'Path') || { name: 'Path', expressions: { 'Literal': '', syntax: SyntaxNames.Literal } };
+ const syntax = path.syntax || SyntaxNames.Literal;
+ context.bodyDisplay = `
${path.expressions[syntax]}
`;
+ }
+}
diff --git a/src/designer/elsa-workflows-studio/src/services/plugin-manager.ts b/src/designer/elsa-workflows-studio/src/services/plugin-manager.ts
index 695ded451..98acd2866 100644
--- a/src/designer/elsa-workflows-studio/src/services/plugin-manager.ts
+++ b/src/designer/elsa-workflows-studio/src/services/plugin-manager.ts
@@ -17,6 +17,7 @@ import {SendSignalPlugin} from "../plugins/send-signal-plugin";
import {UserTaskPlugin} from "../plugins/user-task-plugin";
import {StatePlugin} from "../plugins/state-plugin";
import {SendHttpRequestPlugin} from "../plugins/send-http-request-plugin";
+import {WebhookPlugin} from "../plugins/webhook-plugin";
export class PluginManager {
@@ -41,7 +42,8 @@ export class PluginManager {
new StatePlugin(),
new RunJavascriptPlugin(),
new UserTaskPlugin(),
- new SendEmailPlugin()
+ new SendEmailPlugin(),
+ new WebhookPlugin()
];
}