By default when a BusinessWorks application is started all its Process Starters, or Components, are started meanwhile in some use cases it is useful to disable a Process Starter at start-up and to enable it in a later stage either within the BusinessWorks application logic or from an external component.
This article is to explain how to do this in different way:
. Using the TEA
. Using the bwagent REST API
. Using a bwadmin command
It is important to keep in mind that this configuration is persisted locally on the BusinessWorks server and disabling or re-enabling the automatic start for a Process Started will be in effect at the next application start-up even if the Process Starter is enabled or disabled while the application is running.
How to configure a Process Starter or Component Auto Start using the TEA
By default all Process Starters or Components of an application are configured to start when the application is started (‘Auto Start’ enabled).
This can be updated using the ‘Applications’ panel of the TEA, selecting an application, opening the ‘Components’ tab, selecting a Process Starter or Component and then updating the ‘Auto Start’ option. Note that this configuration is managed at application level (for all appnodes).
![1*7JgdEebaFjOwhiZyJ3T2kA.png](https://miro.medium.com/v2/resize:fit:604/1*7JgdEebaFjOwhiZyJ3T2kA.png)
How to configure a Process Starter or Component Auto Start using the bwagent REST API
A Process Starter or Component Auto Start can be disabled using the following bwagent REST API method:
PUT /bw/v1/domains/<DOMAIN_NAME>/appspaces/<APPSPACE_NAME>/applications/<APPLICATION_NAME>/<VERSION>/component/autostart/disable?components=<COMPONENT_NAME>
Example:
![1*12BvTZYm10gv1opvvbWNqA.png](https://miro.medium.com/v2/resize:fit:605/1*12BvTZYm10gv1opvvbWNqA.png)
A Process Starter or Component Auto Start can be re-enabled using the following bwagent REST API method:
PUT /bw/v1/domains/<DOMAIN_NAME>/appspaces/<APPSPACE_NAME>/applications/<APPLICATION_NAME>/<VERSION>/component/autostart/enable?components=<COMPONENT_NAME>
How to configure a Process Starter or Component auto start using bwadmin
A Process Starter or Component Auto Start can be disabled using the following bwadmin command:
disablecomponentautostart -d <DOMAIN_NAME> -a <APPSPACE_NAME> <COMPONENT_NAME> <APPLICATION_NAME> <VERSION>
Example:
disablecomponentautostart -d TESTEM -a AS04 ComponentJMSReceiver TestApp.Application 1.0
![1*JRGngGIjUVihC9tYuI0NHg.png](https://miro.medium.com/v2/resize:fit:605/1*JRGngGIjUVihC9tYuI0NHg.png)
A Process Starter or Component Auto Start can be re-enabled using the following bwadmin command:
enablecomponentautostart -d <DOMAIN_NAME> -a <APPSPACE_NAME> <COMPONENT_NAME> <APPLICATION_NAME> <VERSION>
How to enable a Process Starter or Component at runtime within BusinessWorks
A Process Starter or a Component disabled at start-up can be enabled at runtime within the BusinessWorks application logic using the ‘Engine Command’ activity configured with the ‘ResumeProcessStarter’ Command and the target Process definition name.
This action is only for the current runtime environment and at the next application start-up this is the ‘Auto Start’ configuration of the Process Starter or Component that will apply.
![1*Y0_qjywcFbb7cnNV-SOM1g.png](https://miro.medium.com/v2/resize:fit:605/1*Y0_qjywcFbb7cnNV-SOM1g.png)
Similarly, a Process Starter or a Component can be disabled at runtime within the BusinessWorks application logic using the ‘Engine Command’ activity configured with the ‘SuspendProcessStarter’ Command.
How to enable a Process Starter or Component at runtime using the bwagent REST API
A Process Starter or a Component disabled at start-up can be enabled at runtime using the following bwagent REST API method:
POST /bw/v1/domains/<DOMAIN_NAME>/appspaces/<APPSPACE_NAME>/applications/<APPLICATION_NAME>/<VERSION>component/<COMPONENT_NAME>/start
This action is only for the current runtime environment and at the next application start-up this is the ‘Auto Start’ configuration of the Process Starter or Component that will apply.
Example:
![1*k5txr50iK6i-MaZ1b0cD9w.png](https://miro.medium.com/v2/resize:fit:605/1*k5txr50iK6i-MaZ1b0cD9w.png)
Similarly, a Process Starter or a Component can be disabled at runtime within the BusinessWorks application logic using the following bwagent REST API method:
POST /bw/v1/domains/<DOMAIN_NAME>/appspaces/<APPSPACE_NAME>/applications/<APPLICATION_NAME>/<VERSION>component/<COMPONENT_NAME>/stop
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now