UNPKG

@burgan-tech/vnext-core-runtime

Version:

vNext Core Domain - Runtime Package for engine deployment

1,292 lines 146 kB
{ "key": "workflow", "version": "1.0.0", "domain": "core", "flow": "sys-schemas", "flowVersion": "1.0.0", "tags": [ "core", "workflow", "stateMachine", "schema" ], "attributes": { "type": "workflow", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://vnext.io/schemas/core/workflow.json", "title": "Workflow Definition", "description": "Schema that configures workflow definitions in vNext platform. Only defines workflow attributes structure.", "type": "object", "properties": { "timeout": { "anyOf": [ { "type": "object", "description": "Workflow timeout configuration", "required": [ "key", "target", "versionStrategy", "timer" ], "properties": { "_comment": { "type": "string", "description": "Comment about the timeout" }, "key": { "type": "string", "description": "Timeout key value", "pattern": "^[a-z0-9-]+$", "maxLength": 255 }, "target": { "type": "string", "description": "Target state in case of timeout", "pattern": "^[a-z0-9-]+$", "maxLength": 255 }, "versionStrategy": { "type": "string", "enum": [ "Minor", "Major" ], "description": "Version strategy after timeout", "maxLength": 50 }, "timer": { "type": "object", "required": [ "reset", "duration" ], "properties": { "reset": { "type": "string", "description": "Timer reset strategy" }, "duration": { "type": "string", "pattern": "^P(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$", "description": "Duration information (in ISO 8601 format)", "maxLength": 100 } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "null" } ], "description": "Workflow general timeout definition" }, "type": { "oneOf": [ { "const": "C", "description": "Core workflow type" }, { "const": "F", "description": "Flow workflow type" }, { "const": "S", "description": "SubFlow workflow type" }, { "const": "P", "description": "Sub Process workflow type" } ], "description": "Workflow type" }, "labels": { "type": "array", "items": { "type": "object", "required": [ "label", "language" ], "properties": { "label": { "type": "string", "description": "Text content to be displayed to the user", "maxLength": 500 }, "language": { "type": "string", "description": "Language code in ISO 639 format", "pattern": "^[a-z]{2}(-[A-Z]{2})?$", "maxLength": 10 } }, "additionalProperties": false }, "minItems": 1, "examples": [ [ { "label": "User Login", "language": "en-US" }, { "label": "Kullanıcı Girişi", "language": "tr-TR" } ], [ { "label": "Data Processing", "language": "en-US" }, { "label": "Veri İşleme", "language": "tr-TR" } ] ], "description": "Multi-language labels of the workflow" }, "functions": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "description": "Key value of the referenced record (readable identifier)", "pattern": "^[a-z0-9-]+$", "maxLength": 255 }, "domain": { "type": "string", "description": "Domain where the referenced record is located (required for cross-domain references)", "pattern": "^[a-zA-Z\\-]+$", "maxLength": 100, "examples": [ "core", "idm", "banking", "payment" ] }, "flow": { "type": "string", "description": "Flow name where the referenced record is located", "pattern": "^[a-z\\-]+$", "maxLength": 100 }, "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$", "description": "Version information of the referenced record (in semantic versioning MAJOR.MINOR.PATCH format)", "maxLength": 50 } }, "required": [ "key", "domain", "flow", "version" ], "additionalProperties": false, "examples": [ { "key": "user-authentication-workflow", "domain": "idm", "flow": "user-authentication", "version": "1.0.0" }, { "key": "user-login-state", "domain": "core", "flow": "authentication", "version": "2.1.0" }, { "key": "payment-validation-task", "domain": "banking", "flow": "payment-process", "version": "1.2.3" } ] }, "description": "Function references associated with the workflow" }, "sharedTransitions": { "type": "array", "items": { "allOf": [ { "type": "object", "properties": { "_comment": { "type": "string", "description": "Comment about the transition" }, "key": { "type": "string", "description": "Transition key value. Used in transition requests and is unique within the flow.", "pattern": "^[a-z0-9-]+$", "maxLength": 255 }, "target": { "type": "string", "description": "State key that will be reached when the transition is successfully completed. Can be a state key or special keyword like $self", "pattern": "^(\\$self|[a-z0-9-]+)$", "maxLength": 255 }, "from": { "type": "string", "description": "Source state key", "pattern": "^[a-zA-Z0-9\\-]+$", "maxLength": 255 }, "versionStrategy": { "type": "string", "enum": [ "Minor", "Major" ], "description": "Version increment strategy after successful transition", "maxLength": 50 }, "triggerType": { "type": "integer", "enum": [ 0, 1, 2, 3 ], "description": "Trigger type. 0=Manual, 1=Automatic, 2=Timeout, 3=Event" }, "availableIn": { "type": "array", "items": { "type": "string" }, "description": "List of states where this transition can be used" }, "schema": { "anyOf": [ { "type": "object", "properties": { "key": { "type": "string", "description": "Key value of the referenced record (readable identifier)", "pattern": "^[a-z0-9-]+$", "maxLength": 255 }, "domain": { "type": "string", "description": "Domain where the referenced record is located (required for cross-domain references)", "pattern": "^[a-zA-Z\\-]+$", "maxLength": 100, "examples": [ "core", "idm", "banking", "payment" ] }, "flow": { "type": "string", "description": "Flow name where the referenced record is located", "pattern": "^[a-zA-Z\\-]+$", "maxLength": 100 }, "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$", "description": "Version information of the referenced record (in semantic versioning MAJOR.MINOR.PATCH format)", "maxLength": 50 } }, "required": [ "key", "domain", "flow", "version" ], "additionalProperties": false, "examples": [ { "key": "user-authentication-workflow", "domain": "idm", "flow": "user-authentication", "version": "1.0.0" }, { "key": "user-login-state", "domain": "core", "flow": "authentication", "version": "2.1.0" }, { "key": "payment-validation-task", "domain": "banking", "flow": "payment-process", "version": "1.2.3" } ] }, { "type": "null" } ], "description": "Data schema reference that must be sent to execute the transition" }, "rule": { "anyOf": [ { "type": "object", "required": [ "code" ], "properties": { "code": { "type": "string", "description": "Rule code" }, "location": { "type": "string", "description": "Location of the code file" }, "encoding": { "type": "string", "enum": [ "B64", "NAT" ], "default": "B64", "description": "Encoding type. B64=Base64 (default), NAT=Native" } }, "additionalProperties": false }, { "type": "null" } ], "description": "Code where the rule is defined if rule-based progression will occur" }, "timer": { "anyOf": [ { "type": "object", "required": [ "code" ], "properties": { "code": { "type": "string", "description": "Timer code" }, "location": { "type": "string", "description": "Location of the code file" }, "encoding": { "type": "string", "enum": [ "B64", "NAT" ], "default": "B64", "description": "Encoding type. B64=Base64 (default), NAT=Native" } }, "additionalProperties": false }, { "type": "null" } ], "description": "Timing information if the transition will run automatically" }, "labels": { "type": "array", "items": { "type": "object", "required": [ "label", "language" ], "properties": { "label": { "type": "string", "description": "Text content to be displayed to the user", "maxLength": 500 }, "language": { "type": "string", "description": "Language code in ISO 639 format", "pattern": "^[a-z]{2}(-[A-Z]{2})?$", "maxLength": 10 } }, "additionalProperties": false }, "minItems": 1, "examples": [ [ { "label": "User Login", "language": "en" }, { "label": "Kullanıcı Girişi", "language": "tr" } ], [ { "label": "Data Processing", "language": "en-US" }, { "label": "Veri İşleme", "language": "tr-TR" } ] ], "description": "Multi-language transition name" }, "view": { "anyOf": [ { "type": "object", "properties": { "extensions": { "type": "array", "items": { "type": "string" }, "description": "List of extensions to be applied to the View." }, "loadData": { "type": "boolean", "description": "Specifies whether data will be loaded for the View." }, "view": { "anyOf": [ { "type": "object", "properties": { "key": { "type": "string", "description": "Key value of the referenced record (readable identifier)", "pattern": "^[a-z0-9-]+$", "maxLength": 255 }, "domain": { "type": "string", "description": "Domain where the referenced record is located (required for cross-domain references)", "pattern": "^[a-zA-Z\\-]+$", "maxLength": 100, "examples": [ "core", "idm", "banking", "payment" ] }, "flow": { "type": "string", "description": "Flow name where the referenced record is located", "pattern": "^[a-z\\-]+$", "maxLength": 100 }, "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$", "description": "Version information of the referenced record (in semantic versioning MAJOR.MINOR.PATCH format)", "maxLength": 50 } }, "required": [ "key", "domain", "flow", "version" ], "additionalProperties": false, "examples": [ { "key": "user-authentication-workflow", "domain": "idm", "flow": "user-authentication", "version": "1.0.0" }, { "key": "user-login-state", "domain": "core", "flow": "authentication", "version": "2.1.0" }, { "key": "payment-validation-task", "domain": "banking", "flow": "payment-process", "version": "1.2.3" } ] }, { "type": "null" } ], "description": "View reference" } }, "required": [ "view" ] }, { "type": "null" } ] }, "onExecutionTasks": { "type": "array", "items": { "type": "object", "required": [ "order", "task", "mapping" ], "properties": { "_comment": { "type": "string", "description": "Comment about the task" }, "order": { "type": "integer", "minimum": 1, "description": "Task execution order" }, "task": { "type": "object", "properties": { "key": { "type": "string", "description": "Key value of the referenced record (readable identifier)", "pattern": "^[a-zA-Z0-9\\-]+$", "maxLength": 255 }, "domain": { "type": "string", "description": "Domain where the referenced record is located (required for cross-domain references)", "pattern": "^[a-zA-Z\\-]+$", "maxLength": 100, "examples": [ "core", "idm", "banking", "payment" ] }, "flow": { "type": "string", "description": "Flow name where the referenced record is located", "pattern": "^[a-z\\-]+$", "maxLength": 100 }, "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$", "description": "Version information of the referenced record (in semantic versioning MAJOR.MINOR.PATCH format)", "maxLength": 50 } }, "required": [ "key", "domain", "flow", "version" ], "additionalProperties": false, "examples": [ { "key": "user-authentication-workflow", "domain": "idm", "flow": "user-authentication", "version": "1.0.0" }, { "key": "user-login-state", "domain": "core", "flow": "authentication", "version": "2.1.0" }, { "key": "payment-validation-task", "domain": "banking", "flow": "payment-process", "version": "1.2.3" } ], "description": "Task reference to be executed" }, "mapping": { "anyOf": [ { "type": "object", "properties": { "type": { "const": "G", "description": "Global mapping - code and location not required" }, "code": { "type": "string", "description": "Mapping code" }, "location": { "type": "string", "description": "Code file location" }, "encoding": { "type": "string", "enum": [ "B64", "NAT" ], "default": "B64", "description": "Encoding type. B64=Base64 (default), NAT=Native" } }, "additionalProperties": false }, { "type": "object", "properties": { "type": { "oneOf": [ { "const": "L", "description": "Local mapping - code is required, location is optional" } ], "description": "Mapping type" }, "code": { "type": "string", "description": "Mapping code" }, "location": { "type": "string", "description": "Code file location" }, "encoding": { "type": "string", "enum": [ "B64", "NAT" ], "default": "B64", "description": "Encoding type. B64=Base64 (default), NAT=Native" } }, "required": [ "code" ], "additionalProperties": false }, { "type": "object", "properties": { "code": { "type": "string", "description": "Mapping code" }, "location": { "type": "string", "description": "Code file location" }, "encoding": { "type": "string", "enum": [ "B64", "NAT" ], "default": "B64", "description": "Encoding type. B64=Base64 (default), NAT=Native" } }, "required": [ "code" ], "additionalProperties": false } ], "description": "Mapping definition" } }, "additionalProperties": false }, "description": "Tasks to be executed when the transition is triggered" }, "mapping": { "anyOf": [ { "type": "object", "properties": { "type": { "const": "G", "description": "Global mapping - code and location not required" }, "code": { "type": "string", "description": "Mapping code" }, "location": { "type": "string", "description": "Code file location" }, "encoding": { "type": "string", "enum": [ "B64", "NAT" ], "default": "B64", "description": "Encoding type. B64=Base64 (default), NAT=Native" } }, "additionalProperties": false }, { "type": "object", "properties": { "type": { "oneOf": [ { "const": "L", "description": "Local mapping - code is required, location is optional" } ], "description": "Mapping type" }, "code": { "type": "string", "description": "Mapping code" }, "location": { "type": "string", "description": "Code file location" }, "encoding": { "type": "string", "enum": [ "B64", "NAT" ], "default": "B64", "description": "Encoding type. B64=Base64 (default), NAT=Native" } }, "required": [ "code" ], "additionalProperties": false }, { "type": "object", "properties": { "code": { "type": "string", "description": "Mapping code" }, "location": { "type": "string", "description": "Code file location" }, "encoding": { "type": "string", "enum": [ "B64", "NAT" ], "default": "B64", "description": "Encoding type. B64=Base64 (default), NAT=Native" } }, "required": [ "code" ], "additionalProperties": false }, { "type": "null" } ], "description": "Optional mapping definition for transition input data transformation" } }, "required": [ "key", "target", "versionStrategy", "triggerType", "labels" ], "additionalProperties": false }, { "type": "object", "required": [ "availableIn" ], "properties": { "availableIn": { "type": "array", "items": { "type": "string" }, "description": "List of states where this transition can be used" } } }, { "if": { "properties": { "triggerType": { "const": 1 } } }, "then": { "properties": { "mapping": { "const": null } } } } ] }, "description": "Common transitions that can be used in multiple states" }, "extensions": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "description": "Key value of the referenced record (readable identifier)", "pattern": "^[a-z0-9-]+$", "maxLength": 255 }, "domain": { "type": "string", "description": "Domain where the referenced record is located (required for cross-domain references)", "pattern": "^[a-zA-Z\\-]+$", "maxLength": 100, "examples": [ "core", "idm", "banking", "payment" ] }, "flow": { "type": "string", "description": "Flow name where the referenced record is located", "pattern": "^[a-z\\-]+$", "maxLength": 100 }, "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$", "description": "Version information of the referenced record (in semantic versioning MAJOR.MINOR.PATCH format)", "maxLength": 50 } }, "required": [ "key", "domain", "flow", "version" ], "additionalProperties": false, "examples": [ { "key": "user-authentication-workflow", "domain": "idm", "flow": "user-authentication", "version": "1.0.0" }, { "key": "user-login-state", "domain": "core", "flow": "authentication", "version": "2.1.0" }, { "key": "payment-validation-task", "domain": "banking", "flow": "payment-process", "version": "1.2.3" } ] }, "description": "Extension references associated with the workflow" }, "features": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "description": "Key value of the referenced record (readable identifier)", "pattern": "^[a-z0-9-]+$", "maxLength": 255 }, "domain": { "type": "string", "description": "Domain where the referenced record is located (required for cross-domain references)", "pattern": "^[a-zA-Z\\-]+$", "maxLength": 100, "examples": [ "core", "idm", "banking", "payment" ] }, "flow": { "type": "string", "description": "Flow name where the referenced record is located", "pattern": "^[a-z0-9-]+$", "maxLength": 100 }, "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$", "description": "Version information of the referenced record (in semantic versioning MAJOR.MINOR.PATCH format)", "maxLength": 50 } }, "required": [ "key", "domain", "flow", "version" ], "additionalProperties": false, "examples": [ { "key": "user-authentication-workflow", "domain": "idm", "flow": "user-authentication", "version": "1.0.0" }, { "key": "user-login-state", "domain": "core", "flow": "authentication", "version": "2.1.0" }, { "key": "payment-validation-task", "domain": "banking", "flow": "payment-process", "version": "1.2.3" } ] }, "description": "Feature references associated with the workflow" }, "startTransition": { "type": "object", "properties": { "_comment": { "type": "string", "description": "Comment about the transition" }, "key": { "type": "string", "description": "Geçişin anahtar değeri. Geçiş talebinde kullanılır ve akış özelinde tekildir.", "pattern": "^[a-z0-9-]+$", "maxLength": 255 }, "target": { "type": "string", "description": "Geçiş başarılı tamamlandığında erişeceği state key'i", "pattern": "^[a-z0-9-]+$", "maxLength": 255 }, "from": { "type": "string", "description": "Kaynak state key'i", "pattern": "^[a-z0-9-]+$", "maxLength": 255 }, "versionStrategy": { "type": "string", "enum": [ "Minor", "Major" ], "description": "Başarılı geçiş sonrasında versiyon artış stratejisi", "maxLength": 50 }, "triggerType": { "type": "integer", "enum": [ 0, 2, 3 ], "description": "Trigger türü. 0=Manual, 2=Timeout, 3=Event. Auto-transition (1) is not allowed for startTransition" }, "schema": { "anyOf": [ { "type": "object", "properties": { "key": { "type": "string", "description": "Key value of the referenced record (readable identifier)", "pattern": "^[a-z0-9-]+$", "maxLength": 255 }, "domain": { "type": "string", "description": "Domain where the referenced record is located (required for cross-domain references)", "pattern": "^[a-zA-Z\\-]+$", "maxLength": 100, "examples": [ "core", "idm", "banking", "payment" ] }, "flow": { "type": "string", "description": "Flow name where the referenced record is located", "pattern": "^[a-z0-9-]+$", "maxLength": 100 }, "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$", "description": "Version information of the referenced record (in semantic versioning MAJOR.MINOR.PATCH format)", "maxLength": 50 } }, "required": [ "key", "domain", "flow", "version" ], "additionalProperties": false, "examples": [ { "key": "user-authentication-workflow", "domain": "idm", "flow": "user-authentication", "version": "1.0.0" }, { "key": "user-login-state", "domain": "core", "flow": "authentication", "version": "2.1.0" }, { "key": "payment-validation-task", "domain": "banking", "flow": "payment-process", "version": "1.2.3" } ] }, { "type": "null" } ], "description": "Geçişi çalıştırmak için gönderilmesi gereken veri şeması referansı" }, "labels": { "type": "array", "items": { "type": "object", "required": [ "label", "language" ], "properties": { "label": { "type": "string", "description": "Text content to be displayed to the user", "maxLength": 500 }, "language": { "type": "string", "description": "Language code in ISO 639 format", "pattern": "^[a-z]{2}(-[A-Z]{2})?$", "maxLength": 10 } }, "additionalProperties": false }, "minItems": 1, "examples": [ [ { "label": "User Login", "language": "en" }, { "label": "Kullanıcı Girişi", "language": "tr" } ], [ { "label": "Data Processing", "language": "en-US" }, { "label": "Veri İşleme", "language": "tr-TR" } ] ], "description": "Çok dilli geçiş ismi" }, "onExecutionTasks": { "type": "array", "items": { "type": "object", "required": [ "order", "task", "mapping" ], "properties": { "_comment": { "type": "string", "description": "Comment about the task" }, "order": { "type": "integer", "minimum": 1, "description": "Görevin çalışma sırası" }, "task": { "type": "object", "properties": { "key": { "type": "string", "description": "Key value of the referenced record (readable identifier)", "pattern": "^[a-z0-9-]+$", "maxLength": 255 }, "domain": { "type": "string", "description": "Domain where the referenced record is located (required for cross-domain references)", "pattern": "^[a-zA-Z\\-]+$", "maxLength": 100, "examples": [ "core", "idm", "banking", "payment" ] }, "flow": { "type": "string", "description": "Flow name where the referenced record is located", "pattern": "^[a-z\\-]+$", "maxLength": 100 }, "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$", "description": "Version information of the referenced record (in semantic versioning MAJOR.MINOR.PATCH format)", "maxLength": 50 } }, "required": [ "key", "domain", "flow", "version" ], "additionalProperties": false, "examples": [ { "key": "user-authentication-workflow", "domain": "idm", "flow": "user-authentication", "version": "1.0.0" }, { "key": "user-login-state", "domain": "core", "flow": "authentication", "version": "2.1.0" }, { "key": "payment-validation-task", "domain": "banking", "flow": "payment-process", "version": "1.2.3" } ], "description": "Task reference to be run" }, "mapping": { "anyOf": [ { "type": "object", "properties": { "type": { "const": "G", "description": "Global mapping - code and location not required" }, "code": { "type": "string", "description": "Mapping code" }, "location": { "type": "string", "description": "Code file location" }, "encoding": { "type": "string", "enum": [ "B64", "NAT" ], "default": "B64", "description": "Encoding type. B64=Base64 (default), NAT=Native" } }, "additionalProperties": false }, { "type": "object", "properties": { "type": { "oneOf": [ { "const": "L", "description": "Local mapping - code is required, location is optional