[refactor] moved workflow to separate module

This commit is contained in:
Rushabh Mehta 2014-09-09 11:52:12 +05:30
parent e1089d1f2d
commit 2f30edd65c
30 changed files with 307 additions and 306 deletions

View file

@ -1,94 +0,0 @@
{
"autoname": "field:workflow_name",
"creation": "2012-12-28 10:49:55.000000",
"description": "Defines workflow states and rules for a document.",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Transaction",
"fields": [
{
"fieldname": "workflow_name",
"fieldtype": "Data",
"label": "Workflow Name",
"permlevel": 0,
"read_only": 0,
"reqd": 1
},
{
"description": "DocType on which this Workflow is applicable.",
"fieldname": "document_type",
"fieldtype": "Link",
"label": "Document Type",
"options": "DocType",
"permlevel": 0,
"reqd": 1
},
{
"description": "If checked, all other workflows become inactive.",
"fieldname": "is_active",
"fieldtype": "Check",
"label": "Is Active",
"permlevel": 0
},
{
"description": "Different \"States\" this document can exist in. Like \"Open\", \"Pending Approval\" etc.",
"fieldname": "states",
"fieldtype": "Section Break",
"label": "States",
"permlevel": 0
},
{
"description": "All possible Workflow States and roles of the workflow. <br>Docstatus Options: 0 is\"Saved\", 1 is \"Submitted\" and 2 is \"Cancelled\"",
"fieldname": "workflow_document_states",
"fieldtype": "Table",
"label": "Workflow Document States",
"options": "Workflow Document State",
"permlevel": 0,
"reqd": 1
},
{
"description": "Rules for how states are transitions, like next state and which role is allowed to change state etc.",
"fieldname": "transition_rules",
"fieldtype": "Section Break",
"label": "Transition Rules",
"permlevel": 0
},
{
"description": "Rules defining transition of state in the workflow.",
"fieldname": "workflow_transitions",
"fieldtype": "Table",
"label": "Workflow Transitions",
"options": "Workflow Transition",
"permlevel": 0,
"reqd": 1
},
{
"default": "workflow_state",
"description": "Field that represents the Workflow State of the transaction (if field is not present, a new hidden Custom Field will be created)",
"fieldname": "workflow_state_field",
"fieldtype": "Data",
"label": "Workflow State Field",
"permlevel": 0
}
],
"icon": "icon-random",
"idx": 1,
"modified": "2014-01-20 17:49:35.000000",
"modified_by": "Administrator",
"module": "Core",
"name": "Workflow",
"owner": "Administrator",
"permissions": [
{
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"role": "System Manager",
"write": 1
}
]
}

View file

@ -1,36 +0,0 @@
{
"autoname": "field:workflow_action_name",
"creation": "2012-12-28 10:49:56.000000",
"description": "Workflow Action Master",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"fieldname": "workflow_action_name",
"fieldtype": "Data",
"label": "Workflow Action Name",
"permlevel": 0,
"reqd": 1
}
],
"icon": "icon-flag",
"idx": 1,
"modified": "2014-01-20 17:49:35.000000",
"modified_by": "Administrator",
"module": "Core",
"name": "Workflow Action",
"owner": "Administrator",
"permissions": [
{
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"role": "System Manager",
"write": 1
}
]
}

View file

@ -1,75 +0,0 @@
{
"allow_import": 1,
"creation": "2013-02-22 01:27:36",
"description": "Represents the states allowed in one document and role assigned to change the state.",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Master",
"fields": [
{
"fieldname": "state",
"fieldtype": "Link",
"in_list_view": 1,
"label": "State",
"options": "Workflow State",
"permlevel": 0,
"print_width": "160px",
"reqd": 1,
"width": "160px"
},
{
"description": "0 - Draft; 1 - Submitted; 2 - Cancelled",
"fieldname": "doc_status",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Doc Status",
"options": "0\n1\n2",
"permlevel": 0,
"print_width": "80px",
"width": "80px"
},
{
"fieldname": "update_field",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Update Field",
"permlevel": 0
},
{
"fieldname": "update_value",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Update Value",
"permlevel": 0
},
{
"fieldname": "allow_edit",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Only Allow Edit For",
"options": "Role",
"permlevel": 0,
"print_width": "160px",
"reqd": 1,
"width": "160px"
},
{
"fieldname": "message",
"fieldtype": "Text",
"in_list_view": 1,
"label": "Message",
"permlevel": 0,
"print_width": "160px",
"reqd": 0,
"width": "160px"
}
],
"idx": 1,
"istable": 1,
"modified": "2014-05-27 06:35:01.070157",
"modified_by": "Administrator",
"module": "Core",
"name": "Workflow Document State",
"owner": "Administrator",
"permissions": []
}

View file

@ -1,59 +0,0 @@
{
"creation": "2013-02-22 01:27:36.000000",
"description": "Defines actions on states and the next step and allowed roles.",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"fieldname": "state",
"fieldtype": "Link",
"in_list_view": 1,
"label": "State",
"options": "Workflow State",
"permlevel": 0,
"print_width": "200px",
"reqd": 1,
"width": "200px"
},
{
"fieldname": "action",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Action",
"options": "Workflow Action",
"permlevel": 0,
"print_width": "200px",
"reqd": 1,
"width": "200px"
},
{
"fieldname": "next_state",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Next State",
"options": "Workflow State",
"permlevel": 0,
"print_width": "200px",
"reqd": 1,
"width": "200px"
},
{
"fieldname": "allowed",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Allowed",
"options": "Role",
"permlevel": 0,
"print_width": "200px",
"reqd": 1,
"width": "200px"
}
],
"idx": 1,
"istable": 1,
"modified": "2013-12-20 19:21:55.000000",
"modified_by": "Administrator",
"module": "Core",
"name": "Workflow Transition",
"owner": "Administrator"
}

View file

@ -1,2 +1,3 @@
Core
Website
Workflow

View file

View file

View file

@ -0,0 +1,94 @@
{
"autoname": "field:workflow_name",
"creation": "2012-12-28 10:49:55.000000",
"description": "Defines workflow states and rules for a document.",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Transaction",
"fields": [
{
"fieldname": "workflow_name",
"fieldtype": "Data",
"label": "Workflow Name",
"permlevel": 0,
"read_only": 0,
"reqd": 1
},
{
"description": "DocType on which this Workflow is applicable.",
"fieldname": "document_type",
"fieldtype": "Link",
"label": "Document Type",
"options": "DocType",
"permlevel": 0,
"reqd": 1
},
{
"description": "If checked, all other workflows become inactive.",
"fieldname": "is_active",
"fieldtype": "Check",
"label": "Is Active",
"permlevel": 0
},
{
"description": "Different \"States\" this document can exist in. Like \"Open\", \"Pending Approval\" etc.",
"fieldname": "states",
"fieldtype": "Section Break",
"label": "States",
"permlevel": 0
},
{
"description": "All possible Workflow States and roles of the workflow. <br>Docstatus Options: 0 is\"Saved\", 1 is \"Submitted\" and 2 is \"Cancelled\"",
"fieldname": "workflow_document_states",
"fieldtype": "Table",
"label": "Workflow Document States",
"options": "Workflow Document State",
"permlevel": 0,
"reqd": 1
},
{
"description": "Rules for how states are transitions, like next state and which role is allowed to change state etc.",
"fieldname": "transition_rules",
"fieldtype": "Section Break",
"label": "Transition Rules",
"permlevel": 0
},
{
"description": "Rules defining transition of state in the workflow.",
"fieldname": "workflow_transitions",
"fieldtype": "Table",
"label": "Workflow Transitions",
"options": "Workflow Transition",
"permlevel": 0,
"reqd": 1
},
{
"default": "workflow_state",
"description": "Field that represents the Workflow State of the transaction (if field is not present, a new hidden Custom Field will be created)",
"fieldname": "workflow_state_field",
"fieldtype": "Data",
"label": "Workflow State Field",
"permlevel": 0
}
],
"icon": "icon-random",
"idx": 1,
"modified": "2014-01-20 17:49:35.000001",
"modified_by": "Administrator",
"module": "Workflow",
"name": "Workflow",
"owner": "Administrator",
"permissions": [
{
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"role": "System Manager",
"write": 1
}
]
}

View file

@ -0,0 +1,36 @@
{
"autoname": "field:workflow_action_name",
"creation": "2012-12-28 10:49:56.000000",
"description": "Workflow Action Master",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"fieldname": "workflow_action_name",
"fieldtype": "Data",
"label": "Workflow Action Name",
"permlevel": 0,
"reqd": 1
}
],
"icon": "icon-flag",
"idx": 1,
"modified": "2014-01-20 17:49:35.000001",
"modified_by": "Administrator",
"module": "Workflow",
"name": "Workflow Action",
"owner": "Administrator",
"permissions": [
{
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"role": "System Manager",
"write": 1
}
]
}

View file

@ -0,0 +1,75 @@
{
"allow_import": 1,
"creation": "2013-02-22 01:27:36",
"description": "Represents the states allowed in one document and role assigned to change the state.",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Master",
"fields": [
{
"fieldname": "state",
"fieldtype": "Link",
"in_list_view": 1,
"label": "State",
"options": "Workflow State",
"permlevel": 0,
"print_width": "160px",
"reqd": 1,
"width": "160px"
},
{
"description": "0 - Draft; 1 - Submitted; 2 - Cancelled",
"fieldname": "doc_status",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Doc Status",
"options": "0\n1\n2",
"permlevel": 0,
"print_width": "80px",
"width": "80px"
},
{
"fieldname": "update_field",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Update Field",
"permlevel": 0
},
{
"fieldname": "update_value",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Update Value",
"permlevel": 0
},
{
"fieldname": "allow_edit",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Only Allow Edit For",
"options": "Role",
"permlevel": 0,
"print_width": "160px",
"reqd": 1,
"width": "160px"
},
{
"fieldname": "message",
"fieldtype": "Text",
"in_list_view": 1,
"label": "Message",
"permlevel": 0,
"print_width": "160px",
"reqd": 0,
"width": "160px"
}
],
"idx": 1,
"istable": 1,
"modified": "2014-05-27 06:35:01.070158",
"modified_by": "Administrator",
"module": "Workflow",
"name": "Workflow Document State",
"owner": "Administrator",
"permissions": []
}

View file

@ -35,9 +35,9 @@
],
"icon": "icon-flag",
"idx": 1,
"modified": "2014-01-20 17:49:35.000000",
"modified": "2014-01-20 17:49:35.000001",
"modified_by": "Administrator",
"module": "Core",
"module": "Workflow",
"name": "Workflow State",
"owner": "Administrator",
"permissions": [

View file

@ -0,0 +1,59 @@
{
"creation": "2013-02-22 01:27:36.000000",
"description": "Defines actions on states and the next step and allowed roles.",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"fieldname": "state",
"fieldtype": "Link",
"in_list_view": 1,
"label": "State",
"options": "Workflow State",
"permlevel": 0,
"print_width": "200px",
"reqd": 1,
"width": "200px"
},
{
"fieldname": "action",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Action",
"options": "Workflow Action",
"permlevel": 0,
"print_width": "200px",
"reqd": 1,
"width": "200px"
},
{
"fieldname": "next_state",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Next State",
"options": "Workflow State",
"permlevel": 0,
"print_width": "200px",
"reqd": 1,
"width": "200px"
},
{
"fieldname": "allowed",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Allowed",
"options": "Role",
"permlevel": 0,
"print_width": "200px",
"reqd": 1,
"width": "200px"
}
],
"idx": 1,
"istable": 1,
"modified": "2013-12-20 19:21:55.000001",
"modified_by": "Administrator",
"module": "Workflow",
"name": "Workflow Transition",
"owner": "Administrator"
}