messages

package
v0.0.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 3 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CamundaCompleteRequest

type CamundaCompleteRequest struct {
	WorkerId  string                   `json:"workerId,omitempty"`
	Variables map[string]CamundaOutput `json:"localVariables,omitempty"`
}

https://github.com/camunda/camunda-docs-manual/blob/master/content/reference/rest/external-task/post-complete.md

type CamundaExternalTask

type CamundaExternalTask struct {
	Id                  string                     `json:"id,omitempty"`
	Variables           map[string]CamundaVariable `json:"variables,omitempty"`
	ActivityId          string                     `json:"activityId,omitempty"`
	Retries             int64                      `json:"retries"`
	ExecutionId         string                     `json:"executionId"`
	ProcessInstanceId   string                     `json:"processInstanceId"`
	ProcessDefinitionId string                     `json:"processDefinitionId"`
	TenantId            string                     `json:"tenantId"`
	Error               string                     `json:"errorMessage"`
}

https://github.com/camunda/camunda-docs-manual/blob/master/content/reference/rest/external-task/fetch.md

type CamundaFetchRequest

type CamundaFetchRequest struct {
	WorkerId string         `json:"workerId,omitempty"`
	MaxTasks int64          `json:"maxTasks,omitempty"`
	Topics   []CamundaTopic `json:"topics,omitempty"`
}

type CamundaOutput

type CamundaOutput struct {
	Type  string      `json:"type,omitempty"`
	Value interface{} `json:"value,omitempty"`
}

type CamundaRetrySetRequest

type CamundaRetrySetRequest struct {
	Retries int64 `json:"retries"`
}

type CamundaTopic

type CamundaTopic struct {
	Name         string `json:"topicName,omitempty"`
	LockDuration int64  `json:"lockDuration,omitempty"`
}

type CamundaVariable

type CamundaVariable struct {
	Type  string      `json:"type,omitempty"`
	Value interface{} `json:"value,omitempty"`
}

type Command

type Command struct {
	Version int64 `json:"version"`

	//modeling time
	Function         model.Function `json:"function"`
	CharacteristicId string         `json:"characteristic_id"`

	//optional modeling time (used to limit/filter device and service selection in deployment)
	DeviceClass *model.DeviceClass `json:"device_class,omitempty"`
	Aspect      *model.AspectNode  `json:"aspect,omitempty"`

	//deployment time
	DeviceGroupId string          `json:"device_group_id"`
	DeviceId      string          `json:"device_id,omitempty"`
	Device        *model.Device   `json:"device,omitempty"`
	ServiceId     string          `json:"service_id,omitempty"`
	Service       *model.Service  `json:"service,omitempty"`
	Protocol      *model.Protocol `json:"protocol,omitempty"`
	ProtocolId    string          `json:"protocol_id,omitempty"`

	//version <= 2
	Configurables        []marshaller.Configurable `json:"configurables,omitempty"`
	ContentVariableHints []string                  `json:"content_variable_hints,omitempty"`

	//version >= 3
	InputPaths      []string                    `json:"input_paths,omitempty"`
	OutputPath      string                      `json:"output_path,omitempty"`
	ConfigurablesV2 []marshaller.ConfigurableV2 `json:"configurables_v2,omitempty"`

	PreferEvent bool `json:"prefer_event"`

	//runtime
	Input  interface{} `json:"input,omitempty"`
	Output interface{} `json:"output,omitempty"`

	Retries int64 `json:"retries,omitempty"`
}

type EventRequest

type EventRequest struct {
	Device           model.Device
	Service          model.Service
	Protocol         model.Protocol
	CharacteristicId string
	FunctionId       string
	AspectNode       model.AspectNode
}

type GroupTaskMetadata

type GroupTaskMetadata struct {
	Parent   GroupTaskMetadataElement   `json:"parent"`
	Children []GroupTaskMetadataElement `json:"children"`
}

type GroupTaskMetadataElement

type GroupTaskMetadataElement struct {
	Command Command
	Task    CamundaExternalTask
}

type Incident

type Incident struct {
	Id                  string    `json:"id" bson:"id"`
	MsgVersion          int64     `json:"msg_version,omitempty" bson:"msg_version,omitempty"` //from version 3 onward will be set in KafkaIncidentsCommand and be copied to this field
	ExternalTaskId      string    `json:"external_task_id" bson:"external_task_id"`
	ProcessInstanceId   string    `json:"process_instance_id" bson:"process_instance_id"`
	ProcessDefinitionId string    `json:"process_definition_id" bson:"process_definition_id"`
	WorkerId            string    `json:"worker_id" bson:"worker_id"`
	ErrorMessage        string    `json:"error_message" bson:"error_message"`
	Time                time.Time `json:"time" bson:"time"`
	TenantId            string    `json:"tenant_id" bson:"tenant_id"`
	DeploymentName      string    `json:"deployment_name" bson:"deployment_name"`
}

type KafkaIncidentsCommand

type KafkaIncidentsCommand struct {
	Command             string    `json:"command"`
	MsgVersion          int64     `json:"msg_version"`
	Incident            *Incident `json:"incident,omitempty"`
	ProcessDefinitionId string    `json:"process_definition_id,omitempty"`
	ProcessInstanceId   string    `json:"process_instance_id,omitempty"`
}

type KafkaMessage

type KafkaMessage struct {
	Topic   string
	Key     string
	Payload string
}

type Metadata

type Metadata struct {
	Version              int64             `json:"version,omitempty"`
	Device               model.Device      `json:"device"`
	Service              model.Service     `json:"service"`
	Protocol             model.Protocol    `json:"protocol"`
	OutputPath           string            `json:"output_path,omitempty"`        //only for version >= 3
	OutputFunctionId     string            `json:"output_function_id,omitempty"` //only for version >= 3 if no OutputPath is known
	OutputAspectNode     *model.AspectNode `json:"output_aspect_node,omitempty"` //only for version >= 3 if no OutputPath is known
	InputCharacteristic  string            `json:"input_characteristic,omitempty"`
	OutputCharacteristic string            `json:"output_characteristic,omitempty"`
	ContentVariableHints []string          `json:"content_variable_hints,omitempty"` //only for version < 3
	ResponseTo           string            `json:"response_to"`
	ErrorTo              string            `json:"error_to,omitempty"`
}

type Overwrite

type Overwrite struct {
	DeviceId   string          `json:"device_id,omitempty"`
	Device     *model.Device   `json:"device,omitempty"`
	ServiceId  string          `json:"service_id,omitempty"`
	Service    *model.Service  `json:"service,omitempty"`
	Protocol   *model.Protocol `json:"protocol,omitempty"`
	ProtocolId string          `json:"protocol_id,omitempty"`
}

type ProtocolMsg

type ProtocolMsg struct {
	Request  ProtocolRequest  `json:"request"`
	Response ProtocolResponse `json:"response"`
	TaskInfo TaskInfo         `json:"task_info"`
	Metadata Metadata         `json:"metadata"`
	Trace    []Trace          `json:"trace,omitempty"`
}

type ProtocolRequest

type ProtocolRequest struct {
	Input map[string]string `json:"input"`
}

type ProtocolResponse

type ProtocolResponse struct {
	Output map[string]string `json:"output"`
}

type RequestInfo

type RequestInfo struct {
	Request      *KafkaMessage
	Event        *EventRequest
	Metadata     GroupTaskMetadataElement
	SubTaskState SubTaskState
}

type RequestInfoList

type RequestInfoList []RequestInfo

type SubTaskState

type SubTaskState struct {
	LastTry  time.Time
	TryCount int64
}

type TaskInfo

type TaskInfo struct {
	WorkerId            string `json:"worker_id"`
	TaskId              string `json:"task_id"`
	ProcessInstanceId   string `json:"process_instance_id"`
	ProcessDefinitionId string `json:"process_definition_id"`
	CompletionStrategy  string `json:"completion_strategy"`
	Time                string `json:"time"`
	TenantId            string `json:"tenant_id"`
}

type TaskWithDuplicateIndex

type TaskWithDuplicateIndex struct {
	Task           CamundaExternalTask
	DuplicateIndex int
}

type TimescaleRequest

type TimescaleRequest struct {
	Device     model.Device
	Service    model.Service
	ColumnName string
}

type TimescaleResponse

type TimescaleResponse struct {
	Time  *string     `json:"time"`
	Value interface{} `json:"value"`
}

type Trace

type Trace struct {
	TimeUnit  string `json:"time_unit"`
	Timestamp int64  `json:"timestamp"`
	Location  string `json:"location"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL