How do I programmatically invoke a process with UI in Petrel using Ocean API

73 Views Asked by At

I created a process using Ocean API, which runs perfectly inside Petrel. Now, I'm trying to programmatically invoke that process when user right-click an object and click in dropdown menu. Is there any way to programmatically invoke that process using Ocean? I searched all documentation, but couldn't find any example in Ocean Development Guide.

Thanks.

2

There are 2 best solutions below

2
Origameg On

Processes are typically designed to be user interactive, while Worksteps are typically used for more automated non-interactive workflows (with potential Process pane integration for convenience).

If it's your own custom Process, and you want to run some of the logic programmatically, the cleanest solution may be to extract that logic into a service that can be called either from your Petrel Process or from your custom menu interaction.

0
Francisco Xavier Vera Carrión On

If you are using it via the ribbon, you could change the "Process" by "SimpleCommandHandler".

The implementation is very similar and you can call the command whenever you need it.