Skip to content

Instantly share code, notes, and snippets.

@abbas-oveissi
Last active April 16, 2019 18:00
Show Gist options
  • Save abbas-oveissi/7fb7463d9924d772e266bd4ee00a0000 to your computer and use it in GitHub Desktop.
Save abbas-oveissi/7fb7463d9924d772e266bd4ee00a0000 to your computer and use it in GitHub Desktop.
{
"name": "translation",
"states": [
{
"name": "A",
"state_type_id": 1
},
{
"name": "B",
"state_type_id": 3,
"condition_rest_url": "http://www.test1.com"
},
{
"name": "C",
"state_type_id": 2
},
{
"name": "D",
"state_type_id": 4
}
],
"qualification": {
"rest_url": "http://www.test1.com",
"rest_result_url": "http://www.result-test1.com"
},
"task_types": [
{
"name": "wordTranslation",
"rest_url": "http://www.test1.com",
"rest_result_url": "http://www.result-test1.com"
},
{
"name": "sentenceTranslation",
"rest_url": "http://www.test2.com",
"rest_result_url": "http://www.result-test2.com"
},
{
"name": "textTranslation",
"rest_url": "http://www.test3.com",
"rest_result_url": "http://www.result-test3.com"
}
],
"event_types": [
{
"name": "sendTranslatedAnswer",
"rest_url": "http://www.answer.com"
}
],
"transitions": [
{
"current_state": "A",
"next_state": "B",
"tasks": [
{
"task_name": "wordTranslation1",
"task_type": "wordTranslation",
"min_reputation": 10,
"reward": 1000,
"deadline": 6000,
"needApproved": true
}
]
},
{
"current_state": "B",
"next_state": "C",
"tasks": [
{
"task_name": "sentenceTranslation1",
"task_type": "sentenceTranslation"
}
]
},
{
"current_state": "B",
"next_state": "D",
"tasks": [
{
"task_name": "sentenceTranslation1",
"task_type": "sentenceTranslation"
}
]
},
{
"current_state": "C",
"next_state": "D",
"tasks": [
{
"task_name": "textTranslation1",
"task_type": "textTranslation",
"min_reputation": 10,
"reward": 1000,
"deadline": 6000,
"needApproved": true
},
{
"task_name": "textTranslation2",
"task_type": "textTranslation",
"min_reputation": 10,
"reward": 1000,
"deadline": 6000,
"needApproved": true
}
]
}
],
"state_events": [
{
"state_name": "D",
"events": [
{
"event_name": "sendTranslatedAnswer to requester",
"event_type": "sendTranslatedAnswer"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment