Skip to content

Instantly share code, notes, and snippets.

@wtrocki
Last active September 4, 2017 16:28
Show Gist options
  • Select an option

  • Save wtrocki/dcc309e2e3b54ebe7260e83b216666c3 to your computer and use it in GitHub Desktop.

Select an option

Save wtrocki/dcc309e2e3b54ebe7260e83b216666c3 to your computer and use it in GitHub Desktop.
Workflow mobile data structure
{
"_id" : "59aafac97037bfbab2a8f9a1",
"id" : "SJ8b3Mr8g",
"assignee" : "rkX1fdSH",
"title" : "Accident No. 3019",
"status" : "New"
flow: ['someid',someid2','5'] - This is created when we going thru workflow.
"workflow" : {
"id" : "SyVXyMuSr",
// stepFlow : _.map(workflow.steps,'id')
"stepFlow":['someid','someid2','someid'],
"title" : "Vehicle Accident Workflow",
"steps" : [
{
"id": "someid",
"code" : "accident-report-form",
"name" : "Accident Report",
"templates" : {
"form" : "<accident-report-form></accident-report-form>",
"view" : "<accident-report value=\"result.submission\"></accident-report>"
},
result: {
}
},
{
"id": "someid2",
"code" : "accident-report-form",
"name" : "Accident Report",
"templates" : {
"form" : "<accident-report-form></accident-report-form>",
"view" : "<accident-report value=\"result.submission\"></accident-report>"
}
},
{
"code" : "vehicle-inspection",
"name" : "Vehicle Inspection",
"templates" : {
"form" : "<vehicle-inspection-form></vehicle-inspection-form>",
"view" : "<vehicle-inspection value=\"result.submission\"></vehicle-inspection>"
}
}
]
}
}
@wtrocki
Copy link
Author

wtrocki commented Sep 4, 2017

If we disengage flow from data? Have interface for WFM that will calculate nextStep on payload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment