finos / finos/fluxnova-modeler-plugins
Add Configurable User Prompt Field to Agentic Subprocess Properties Panel
- Dominant language
- JavaScript
- Stars
- 3
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
### Description of Problem
Based on https://github.com/finos/fluxnova-plugins/issues/53, back-end implementation https://github.com/finos/fluxnova-plugins/issues/59
### Description
As a process modeler, I want to configure a user prompt for agentic subprocesses in the BPMN model, so that I can specify the initial user message the agent receives for my specific process.
Currently, the subprocess properties panel allows configuration of `systemPrompt` (which defines AI behavior). We need to add a complementary `userPrompt` field that allows modelers to specify the initial user message sent to the agent. The field should support `${...}` expressions for instance-specific prompt customization, with fallback to the default when empty.
### Potential Solutions
### Acceptance Criteria
- A new text input field labeled "User Prompt" appears in the subprocess properties panel for agentic subprocesses
- The field is positioned logically near the existing "System Prompt" field
- The field accepts multi-line text input (supports line breaks via Enter)
- The field supports `${...}` expressions for runtime variable substitution (e.g., `Hello ${userName}`)
- The field validates against:
- Null/empty prompt values (should be allowed; treated as empty string and will fallback to default at runtime)
- Special characters (should be allowed; ensure proper escaping for XML serialization)
- Field input type matches the existing system prompt field (same component/styling)
- Changes to the field are persisted when the model is saved
- The modeler gracefully handles models that don't have a `userPrompt` configured (backwards compatibility)
### Technical Notes
- The `userPrompt` value should be stored as a BPMN extension attribute in the agentic namespace (same approach as `systemPrompt`)
- The field should be created using the same underlying type as the system prompt field
- No default value should be applied at the UI level; if the field is left empty, it should serialize as an empty string
- Document to users that:
- `${variableName}` expressions can be used for dynamic prompt values
- Expressions can be mixed with normal text (e.g., "Process: ${processName}, User: ${userId}")
- Empty prompts will result in fallback to the default message at runtime
### Definition of Done
- Code reviewed and approved by modeler team lead
- Unit/integration tests added for field persistence and validation
- Expression syntax is properly preserved in XML serialization
- Backwards compatibility verified with existing BPMN files
Contributor guide
Assessment
This issue has not been assessed yet.