Add data entered as <script> tag inside <bpmn:scriptTask>

Hey nikku, i need help. below is what i am looking for

when script task is selected i am rendering input field using
if (is(element, ‘bpmn:ScriptTask’)) {
detailsGroup.entries.push(entryFactory.textField({
id: “script-input”,
label: “Add Script”,
modelProperty: “Script”,
}));
}

the input entered should be added to xml (within the )
Example:
<bpmn:scriptTask id=“sid-42396C9C-2A10-4C2D-8BDE-213E63366D2E”>

</bpmn:scriptTask>

how to use the value entered in modelProperty above, to add script tag inside bpmn:scriptTask?
i went through some of the links like these



Properties-panel-extension descriptor to add child element but was unable to find a solution

Please do not ask specific people for answers.

1 Like

I was able to get it to work. Thanks anyway.

Mind sharing your solution?

if (is(element, ‘bpmn:ScriptTask’)) {
detailsGroup.entries.push(entryFactory.textBox({
id : ‘script’,
description : ‘Enter your script here’,
label : ‘Script’,
modelProperty : ‘script’,
}));

the modelProperty should be ‘script’, this will add the user input value inside the bpmn:scriptTask tag
example:
<bpmn:scriptTask id=“sid-42396C9C-2A10-4C2D-8BDE-213E63366D2E”>
<bpmn:script > user input value</bpmn:script>
</bpmn:scriptTask>
using textBox will help multiple line scripts.

Hope this helps someone :slightly_smiling_face:

1 Like

What is detailsGroup? where did you use this in entire code?
Can you please provide complete solution?

Please do not necrobump old topics. Instead link to this thread from new topic.