I am using BPMNJS library in Angular and I want to set process variables of input/output from my modal inputs how can we set the process variables / how to get the instance of the input/output of the current element
Inside the bpmn-js-properties-panel we have helpers for fiddling around with Camunda input/outputs (I assume that’s what you’re talking about). Maybe this can be an inspiration for you.
Otherwise, please provide more details so we can help you in a deeplier manner.
Thanks for the update Niklas_Kiefer, As I am new to this not getting how to achive my requirment using this file.
I have a sample model, I want to select value from this and that value needs to be set to input parameter of propertypanel. How do I get that object in my modal. Can you please suggest How I can achieve this.
The properties panel is built in a way that it displays what it gets from the BPMN 2.0 XML, e.g. all existing input parameters for an element.
Can you give an example of what the XML should look like after you select a value from this Modal? The goals should be to update the element accordingly via the existing API. That’s basically what the properties panel is also doing with the helper I posted above.
A valid input parameter would e.g.
<bpmn:task id="Activity_1hsdm9e"> <bpmn:extensionElements> <camunda:inputOutput> <camunda:inputParameter name="Input_0e4jqs0">value</camunda:inputParameter> </camunda:inputOutput> </bpmn:extensionElements> </bpmn:task>
Thanks for the update.
I want to set value in the same way how u showed in XML. I just want to bind my modalwindow value to this inputparameter value before SaveXML.
so I need this Object to set the value.how to get this camunda:inputoutput object from modeler in ts/js.
As I said above, we use helpers to get this information from an element. Once you get the element (e.g. via
elementRegistry) you can get this information.
const elementRegistry = modeler.get('elementRegistry'); const element = elementRegistry.get('StartEvent_1'); const inputOutput = InputOutputHelper.getInputOutput(element);
Thank you soo much for the update. I will try this
Thanks Niklas_kiefer it worked for me.