JBoss CLI to Config Process Engine

Hi All,

We’d like to activate the activate Camunda Batch Processing on our Wildfly hosted Camunda Engine by setting

<property name="jobExecutorDeploymentAware">false</property>

in process engine’s properties of standalone.xml. Because manually editing the configuration file is not an option, I tried to find an JBoss CLI command for that.
While testing locally, I was able to display the process engine configuration:

$ jboss-cli.sh --connect
[standalone@localhost:9990 /] /subsystem=camunda-bpm-platform/process-engines=default/:read-resource-description
...

but any attempt to change mentioned configuration value failed. Does anyone know how the CLI command has to look like? Any support is appreciated.

Best Regards,
Gunther

I would also be very interested in some instructions how to configure Camunda using jboss-cli.

Everything other than adding an empty Camunda subsystem (with empty process-engines child) or reading that - like Gunther does above - fails.

I’ve tried different variations of possible command paths and always fail with “Node path format is wrong around …”.

What I need to do is add a process engine and a job executor into an “empty” Wildfly configuration. “Empty” meaning it’s a vanilla Wildfly that gets the Camunda details added by me.

As of now using a preconfigured Wildfly runtime (v.27 for Camunda 7.19.4-ee) isn’t an option as our framework isn’t yet compatible with the Jakarta EE 10 changes in that Wildfly version. So we need to stick with Wildfly 26 and integrate the newer Camunda version.

In the meantime, I found out that the process engine can be configured using the JBoss CLI like:

/subsystem=camunda-bpm-platform/process-engines=default/:write-attribute(name=properties,value={"jobExecutorAcquisitionName" => "default","isAutoSchemaUpdate" => "true","authorizationEnabled" => "true","jobExecutorDeploymentAware" => "false","historyCleanupBatchWindowStartTime" => "00:01"})

I learned that the GUI mode of JBoss CLI

$ ./jboss-cli.sh --gui

can be a great help for figuring CLI commands.

1 Like

Oh, the GUI mode is really, really helpful with this!

I tried interactive mode but didn’t get very far. Just adding a process engine to the list was a hurdle I couldn’t overcome. :see_no_evil:

Now with the GUI help and your input I can proceed.

Thank you very much!

@Gunther.Rotsch another question to the expert :wink:

Would you by any chance happen to know how to config the list of plugins of the process engine?

<process-engine name="default" default="true">
    <datasource>java:/jdbc/camunda</datasource>
    ...
    <plugins>
        <plugin>
            <class>org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin</class>
        </plugin>
        ...
    </plugins>
</process-engine>

I need to add some plugins and here even the GUI mode of jboss-cli comes to its limits. When adding the process engine the dialogue contains a widget to add a list of plugin entries.
But when I add class names as strings only I get a WFLYCTL0097: Wrong type for 'plugins'. Expected [EXPRESSION, OBJECT] but was STRING failure.

I can’t figure out the correct syntax of the plugin entries and tried multiple variations.

I tried adding the plugins right when adding the process engine (as presented in the UI), and tried it in a separate command. No way.

This /subsystem=camunda-bpm-platform/process-engines=default/:list-add(name=plugins,value="org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin") leads to WFLYCTL0097: Wrong type for 'plugins'. Expected [EXPRESSION, OBJECT] but was STRING.
This /subsystem=camunda-bpm-platform/process-engines=default/:list-add(name=plugins,value=["org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin"],index=0) leads to WFLYCTL0097: Wrong type for 'plugins'. Expected [EXPRESSION, OBJECT] but was LIST.
Etc. …

:person_shrugging:

Ok, found it out myself.

By manually adding the wanted plugins, then reading the attribute via jboss-cli and copying its value I was able to construct the correct syntax.

So a valid way to set a list of plugin classes might be /subsystem=camunda-bpm-platform/process-engines=default/:write-attribute(name=plugins,value=[{"class" => "org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin"},{"class" => "org.camunda.spin.plugin.impl.SpinProcessEnginePlugin"},{"class" => "org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin"}]).

My tries beforehand were only a few characters off. But in IT that’s relavant, isn’t it? :wink: