Custom Actions
You can use Custom Actions to enable communication between two Applications on either the same cluster or across different clusters.
Note
To understand the purpose of Custom Actions or view the overall structure of how they work, check out the documentation in the overview page here.
Once you have created a Consumer Application (Executor), you may want to test it first locally on your development computer before uploading it to the Kelvin Platform.
Generator Application
To test your Consumer Application (Executor), you will need to first create a local Generator Application.
Note
This Application is only for local testing and does not form part of your code to upload to the Kelvin Platform.
In our documentation examples in the Produce - Custom Actions and Consume - Custom Actions sections, we showed you the code to create Publisher and Consumer (Executor) Applications.
Here is a typical Generator Application you would create to send Custom Actions with the type email.
| mygenerator.py Example | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
Test Consumer Application
With your Generator Application ready, you can now test your Consumer Application (Executor).
Note
In this example you would use the code from the Consumer Application example of the Custom Actions.
First in the terminal run the Generator Test Application.
| Start Generator Test Application | |
|---|---|
1 | |
Then run your Consumer Application (Executor).
Warning
This is to test the Custom Action consumer application NOT the Custom Action publisher application.
The test generator is simulating a Custom Action publisher application.
Success
You can add Recommendation, Control Changes, etc. in your Consumer application. They will be received by the test generator and displayed in the terminal like a normal test.
| Start Testing Consumer Application | |
|---|---|
1 | |
The Custom Action Objects created in the Generator Test Application will now be sent to the Consumer Application (Executor).