Intialstate-leave request, next state-Pending, Pending have two options Approved and rejected if approved it goes final state. if it Rejected it goes -Intialstate
this is my flow diagram.
my sample output :
after runing this flow digram i want to form a json be like this .I have done the flow digram but i dont know how to form this type of json and how can i read the values from statemachine flow diagram can some one help me to reslove this issue ?
{
"Init": {
"event1": {
"nextstate": "Processing",
"action": "leaveRequest"
}
},
"Processing": {
"event2": {
"nextstate": "Pending",
"action": "processing_event"
}
},
"Pending": {
"event3": {
"nextstate": "Approved",
"action": "pending_event"
}
}
}