From ff307c2afabad972f27e8e1301585d4803f64617 Mon Sep 17 00:00:00 2001 From: Rafael Praxedes Date: Wed, 11 Oct 2023 21:15:47 -0300 Subject: [PATCH] LPS-198995 Convert xml content from the '**workflow**.json' files to the x-json format --- ...workflow-definition.batch-engine-data.json | 663 +++++++++++++++++- ...workflow-definition.batch-engine-data.json | 440 +++++++++++- 2 files changed, 1101 insertions(+), 2 deletions(-) diff --git a/workspaces/liferay-clarity-workspace/client-extensions/liferay-clarity-batch/batch/workflow-definition.batch-engine-data.json b/workspaces/liferay-clarity-workspace/client-extensions/liferay-clarity-batch/batch/workflow-definition.batch-engine-data.json index 814d678c89bf6e..0f471bc9bf4703 100644 --- a/workspaces/liferay-clarity-workspace/client-extensions/liferay-clarity-batch/batch/workflow-definition.batch-engine-data.json +++ b/workspaces/liferay-clarity-workspace/client-extensions/liferay-clarity-batch/batch/workflow-definition.batch-engine-data.json @@ -21,7 +21,668 @@ "items": [ { "active": true, - "content": " D4B8 Hybrid Approver An automated approval process that requires human review when specified. 1 start Begin a workflow. true initial-review machine-review true approved Conclude the workflow. approve groovy onEntry update Ask a user to work on the item. reject groovy onAssignment Creator Modification Notification freemarker email user-notification onAssignment test@liferay.com resubmit manager-review true machine-review Machine Action reviews this entry. Machine Action function#liferay-clarity-etc-spring-boot-workflow-action-application 1 onEntry Review Notification freemarker user-notification onAssignment test@liferay.com auto-approve approved true review manager-review false manager-review Ask a user to work on the item. Review Notification freemarker user-notification onAssignment regular Business Development Manager reject update false approve approved true ", + "content": { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "D4B8 Hybrid Approver" + }, + { + "#tag-name": "description", + "#value": "An automated approval process that requires human review when specified." + }, + { + "#tag-name": "version", + "#value": "1" + }, + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "start" + }, + { + "#tag-name": "description", + "#value": "Begin a workflow." + }, + { + "#cdata-value": [ + "", + " {", + " \"xy\":[", + " 165,", + " 73", + " ]", + " }", + " " + ], + "#tag-name": "metadata" + }, + { + "#tag-name": "initial", + "#value": "true" + }, + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "Start", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "Initial Review", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + }, + { + "#tag-name": "name", + "#value": "initial-review" + }, + { + "#tag-name": "target", + "#value": "machine-review" + }, + { + "#tag-name": "default", + "#value": "true" + } + ], + "#tag-name": "transition" + } + ], + "#tag-name": "transitions" + } + ], + "#tag-name": "state" + }, + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "approved" + }, + { + "#tag-name": "description", + "#value": "Conclude the workflow." + }, + { + "#cdata-value": [ + "", + " {", + " \"xy\": [", + " 648.683349609375,", + " 303.63330078125", + " ],", + " \"terminal\": true", + " }", + " " + ], + "#tag-name": "metadata" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "approve" + }, + { + "#tag-name": "status", + "#value": "0" + }, + { + "#tag-name": "execution-type", + "#value": "onEntry" + } + ], + "#tag-name": "action" + } + ], + "#tag-name": "actions" + }, + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "Approved", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + } + ], + "#tag-name": "state" + }, + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "update" + }, + { + "#tag-name": "description", + "#value": "Ask a user to work on the item." + }, + { + "#cdata-value": [ + "", + " {", + " \"xy\": [", + " 162.70001220703125,", + " 555.2333374023438", + " ]", + " }", + " " + ], + "#tag-name": "metadata" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "deny" + }, + { + "#tag-name": "status", + "#value": "4" + }, + { + "#tag-name": "priority", + "#value": "1" + }, + { + "#tag-name": "execution-type", + "#value": "onAssignment" + } + ], + "#tag-name": "action" + }, + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "pending" + }, + { + "#tag-name": "status", + "#value": "1" + }, + { + "#tag-name": "priority", + "#value": "2" + }, + { + "#tag-name": "execution-type", + "#value": "onAssignment" + } + ], + "#tag-name": "action" + }, + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "Creator Modification Notification" + }, + { + "#cdata-value": [ + "Your submission was rejected by ${userName}, please modify and resubmit." + ], + "#tag-name": "template" + }, + { + "#tag-name": "template-language", + "#value": "freemarker" + }, + { + "#tag-name": "notification-type", + "#value": "email" + }, + { + "#tag-name": "notification-type", + "#value": "user-notification" + }, + { + "#child-nodes": [ + { + "#tag-name": "user" + } + ], + "#tag-name": "recipients", + "receptionType": "to" + }, + { + "#tag-name": "execution-type", + "#value": "onAssignment" + } + ], + "#tag-name": "notification" + } + ], + "#tag-name": "actions" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "email-address", + "#value": "test@liferay.com" + } + ], + "#tag-name": "user" + } + ], + "#tag-name": "assignments" + }, + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "Update", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "Resubmit", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + }, + { + "#tag-name": "name", + "#value": "resubmit" + }, + { + "#tag-name": "target", + "#value": "manager-review" + }, + { + "#tag-name": "default", + "#value": "true" + } + ], + "#tag-name": "transition" + } + ], + "#tag-name": "transitions" + } + ], + "#tag-name": "task" + }, + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "machine-review" + }, + { + "#tag-name": "description", + "#value": "Machine Action reviews this entry." + }, + { + "#cdata-value": [ + "", + " {", + " \"xy\": [", + " 163,", + " 229", + " ]", + " }", + " " + ], + "#tag-name": "metadata" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "Machine Action" + }, + { + "#tag-name": "description" + }, + { + "#tag-name": "script" + }, + { + "#tag-name": "script-language", + "#value": "function#liferay-clarity-etc-spring-boot-workflow-action-application" + }, + { + "#tag-name": "priority", + "#value": "1" + }, + { + "#tag-name": "execution-type", + "#value": "onEntry" + } + ], + "#tag-name": "action" + }, + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "Review Notification" + }, + { + "#tag-name": "description" + }, + { + "#cdata-value": [ + "${userName} sent you a ${entryType} for review in the workflow." + ], + "#tag-name": "template" + }, + { + "#tag-name": "template-language", + "#value": "freemarker" + }, + { + "#tag-name": "notification-type", + "#value": "user-notification" + }, + { + "#child-nodes": [ + { + "#tag-name": "assignees" + } + ], + "#tag-name": "recipients", + "receptionType": "to" + }, + { + "#tag-name": "execution-type", + "#value": "onAssignment" + } + ], + "#tag-name": "notification" + } + ], + "#tag-name": "actions" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "email-address", + "#value": "test@liferay.com" + } + ], + "#tag-name": "user" + } + ], + "#tag-name": "assignments" + }, + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "Machine Review", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "Auto Approve", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + }, + { + "#tag-name": "name", + "#value": "auto-approve" + }, + { + "#tag-name": "target", + "#value": "approved" + }, + { + "#tag-name": "default", + "#value": "true" + } + ], + "#tag-name": "transition" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "Review", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + }, + { + "#tag-name": "name", + "#value": "review" + }, + { + "#tag-name": "target", + "#value": "manager-review" + }, + { + "#tag-name": "default", + "#value": "false" + } + ], + "#tag-name": "transition" + } + ], + "#tag-name": "transitions" + } + ], + "#tag-name": "task" + }, + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "manager-review" + }, + { + "#tag-name": "description", + "#value": "Ask a user to work on the item." + }, + { + "#cdata-value": [ + "", + " {", + " \"xy\": [", + " 162.58331298828125,", + " 383.86669921875", + " ]", + " }", + " " + ], + "#tag-name": "metadata" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "Review Notification" + }, + { + "#tag-name": "description" + }, + { + "#cdata-value": [ + "${userName} sent you a ${entryType} for review in the workflow." + ], + "#tag-name": "template" + }, + { + "#tag-name": "template-language", + "#value": "freemarker" + }, + { + "#tag-name": "notification-type", + "#value": "user-notification" + }, + { + "#child-nodes": [ + { + "#tag-name": "assignees" + } + ], + "#tag-name": "recipients", + "receptionType": "to" + }, + { + "#tag-name": "execution-type", + "#value": "onAssignment" + } + ], + "#tag-name": "notification" + } + ], + "#tag-name": "actions" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "role-type", + "#value": "regular" + }, + { + "#tag-name": "name", + "#value": "Business Development Manager" + } + ], + "#tag-name": "role" + } + ], + "#tag-name": "roles" + } + ], + "#tag-name": "assignments" + }, + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "Manager Review", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "Reject", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + }, + { + "#tag-name": "name", + "#value": "reject" + }, + { + "#tag-name": "target", + "#value": "update" + }, + { + "#tag-name": "default", + "#value": "false" + } + ], + "#tag-name": "transition" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "Approve", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + }, + { + "#tag-name": "name", + "#value": "approve" + }, + { + "#tag-name": "target", + "#value": "approved" + }, + { + "#tag-name": "default", + "#value": "true" + } + ], + "#tag-name": "transition" + } + ], + "#tag-name": "transitions" + } + ], + "#tag-name": "task" + } + ], + "#tag-name": "workflow-definition", + "xmlns": "urn:liferay.com:liferay-workflow_7.4.0", + "xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "xsi:schemaLocation": "urn:liferay.com:liferay-workflow_7.4.0 http://www.liferay.com/dtd/liferay-workflow-definition_7_4_0.xsd" + }, "description": "An automated approval process that requires human review when specified.", "name": "D4B8 Hybrid Approver", "nodes": [ diff --git a/workspaces/liferay-sample-workspace/client-extensions/liferay-sample-batch/batch/workflow-definition.batch-engine-data.json b/workspaces/liferay-sample-workspace/client-extensions/liferay-sample-batch/batch/workflow-definition.batch-engine-data.json index bae5b576126115..4edc4b41ebb45e 100644 --- a/workspaces/liferay-sample-workspace/client-extensions/liferay-sample-batch/batch/workflow-definition.batch-engine-data.json +++ b/workspaces/liferay-sample-workspace/client-extensions/liferay-sample-batch/batch/workflow-definition.batch-engine-data.json @@ -21,7 +21,445 @@ "items": [ { "active": true, - "content": "\n\n\n\tA machine(function) approver can approve a workflow content.\n\t4\n\t\n\t\tcreated\n\t\t \n\t\ttrue\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tcreated_review_review\n\t\t\t\tmachine-review\n\t\t\t\ttrue\n\t\t\t\n\t\t\n\t\n\t\n\t\tapproved\n\t\t \n\t\t\n\t\t\t\n\t\t\t\tapprove\n\t\t\t\t\n\t\t\t\tgroovy\n\t\t\t\tonEntry\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\tupdate\n\t\t \n\t\t\n\t\t\t\n\t\t\t\treject\n\t\t\t\t\n\t\t\t\tgroovy\n\t\t\t\tonAssignment\n\t\t\t\n\t\t\t\n\t\t\t\tCreator Modification Notification\n\t\t\t\t\n\t\t\t\tfreemarker\n\t\t\t\temail\n\t\t\t\tuser-notification\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tonAssignment\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tresubmit\n\t\t\t\tmachine-review\n\t\t\t\ttrue\n\t\t\t\n\t\t\n\t\n\t\n\t\tmachine-review\n\t\tMachine Action reviews this entry.\n\t\t \n\t\t\n\t\t\t\n\t\t\t\tMachine Action\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfunction#liferay-sample-etc-spring-boot-workflow-action-1\n\t\t\t\t1\n\t\t\t\tonEntry\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\ttest\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tapprove\n\t\t\t\tapproved\n\t\t\t\ttrue\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\treject\n\t\t\t\tupdate\n\t\t\t\tfalse\n\t\t\t\n\t\t\n\t\n", + "content": { + "#child-nodes": [ + { + "#tag-name": "description", + "#value": "A machine(function) approver can approve a workflow content." + }, + { + "#tag-name": "version", + "#value": "4" + }, + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "created" + }, + { + "#cdata-value": [ + "", + " {", + " \"xy\": [", + " 165,", + " 76", + " ]", + " }", + " " + ], + "#tag-name": "metadata" + }, + { + "#tag-name": "initial", + "#value": "true" + }, + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "created", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "review", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + }, + { + "#tag-name": "name", + "#value": "created_review_review" + }, + { + "#tag-name": "target", + "#value": "machine-review" + }, + { + "#tag-name": "default", + "#value": "true" + } + ], + "#tag-name": "transition" + } + ], + "#tag-name": "transitions" + } + ], + "#tag-name": "state" + }, + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "approved" + }, + { + "#cdata-value": [ + "", + " {", + " \"terminal\": true,", + " \"xy\": [", + " 539,", + " 74", + " ]", + " }", + " " + ], + "#tag-name": "metadata" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "approve" + }, + { + "#tag-name": "status", + "#value": "0" + }, + { + "#tag-name": "execution-type", + "#value": "onEntry" + } + ], + "#tag-name": "action" + } + ], + "#tag-name": "actions" + }, + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "approved", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + } + ], + "#tag-name": "state" + }, + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "update" + }, + { + "#cdata-value": [ + "", + " {", + " \"xy\": [", + " 164,", + " 533", + " ]", + " }", + " " + ], + "#tag-name": "metadata" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "deny" + }, + { + "#tag-name": "status", + "#value": "4" + }, + { + "#tag-name": "priority", + "#value": "1" + }, + { + "#tag-name": "execution-type", + "#value": "onAssignment" + } + ], + "#tag-name": "action" + }, + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "pending" + }, + { + "#tag-name": "status", + "#value": "1" + }, + { + "#tag-name": "priority", + "#value": "2" + }, + { + "#tag-name": "execution-type", + "#value": "onAssignment" + } + ], + "#tag-name": "action" + }, + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "Creator Modification Notification" + }, + { + "#cdata-value": [ + "Your submission was rejected by ${userName}, please modify and resubmit." + ], + "#tag-name": "template" + }, + { + "#tag-name": "template-language", + "#value": "freemarker" + }, + { + "#tag-name": "notification-type", + "#value": "email" + }, + { + "#tag-name": "notification-type", + "#value": "user-notification" + }, + { + "#child-nodes": [ + { + "#tag-name": "user" + } + ], + "#tag-name": "recipients", + "receptionType": "to" + }, + { + "#tag-name": "execution-type", + "#value": "onAssignment" + } + ], + "#tag-name": "notification" + } + ], + "#tag-name": "actions" + }, + { + "#child-nodes": [ + { + "#tag-name": "user" + } + ], + "#tag-name": "assignments" + }, + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "update", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "resubmit", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + }, + { + "#tag-name": "name", + "#value": "resubmit" + }, + { + "#tag-name": "target", + "#value": "machine-review" + }, + { + "#tag-name": "default", + "#value": "true" + } + ], + "#tag-name": "transition" + } + ], + "#tag-name": "transitions" + } + ], + "#tag-name": "task" + }, + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "machine-review" + }, + { + "#tag-name": "description", + "#value": "Machine Action reviews this entry." + }, + { + "#cdata-value": [ + "", + " {", + " \"xy\": [", + " 165,", + " 292", + " ]", + " }", + " " + ], + "#tag-name": "metadata" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "name", + "#value": "Machine Action" + }, + { + "#tag-name": "description" + }, + { + "#tag-name": "script" + }, + { + "#tag-name": "script-language", + "#value": "function#liferay-sample-etc-spring-boot-workflow-action-1" + }, + { + "#tag-name": "priority", + "#value": "1" + }, + { + "#tag-name": "execution-type", + "#value": "onEntry" + } + ], + "#tag-name": "action" + } + ], + "#tag-name": "actions" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "screen-name", + "#value": "test" + } + ], + "#tag-name": "user" + } + ], + "#tag-name": "assignments" + }, + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "Machine review", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "approve", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + }, + { + "#tag-name": "name", + "#value": "approve" + }, + { + "#tag-name": "target", + "#value": "approved" + }, + { + "#tag-name": "default", + "#value": "true" + } + ], + "#tag-name": "transition" + }, + { + "#child-nodes": [ + { + "#child-nodes": [ + { + "#tag-name": "label", + "#value": "reject", + "language-id": "en_US" + } + ], + "#tag-name": "labels" + }, + { + "#tag-name": "name", + "#value": "reject" + }, + { + "#tag-name": "target", + "#value": "update" + }, + { + "#tag-name": "default", + "#value": "false" + } + ], + "#tag-name": "transition" + } + ], + "#tag-name": "transitions" + } + ], + "#tag-name": "task" + } + ], + "#tag-name": "workflow-definition", + "xmlns": "urn:liferay.com:liferay-workflow_7.4.0", + "xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "xsi:schemaLocation": "urn:liferay.com:liferay-workflow_7.4.0 http://www.liferay.com/dtd/liferay-workflow-definition_7_4_0.xsd" + }, "description": "A machine approved content workflow.", "name": "Machine Approver", "nodes": [