This project is an implementation of an Activiti Cloud Connector, which is a simple bi-directional 3rd party system-to-system integration using Spring Cloud Streams.
This project provides the integration mechanisms against a Mock Ranking Service. This Activiti Cloud Connector listen to events generated by Runtime Bundles (Campaigns for this example) and interacts with the Ranking Service to serve multiple Marketing campaigns.
In order to run this project locally, you need to clone the source code and then run inside the root directory
mvn -Dserver.port=808x spring-boot:run
Note: replace "x" for your desired port number
You can use the following docker-compose file in order to start Rabbit MQ so the service can connect and send messages.
- GET http://localhost:808x/ -> welcome message
- GET http://localhost:808x/rank/ -> get the list of topics that are currently being ranked
- GET http://localhost:808x/rank/{campaign}/{attitude} -> Get the rewards that had been sent related to the specified campaign with attitude (positive/neutral/negative)
- POST http://localhost:808x/rank/{campaign}/{attitude}/{author} -> Manually Rank an Author into a Campaign with the specified attitude (positive/neutral/negative)
- DELETE http://localhost:808x/rank/{campaign}/{attitude} -> Clean Ranking for campaign with attitude (positive/neutral/negative)
Ranked Topics -> GET /rank/
[
"activiti-positive",
"activiti-negative",
"activiti-neutral"
]
Example Ranked Activiti topic / positive attitude
[
{
"nroOfTweets": 52,
"userName": "NapoleonHill"
},
{
"nroOfTweets": 34,
"userName": "RichardBach"
},
{
"nroOfTweets": 20,
"userName": "BenjaminFranklin"
},
{
"nroOfTweets": 19,
"userName": "LeonardodaVinci"
}
]