Execute command action through plugin - File Open Operation

I have been trying to execute operations like opening a file upon a button click from a plugin, I have the actual path of my file but how do I communicate with my plugin to main application of camunda modeler to open a file ?

Is there any help here @Martin @barmac @nikku ??

Please share a running / prototypical example that clearly shows what you’re trying to achieve, what is working and what is not.

Use our existing starter projects to quickly hack it or share your existing, partial solution on GitHub or via a CodeSandbox. Provide the necessary pointers that allow us to quickly understand where you got stuck.

This way we may be able to help you in a constructive manner.

Thanks :heart:

Hey @barmac

Thanks for reverting back, I have pushed my code.

This is code reference link : FilePickerPlugin/properties-panel-extension/src/provider/calledDecisionCustom/filePickerModule/SelectedRuleOuterViewPanel.js at d514675deb1d93cd9c8eb7ac7d745af9c473b0e5 · naveinn/FilePickerPlugin · GitHub

This is a file picker module that was integrated as part of property panel extension, in the SelectedRuleOuterViewPanel component I am trying to display list of file names with ,dmn extensions, i have the entire full path info, as the user clicks the file name i want to open a file in new tab of camunda modeler.

As this is a plugin, I am trying to understand which service should i use to achieve this task.

Unfortunately, it looks that we don’t expose an API to open specific paths with a plugin. The closest one is open-diagram action which opens the file picker.
If what the API offers now is not enough, feel free to open a feature request in the repo: GitHub - camunda/camunda-modeler: An integrated modeling solution for BPMN, DMN and Forms based on bpmn.io.

Okay is it possible to open a file from the main application(camunda modeler in this case), given a path using any of the available service ?

Please explain. I just shared that there is no public API for opening a specific file from a plugin.

Okay I am trying to leverge the concept of hosting a backend server and use that to open the file, seems like good workaround.

ref : GitHub - bpmn-io/dmn-testing-plugin: Camunda Modeler plugin that allows testing of a DMN decision.

I see. So you found out about the ugly hack that we used in the dmn-testing-plugin. Probably it’s possible to open arbitrary file this way, but it’s neither supported nor endorsed to hack around the menu API :slight_smile: