Skip to content

Commit

Permalink
Default Workflow: Support comments on commands (#283)
Browse files Browse the repository at this point in the history
* Default Workflow: Support comments on commands

* Add Comment field at the top of forms near commands
* Add Product.WorkflowComment
* Add UserTask.Comment
* Copy WorkflowComment when creating UserTask (and remove from Product)
* Remove Save & Close and Exit buttons
* Fix Reject button on Project Approval form
  • Loading branch information
chrisvire committed Nov 14, 2018
1 parent 1ae723e commit 2a7cadd
Show file tree
Hide file tree
Showing 13 changed files with 1,096 additions and 160 deletions.
16 changes: 5 additions & 11 deletions scripts/DB/default_workflow.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,10 @@ INSERT INTO "WorkflowScheme" ("Code", "Scheme") VALUES
<Parameter Name="Comment" Type="String" Purpose="Temporary" />
</Parameters>
<Commands>
<Command Name="Approve">
<InputParameters>
<ParameterRef Name="Comment" IsRequired="false" DefaultValue="" NameRef="Comment" />
</InputParameters>
</Command>
<Command Name="Reject">
<InputParameters>
<ParameterRef Name="Comment" IsRequired="true" DefaultValue="" NameRef="Comment" />
</InputParameters>
</Command>
<Command Name="Approve" />
<Command Name="Reject" />
<Command Name="Continue" />
<Command Name="Back" />
</Commands>
<Timers>
<Timer Name="CheckReady" Type="Interval" Value="60s" NotOverrideIfExists="false" />
Expand Down Expand Up @@ -66,7 +60,7 @@ INSERT INTO "WorkflowScheme" ("Code", "Scheme") VALUES
<Restriction Type="Allow" NameRef="Admins" />
</Restrictions>
<Triggers>
<Trigger Type="Command" NameRef="Approve" />
<Trigger Type="Command" NameRef="Continue" />
</Triggers>
<Conditions>
<Condition Type="Always" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SIL_AppBuilders_Product_Definition",
"lastUpdate": "2018-11-13T17:05:13.734801-05:00",
"lastUpdate": "2018-11-14T18:57:38.3301174+00:00",
"entityId": "4dfa6b6f-de02-4ddd-8289-b0b4f3e11d66",
"dataSourceType": "",
"isTemplate": false,
Expand Down Expand Up @@ -36,14 +36,6 @@
"isEditable": true,
"isLoadable": true
},
{
"id": "6fffb992-a87a-f532-fd63-c0f524165a3e",
"attributeId": "4fa02def-abc9-4abf-9cf2-795dcbee93cc",
"control": "input_description",
"parentId": "b3a47096-ff4f-43e5-2795-4de6b7d1014c",
"isEditable": false,
"isLoadable": true
},
{
"id": "cf319949-b4f0-d86f-4032-3296f3f5cfbc",
"attributeId": "409379f4-a53a-4ae9-a43f-28dff1c831be",
Expand All @@ -65,6 +57,14 @@
"isEditable": true,
"isLoadable": true
},
{
"id": "6937e6f6-a46a-8159-a554-0e86ea728f5c",
"attributeId": "bb53ed42-a7f1-4cbe-9173-e53f30cfe993",
"control": "input_description",
"parentId": "c38a2890-cc2b-e5de-b8fb-0048fd6b1279",
"isEditable": false,
"isLoadable": true
},
{
"id": "f8ec7e90-b191-3b5b-9c23-50da8d014a54",
"attributeId": "91d50027-b78e-41fc-91ed-dc1ce2df80cf",
Expand All @@ -78,12 +78,12 @@
"attributeId": "c0926290-78d9-4577-be46-a51ef8a9b3e0",
"parentId": "c38a2890-cc2b-e5de-b8fb-0048fd6b1279",
"isEditable": false,
"isLoadable": false
"isLoadable": true
},
{
"id": "9642843a-e438-8e94-5f74-8db51c3bd5ff",
"attributeId": "d804bfe5-ea63-4d58-a3af-47cabee966fb",
"control": "input_publishingkey",
"control": "textarea_publishingkey",
"parentId": "d09f7410-a030-35a3-6a10-96fe1872523c",
"isEditable": false,
"isLoadable": true
Expand Down Expand Up @@ -125,6 +125,13 @@
"control": "dropdown_language",
"isEditable": true,
"isLoadable": true
},
{
"id": "f159a847-83b3-d279-b7ee-9b874f330945",
"attributeId": "da31659f-07de-4af3-b377-7ac8109c00fd",
"control": "textarea_comment",
"isEditable": true,
"isLoadable": true
}
],
"dataColl": []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,46 @@
[
{
"key": "workflow",
"data-buildertype": "workflowbar",
"events": {
"onCommandClick": {
"active": true,
"actions": [
"validate",
"save",
"workflowExecuteCommand",
"refresh"
],
"targets": [],
"parameters": []
"key": "form_2",
"data-buildertype": "form",
"children": [
{
"key": "workflow",
"data-buildertype": "workflowbar",
"events": {
"onCommandClick": {
"active": true,
"actions": [
"validate",
"save",
"workflowExecuteCommand",
"refresh"
],
"targets": [],
"parameters": []
},
"onSetStateClick": {
"active": true,
"actions": [
"validate",
"save",
"workflowSetState",
"refresh"
],
"targets": [],
"parameters": []
}
},
"style-source": "",
"blockSetState": true
},
"onSetStateClick": {
"active": true,
"actions": [
"validate",
"save",
"workflowSetState",
"refresh"
],
"targets": [],
"parameters": []
{
"key": "textarea_comment",
"data-buildertype": "textarea",
"label": "Comment",
"fluid": true,
"rows": "2"
}
},
"style-source": "",
"blockSetState": true
]
},
{
"key": "container_1",
Expand All @@ -38,20 +51,36 @@
"data-buildertype": "form",
"children": [
{
"key": "input_product_name",
"data-buildertype": "input",
"label": "Name",
"fluid": true,
"onChangeTimeout": 200,
"readOnly": true
"key": "header_1",
"data-buildertype": "header",
"content": "Product Definition",
"size": "medium"
},
{
"key": "input_description",
"data-buildertype": "input",
"label": "Description",
"fluid": true,
"onChangeTimeout": 200,
"readOnly": true
"key": "formgroup_2",
"data-buildertype": "formgroup",
"widths": "custom",
"children": [
{
"key": "input_product_name",
"data-buildertype": "input",
"label": "Name",
"fluid": true,
"onChangeTimeout": 200,
"readOnly": true,
"style-customcss": "six wide field"
},
{
"key": "input_description",
"data-buildertype": "input",
"label": "Description",
"fluid": true,
"onChangeTimeout": 200,
"readOnly": true,
"style-customcss": "ten wide field"
}
],
"widthsCustom": "16"
},
{
"key": "input_type",
Expand All @@ -62,13 +91,12 @@
"readOnly": true
},
{
"key": "input_publishingkey",
"data-buildertype": "input",
"key": "textarea_publishingkey",
"data-buildertype": "textarea",
"label": "Publishing Key",
"fluid": true,
"onChangeTimeout": 200,
"placeholder": "Your publishing key can be found under the \"Publishing\" page.",
"size": ""
"rows": "4",
"placeholder": "Your publishing key can be found under the \"Publishing\" page."
},
{
"key": "formgroup_1",
Expand Down Expand Up @@ -495,41 +523,5 @@
"parameters": []
}
}
},
{
"key": "saveclose",
"data-buildertype": "button",
"content": "Save & Close",
"secondary": true,
"events": {
"onClick": {
"actions": [
"validate",
"save",
"exit"
],
"active": true,
"targets": [],
"parameters": []
}
}
},
{
"key": "cancel",
"data-buildertype": "button",
"content": "Cancel",
"events": {
"onClick": {
"active": true,
"actions": [
"cancel",
"exit"
],
"targets": [],
"parameters": []
}
},
"secondary": true,
"floated": "right"
}
]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SIL_AppBuilders_Project_Approval",
"lastUpdate": "2018-11-13T16:49:32.779019-05:00",
"lastUpdate": "2018-11-14T18:41:14.0091+00:00",
"entityId": "4dfa6b6f-de02-4ddd-8289-b0b4f3e11d66",
"isTemplate": false,
"triggers": [],
Expand Down Expand Up @@ -148,6 +148,13 @@
"control": "dropdown_language",
"isEditable": true,
"isLoadable": true
},
{
"id": "21261e24-4a73-19c9-eae6-5e2aedc2e274",
"attributeId": "da31659f-07de-4af3-b377-7ac8109c00fd",
"control": "textarea_comment",
"isEditable": true,
"isLoadable": true
}
],
"dataColl": [],
Expand Down
Loading

0 comments on commit 2a7cadd

Please sign in to comment.