@burgan-tech/vnext-core-runtime
Version:
vNext Core Domain - Runtime Package for engine deployment
765 lines • 23 kB
JSON
{
"key": "task",
"version": "1.0.0",
"domain": "core",
"flow": "sys-schemas",
"flowVersion": "1.0.0",
"tags": [
"core",
"schema",
"task",
"polymorphic"
],
"attributes": {
"type": "task",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://vnext.io/schemas/core/task.json",
"title": "Task Definition",
"description": "Polymorphic task definitions. Uses different configuration schemas based on task type.",
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Task type (TaskType enum value as string)",
"enum": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14"
]
},
"config": {
"type": "object",
"description": "Task configuration object"
}
},
"required": [
"type",
"config"
],
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "1"
}
}
},
"then": {
"title": "DaprHttpEndpoint Task",
"properties": {
"type": {
"const": "1"
},
"config": {
"type": "object",
"description": "Dapr HTTP Endpoint configuration",
"properties": {
"endpointName": {
"type": "string",
"description": "Dapr HTTP endpoint name",
"minLength": 1
},
"path": {
"type": "string",
"description": "HTTP endpoint path",
"minLength": 1
},
"method": {
"type": "string",
"description": "HTTP method",
"enum": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH"
],
"default": "GET"
},
"body": {
"type": "object",
"description": "Service call body"
}
},
"required": [
"endpointName",
"path",
"method"
],
"additionalProperties": false
}
},
"required": [
"type",
"config"
],
"additionalProperties": false
}
},
{
"if": {
"properties": {
"type": {
"const": "2"
}
}
},
"then": {
"title": "DaprBinding Task",
"properties": {
"type": {
"const": "2"
},
"config": {
"type": "object",
"description": "Dapr Binding configuration",
"properties": {
"bindingName": {
"type": "string",
"description": "Dapr binding name",
"minLength": 1
},
"operation": {
"type": "string",
"description": "Binding operation",
"minLength": 1
},
"metadata": {
"type": "object",
"description": "Binding metadata information"
},
"data": {
"type": "object",
"description": "Binding data information"
}
},
"required": [
"bindingName",
"operation"
],
"additionalProperties": false
}
},
"required": [
"type",
"config"
],
"additionalProperties": false
}
},
{
"if": {
"properties": {
"type": {
"const": "3"
}
}
},
"then": {
"title": "DaprService Task",
"properties": {
"type": {
"const": "3"
},
"config": {
"type": "object",
"description": "Dapr Service configuration",
"properties": {
"appId": {
"type": "string",
"description": "Dapr app ID",
"minLength": 1
},
"methodName": {
"type": "string",
"description": "Service method name",
"minLength": 1
},
"httpVerb": {
"type": "string",
"description": "HTTP verb",
"enum": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH"
]
},
"body": {
"type": "object",
"description": "Service call body"
},
"headers": {
"type": "object",
"description": "Service call headers"
},
"queryString": {
"type": "string",
"description": "Query string parameters"
},
"timeoutSeconds": {
"type": "integer",
"description": "Timeout duration (seconds)",
"minimum": 1,
"default": 30
}
},
"required": [
"appId",
"methodName"
],
"additionalProperties": false
}
},
"required": [
"type",
"config"
],
"additionalProperties": false
}
},
{
"if": {
"properties": {
"type": {
"const": "4"
}
}
},
"then": {
"title": "DaprPubSub Task",
"properties": {
"type": {
"const": "4"
},
"config": {
"type": "object",
"description": "Dapr PubSub configuration",
"properties": {
"pubSubName": {
"type": "string",
"description": "PubSub component name",
"minLength": 1
},
"topic": {
"type": "string",
"description": "Topic name",
"minLength": 1
},
"data": {
"type": "object",
"description": "Message data"
},
"metadata": {
"type": "object",
"description": "Message metadata"
}
},
"required": [
"pubSubName",
"topic"
],
"additionalProperties": false
}
},
"required": [
"type",
"config"
],
"additionalProperties": false
}
},
{
"if": {
"properties": {
"type": {
"const": "5"
}
}
},
"then": {
"title": "Human Task",
"properties": {
"type": {
"const": "5"
},
"config": {
"type": "object",
"description": "Human Task configuration",
"properties": {
"title": {
"type": "string",
"description": "Task title",
"minLength": 1
},
"instructions": {
"type": "string",
"description": "Task instructions",
"minLength": 1
},
"assignedTo": {
"type": "string",
"description": "Assigned person/group",
"minLength": 1
},
"dueDate": {
"type": [
"string",
"null"
],
"description": "Due date (ISO 8601 format)",
"format": "date-time"
},
"form": {
"description": "Form definition in JSON format"
},
"reminderIntervalMinutes": {
"type": "integer",
"description": "Reminder interval (minutes)",
"minimum": 0
},
"escalationTimeoutMinutes": {
"type": "integer",
"description": "Escalation timeout (minutes)",
"minimum": 0
},
"escalationAssignee": {
"type": "string",
"description": "Person/group to be assigned for escalation"
}
},
"required": [
"title",
"instructions",
"assignedTo"
],
"additionalProperties": false
}
},
"required": [
"type",
"config"
],
"additionalProperties": false
}
},
{
"if": {
"properties": {
"type": {
"const": "6"
}
}
},
"then": {
"title": "Http Task",
"properties": {
"type": {
"const": "6"
},
"config": {
"type": "object",
"description": "HTTP Task configuration",
"properties": {
"url": {
"type": "string",
"description": "HTTP URL"
},
"method": {
"type": "string",
"description": "HTTP method",
"enum": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH"
],
"default": "GET"
},
"headers": {
"type": "object",
"description": "HTTP header information"
},
"body": {
"type": "object",
"description": "HTTP request body"
},
"timeoutSeconds": {
"type": "integer",
"description": "Timeout duration (seconds)",
"minimum": 1,
"default": 30
},
"validateSsl": {
"type": "boolean",
"description": "Whether SSL validation should be performed",
"default": true
}
},
"required": [
"url",
"method"
],
"additionalProperties": false
}
},
"required": [
"type",
"config"
],
"additionalProperties": false
}
},
{
"if": {
"properties": {
"type": {
"const": "7"
}
}
},
"then": {
"title": "Script Task",
"properties": {
"type": {
"const": "7"
},
"config": {
"type": "object",
"description": "Script Task configuration",
"properties": {},
"additionalProperties": false
}
},
"required": [
"type",
"config"
],
"additionalProperties": false
}
},
{
"if": {
"properties": {
"type": {
"const": "10"
}
}
},
"then": {
"properties": {
"type": {
"const": "10"
},
"config": {
"type": "object",
"description": "Notification Binding configuration",
"properties": {
"metadata": {
"type": "object",
"description": "Binding metadata"
}
},
"required": [
"metadata"
],
"additionalProperties": false
}
},
"required": [
"type",
"config"
],
"additionalProperties": false
}
},
{
"if": {
"properties": {
"type": {
"const": "11"
}
}
},
"then": {
"title": "Start Trigger Task",
"properties": {
"type": {
"const": "11"
},
"config": {
"type": "object",
"description": "Start Trigger Task configuration - Creates a new workflow instance",
"properties": {
"flow": {
"type": "string",
"description": "Target workflow name",
"minLength": 1,
"pattern": "^[a-z0-9-]+$"
},
"domain": {
"type": "string",
"description": "Target workflow domain",
"minLength": 1
},
"body": {
"type": "object",
"description": "Request body data to send with the start request"
},
"sync": {
"type": "boolean",
"description": "Whether to execute synchronously"
},
"version": {
"type": "string",
"description": "Target workflow version"
},
"key": {
"type": "string",
"description": "Target instance key"
},
"tags": {
"type": "array",
"description": "Tags for the workflow instance",
"items": {
"type": "string"
}
}
},
"required": [
"flow",
"domain"
],
"additionalProperties": false
}
},
"required": [
"type",
"config"
],
"additionalProperties": false
}
},
{
"if": {
"properties": {
"type": {
"const": "12"
}
}
},
"then": {
"title": "Direct Trigger Task",
"properties": {
"type": {
"const": "12"
},
"config": {
"type": "object",
"description": "Direct Trigger Task configuration - Executes a transition on a target workflow instance",
"properties": {
"flow": {
"type": "string",
"description": "Target workflow name",
"minLength": 1,
"pattern": "^[a-z0-9-]+$"
},
"domain": {
"type": "string",
"description": "Target workflow domain",
"minLength": 1
},
"transitionName": {
"type": "string",
"description": "Transition name to execute",
"minLength": 1
},
"body": {
"type": "object",
"description": "Request body data to send with the transition request"
},
"sync": {
"type": "boolean",
"description": "Whether to execute synchronously"
},
"version": {
"type": "string",
"description": "Target workflow version"
},
"key": {
"type": "string",
"description": "Target instance key (optional, used to resolve instance ID)"
},
"instanceId": {
"type": "string",
"description": "Target instance ID (optional, takes priority over key)",
"format": "uuid"
},
"tags": {
"type": "array",
"description": "Tags for the workflow instance",
"items": {
"type": "string"
}
}
},
"required": [
"flow",
"domain",
"transitionName"
],
"additionalProperties": false
}
},
"required": [
"type",
"config"
],
"additionalProperties": false
}
},
{
"if": {
"properties": {
"type": {
"const": "13"
}
}
},
"then": {
"title": "Get Instance Data Task",
"properties": {
"type": {
"const": "13"
},
"config": {
"type": "object",
"description": "Get Instance Data Task configuration - Retrieves instance data from a workflow instance",
"properties": {
"flow": {
"type": "string",
"description": "Target workflow name",
"minLength": 1,
"pattern": "^[a-z0-9-]+$"
},
"domain": {
"type": "string",
"description": "Target workflow domain",
"minLength": 1
},
"key": {
"type": "string",
"description": "Target instance key (optional, used directly as instance identifier)"
},
"instanceId": {
"type": "string",
"description": "Target instance ID (optional, takes priority over key)",
"format": "uuid"
},
"extensions": {
"type": "array",
"description": "Data extensions to include for enrichment",
"items": {
"type": "string",
"minLength": 1
}
}
},
"required": [
"flow",
"domain"
],
"additionalProperties": false
}
},
"required": [
"type",
"config"
],
"additionalProperties": false
}
},
{
"if": {
"properties": {
"type": {
"const": "14"
}
}
},
"then": {
"title": "SubProcess Task",
"properties": {
"type": {
"const": "14"
},
"config": {
"type": "object",
"description": "SubProcess Task configuration - Starts a subprocess workflow",
"properties": {
"flow": {
"type": "string",
"description": "Target workflow name",
"minLength": 1,
"pattern": "^[a-z0-9-]+$"
},
"domain": {
"type": "string",
"description": "Target workflow domain",
"minLength": 1
},
"body": {
"type": "object",
"description": "Request body data to send with the subprocess request"
},
"version": {
"type": "string",
"description": "SubFlow version in Major.Minor.Patch format",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"key": {
"type": "string",
"description": "Target instance key"
},
"tags": {
"type": "array",
"description": "Tags for the subprocess instance",
"items": {
"type": "string"
}
}
},
"required": [
"flow",
"domain"
],
"additionalProperties": false
}
},
"required": [
"type",
"config"
],
"additionalProperties": false
}
}
],
"additionalProperties": false
}
}
}