The Gamification Engine challenge generator challenges for Gamification Engine from Smart Community Lab and from DAS
Gamification Engine Challenge Generator is based on two tools:
- Challenge generator: creates a set of drools rules based on a challenge definition in csv format
- Challenge uploader: upload generated rules into Gamification Engine
- Java 1.7 or higher
- Maven 3.2 or higher
- Gamification engine, setup guide here version 2.1.0
- Clone repository with git
- Compile with maven using mvn install
To deploy a new version of challenge-gen on the Smartcommunitylab Nexus you have to configure a valid user into your ~/.m2/settings.xml
mvn clean install deploy:deploy-file \
-Dmaven.test.skip=true \
-Dpackaging=jar \
-DrepositoryId=SmartCommunityLab-snapshots \
-DpomFile=pom.xml \
-Durl=http://repository.smartcommunitylab.it/content/repositories/snapshots \
-Dfile=target/challenge-gen-<VERSION>-SNAPSHOT.jar
mvn clean install deploy:deploy-file \
-Dmaven.test.skip=true \
-Dpackaging=jar \
-DrepositoryId=SmartCommunityLab-releases \
-DpomFile=pom.xml \
-Durl=http://repository.smartcommunitylab.it/content/repositories/releases \
-Dfile=target/challenge-gen-<VERSION>.jar
Challenge generator have two tools available:
- Challenge Generator, created using
mvn clean install -Pgenerator
- Rule uploader, created using
mvn clean install -Puploader
Different zips (with related dependencies) are created inside target
This tool read challenge definition from csv file in input and using provided templates generate corresponding rules. Tool create two files:
- generated-rules-report.csv : a summary of generated rules
- output.json: used from challenge uploader (see below)
Launch using:
java -jar challengeGenerator.jar
usage: challengeGeneratorTool -host <host> -gameId <gameId> -input <input csv file> -template <template directory> [-output output file]
-gameId uuid for gamification engine
-help display this help
-host gamification engine host
-input challenge definition as csv file
-output generated file name, default challenge.json
-password password for gamification engine
-username username for gamification engine
In this example challenge generator interact with gamification engine without username and passowrd
java -jar challengeGenerator.jar -host http://localhost:8080/gamification/ -gameId 56e7bf3b570ac89331c37262 -input BetaTestChallenges.csv -output output.json
Starting from output of challenge generator upload generated rules into Gamification Engine
Launch using:
java -jar challengeUploader.jar
usage: challengeUploader -host <host> -gameId <gameId> -input <input json file>
-gameId uuid for gamification engine
-help display this help
-host gamification engine host
-input rules to upload in json format
-password password for gamification engine
-username username for gamification engine
java -jar challengeUploader.jar -host http://localhost:8080/gamification/ -gameId 56e7bf3b570ac89331c37262 -input generated.json
In the following sections is a reference for challenge definition, it's possibile to found also a lot of examples in resource folder
NAME | MODEL_NAME | GOAL_TYPE | TARGET | BONUS | POINT_TYPE | DIFFICULTY | BASELINE_VARIABLE | SELECTION_CRITERIA_POINTS | SELECTION_CRITERIA_BADGES |
---|---|---|---|---|---|---|---|---|---|
Name of the challenge, must be unique | Model name of the challenge, used to get right model name defined in gamification engine | Type of the goal | Target value for challenge | Bonus points for completed challenge | Type of the point | Difficulty value ( not used right now ) | Baseline variable used for percent challenges | Selection criteria using points | Selection criteria for badges |
Project is licensed under the Apache License Version 2.0