deprecated

package
v0.47.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 19 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package deprecated serves the HTTP APIs of the services the engine replaces, under /deprecated/ (API-02). Kong rewrites the old paths onto it (API-08), e.g. /process/engine/v2/deployments/{id}/start onto /deprecated/engine/v2/deployments/{id}/start.

The layer only translates onto the API of the engine, with the token of the caller; it has no logic and no storage of its own, so that it can be removed without side effects (API-03). Old identifiers map onto new ones without a table: a deployment keeps its id, a process definition id is deplid_<id>:<version>:<id>, a business key is the instance id. Only routes with known callers are served (decided for M7); status codes follow the new API.

Index

Constants

View Source
const Prefix = "/deprecated"

Prefix of all routes of the layer.

Variables

This section is empty.

Functions

func DeploymentInput

func DeploymentInput(ctx context.Context, c Converter, token string, namespace string, old models.Deployment, source string) (model.DeploymentInput, model.Conversion, error)

DeploymentInput turns a deployment of process-deployment (format version 3) into the input of the engine: the BPMN rewritten, device selections as selections, changed values as parameters. The migration uses it as well (MIG-01) and reports the conversion, which is also returned when unsupported parts reject the deployment (MIG-04).

Types

type AnalyticsInfo

type AnalyticsInfo struct {
	FlowId string `json:"flow_id"`
	Name   string `json:"name"`
	Desc   string `json:"desc"`
}

type BpmnResource

type BpmnResource struct {
	Id string `json:"id"`
}

type CamundaDeployment

type CamundaDeployment struct {
	Id             string `json:"id"`
	Name           string `json:"name"`
	Source         string `json:"source"`
	DeploymentTime string `json:"deploymentTime"`
	TenantId       string `json:"tenantId"`
}

type Controller added in v0.16.1

type Controller interface {
	api.Controller
	// PutModel creates a model with the given id or stores a new version of it, as the old
	// repositories did (SNRGY-5035)
	PutModel(ctx context.Context, token string, namespace string, id string, input model.ModelInput) (model.Model, error)
	// Rights names the rights the caller holds on resources, which permissions_info shows
	Rights(ctx context.Context, token string, namespace string, kind model.Kind, ids []string) (map[string]model.Rights, error)
	// DeploymentVersions reads the versions of a list of deployments in one go, which the lists
	// of releases need for every element
	DeploymentVersions(ctx context.Context, token string, namespace string, ids []string, current bool, limit int, offset int) ([]model.DeploymentVersion, int, error)
	// CurrentModelVersions reads the current versions of a list of models in one go, which the
	// lists of processes and designs need for every element
	CurrentModelVersions(ctx context.Context, token string, namespace string, ids []string) (map[string]model.ModelVersion, error)
}

Controller is the API with what the old APIs need beyond it.

type Converter

type Converter interface {
	Convert(ctx context.Context, token string, namespace string, xml string) (model.Conversion, error)
}

Converter rewrites models of Camunda (MIG-04).

type Count

type Count struct {
	Count int `json:"count"`
}

type Counter

type Counter interface {
	DeprecatedRequest(route string)
}

Counter counts requests per route (API-03).

type Dependencies

type Dependencies struct {
	DeploymentId string             `json:"deployment_id"`
	Owner        string             `json:"owner"`
	Devices      []DeviceDependency `json:"devices"`
	Events       []EventDependency  `json:"events"`
}

type DeploymentDisabled

type DeploymentDisabled struct {
	Disabled *bool `json:"disabled"`
}

type DeploymentMetadata

type DeploymentMetadata struct {
	CamundaDeploymentId string              `json:"camunda_deployment_id"`
	ProcessParameter    map[string]Variable `json:"process_parameter"`
	DeploymentModel     models.Deployment   `json:"deployment_model"`
	SyncInfo
}

type DeviceDependency

type DeviceDependency struct {
	DeviceId      string         `json:"device_id"`
	Name          string         `json:"name"`
	BpmnResources []BpmnResource `json:"bpmn_resources"`
}

type EventDependency

type EventDependency struct {
	EventId       string         `json:"event_id"`
	BpmnResources []BpmnResource `json:"bpmn_resources"`
}

type ExtendedDeployment

type ExtendedDeployment struct {
	CamundaDeployment
	Diagram      string `json:"diagram"`
	DefinitionId string `json:"definition_id"`
	Error        string `json:"error"`
	Disabled     bool   `json:"disabled"`
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func New

func New(c Controller, counter Counter) *Handler

func (*Handler) ServeHTTP

func (this *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type HistoricProcessInstance

type HistoricProcessInstance struct {
	Id                       string  `json:"id"`
	SuperProcessInstanceId   string  `json:"superProcessInstanceId"`
	SuperCaseInstanceId      string  `json:"superCaseInstanceId"`
	CaseInstanceId           string  `json:"caseInstanceId"`
	ProcessDefinitionName    string  `json:"processDefinitionName"`
	ProcessDefinitionKey     string  `json:"processDefinitionKey"`
	ProcessDefinitionVersion float64 `json:"processDefinitionVersion"`
	ProcessDefinitionId      string  `json:"processDefinitionId"`
	BusinessKey              string  `json:"businessKey"`
	StartTime                string  `json:"startTime"`
	EndTime                  string  `json:"endTime"`
	DurationInMillis         float64 `json:"durationInMillis"`
	StartUserId              string  `json:"startUserId"`
	StartActivityId          string  `json:"startActivityId"`
	DeleteReason             string  `json:"deleteReason"`
	TenantId                 string  `json:"tenantId"`
	State                    string  `json:"state"`
}

type HistoricProcessInstancesWithTotal

type HistoricProcessInstancesWithTotal struct {
	Total int                       `json:"total"`
	Data  []HistoricProcessInstance `json:"data"`
}

type Hub

type Hub struct {
	Id             string   `json:"id"`
	Name           string   `json:"name"`
	Hash           string   `json:"hash"`
	DeviceLocalIds []string `json:"device_local_ids"`
	DeviceIds      []string `json:"device_ids"`
	OwnerId        string   `json:"owner_id"`
}

type Incident

type Incident struct {
	Id                  string `json:"id"`
	MsgVersion          int64  `json:"msg_version,omitempty"`
	ExternalTaskId      string `json:"external_task_id"`
	ProcessInstanceId   string `json:"process_instance_id"`
	ProcessDefinitionId string `json:"process_definition_id"`
	WorkerId            string `json:"worker_id"`
	ErrorMessage        string `json:"error_message"`
	Time                string `json:"time"`
	TenantId            string `json:"tenant_id"`
	DeploymentName      string `json:"deployment_name"`
	BusinessKey         string `json:"business_key"`
}

type IoBulkRequest

type IoBulkRequest struct {
	Get []string     `json:"get"`
	Set []IoVariable `json:"set"`
}

type IoVariable

type IoVariable struct {
	Key                 string `json:"key"`
	Value               any    `json:"value"`
	ProcessDefinitionId string `json:"process_definition_id,omitempty"`
	ProcessInstanceId   string `json:"process_instance_id,omitempty"`
}

type IoVariableWithUnixTimestamp

type IoVariableWithUnixTimestamp struct {
	IoVariable
	UnixTimestampInS int64 `json:"unix_timestamp_in_s"`
}

type IotDescription

type IotDescription struct {
	TypeFilter                   []string `json:"type_filter"`
	Criteria                     []any    `json:"criteria"`
	EntityOnly                   bool     `json:"entity_only"`
	NeedsSameEntityIdInParameter string   `json:"needs_same_entity_id_in_parameter"`
}

IotDescription is what an iot parameter asks to be filled with; the device replace dialog of the web-ui reads its criteria

type MaintenanceProcedure

type MaintenanceProcedure struct {
	BpmnId                string             `json:"bpmn_id"`
	MessageRef            string             `json:"message_ref"`
	PublicEventId         string             `json:"public_event_id"`
	InternalEventId       string             `json:"internal_event_id"`
	ParameterDescriptions []ReleaseParameter `json:"parameter_descriptions"`
}

type ModuleDeleteInfo

type ModuleDeleteInfo struct {
	Url    string `json:"url"`
	UserId string `json:"user_id"`
}

type ModuleInfo

type ModuleInfo struct {
	Analytics []AnalyticsInfo `json:"analytics"`
}

type PermissionsInfo

type PermissionsInfo struct {
	Shared      bool            `json:"shared"`
	Permissions map[string]bool `json:"permissions"`
}

type PrepareRequest

type PrepareRequest struct {
	Xml string `json:"xml"`
	Svg string `json:"svg"`
}

type Process

type Process struct {
	Id              string `json:"_id"`
	Name            string `json:"name"`
	Date            int64  `json:"date"`
	Owner           string `json:"owner"`
	BpmnXml         string `json:"bpmn_xml"`
	SvgXml          string `json:"svgXML"`
	Publish         bool   `json:"publish"`
	PublishDate     string `json:"publish_date"`
	Description     string `json:"description"`
	LastUpdatedUnix int64  `json:"last_updated_unix"`
}

Process is a model with its latest version in the form of process-model-repository.

type ProcessDefinition

type ProcessDefinition struct {
	Id                string `json:"id"`
	Key               string `json:"key"`
	Category          string `json:"category"`
	Description       string `json:"description"`
	Name              string `json:"name"`
	Version           int    `json:"Version"`
	Resource          string `json:"resource"`
	DeploymentId      string `json:"deploymentId"`
	Diagram           string `json:"diagram"`
	Suspended         bool   `json:"suspended"`
	TenantId          string `json:"tenantId"`
	VersionTag        string `json:"versionTag"`
	HistoryTimeToLive *int   `json:"historyTimeToLive"`
}

ProcessDefinition is a deployment version in the form of Camunda; Version is capitalised as in the wrapper.

type ProcessInstance

type ProcessInstance struct {
	Id             string `json:"id,omitempty"`
	DefinitionId   string `json:"definitionId,omitempty"`
	BusinessKey    string `json:"businessKey,omitempty"`
	CaseInstanceId string `json:"caseInstanceId,omitempty"`
	Ended          bool   `json:"ended,omitempty"`
	Suspended      bool   `json:"suspended,omitempty"`
	TenantId       string `json:"tenantId,omitempty"`
}

ProcessInstance is a running instance in the form of Camunda.

type PublicCommand

type PublicCommand struct {
	Publish     bool   `json:"publish"`
	Description string `json:"description"`
}

type ReleaseInfo

type ReleaseInfo struct {
	ParameterDescriptions []ReleaseParameter     `json:"parameter_descriptions"`
	MaintenanceProcedures []MaintenanceProcedure `json:"maintenance_procedures"`
	ModuleInfo            ModuleInfo             `json:"module_info"`
}

type ReleaseParameter

type ReleaseParameter struct {
	Id               string          `json:"id"`
	Label            string          `json:"label"`
	Description      string          `json:"description"`
	Type             string          `json:"type"`
	DefaultValue     any             `json:"default_value"`
	Multiple         bool            `json:"multiple"`
	AutoSelectAll    bool            `json:"auto_select_all"`
	Options          map[string]any  `json:"options,omitempty"`
	IotDescription   *IotDescription `json:"iot_description"`
	Order            int             `json:"order"`
	CharacteristicId *string         `json:"characteristic_id,omitempty"`
	Optional         bool            `json:"optional"`
}

type ResourceUsage

type ResourceUsage struct {
	Releases  int                    `json:"releases"`
	Instances int                    `json:"instances"`
	Readable  []ResourceUsageRelease `json:"readable"`
}

type ResourceUsageRelease

type ResourceUsageRelease struct {
	Id       string `json:"id"`
	DesignId string `json:"design_id"`
	Name     string `json:"name"`
}

type ScheduleEntry

type ScheduleEntry struct {
	Id                  string  `json:"id"`
	Cron                string  `json:"cron"`
	ProcessDeploymentId string  `json:"process_deployment_id"`
	ProcessAlias        *string `json:"process_alias,omitempty"`
	Disabled            *bool   `json:"disabled,omitempty"`
	CreatedBy           *string `json:"created_by,omitempty"`
}

type SmartServiceDesign

type SmartServiceDesign struct {
	Id          string `json:"id"`
	UserId      string `json:"user_id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	BpmnXml     string `json:"bpmn_xml"`
	SvgXml      string `json:"svg_xml"`
	UpdatedAt   int64  `json:"updated_at"`
}

type SmartServiceExtendedParameter

type SmartServiceExtendedParameter struct {
	SmartServiceParameter
	Description      string                  `json:"description"`
	DefaultValue     any                     `json:"default_value"`
	Type             string                  `json:"type"`
	Options          []model.ParameterOption `json:"options"`
	Multiple         bool                    `json:"multiple"`
	Order            int                     `json:"order"`
	CharacteristicId *string                 `json:"characteristic_id,omitempty"`
	Characteristic   any                     `json:"characteristic,omitempty"`
	Optional         bool                    `json:"optional"`
	HasNoValidOption bool                    `json:"has_no_valid_option"`
}

type SmartServiceInstance

type SmartServiceInstance struct {
	SmartServiceInstanceInit
	PermissionsInfo       PermissionsInfo `json:"permissions_info"`
	Id                    string          `json:"id"`
	UserId                string          `json:"user_id"`
	DesignId              string          `json:"design_id"`
	ReleaseId             string          `json:"release_id"`
	NewReleaseId          string          `json:"new_release_id,omitempty"`
	RunningMaintenanceIds []string        `json:"running_maintenance_ids,omitempty"`
	Ready                 bool            `json:"ready"`
	Deleting              bool            `json:"deleting,omitempty"`
	Error                 string          `json:"error,omitempty"`
	CreatedAt             int64           `json:"created_at"`
	UpdatedAt             int64           `json:"updated_at"`
}

type SmartServiceInstanceInfo

type SmartServiceInstanceInfo struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type SmartServiceInstanceInit

type SmartServiceInstanceInit struct {
	Name        string                  `json:"name"`
	Description string                  `json:"description"`
	Parameters  []SmartServiceParameter `json:"parameters"`
}

type SmartServiceModule

type SmartServiceModule struct {
	Id         string            `json:"id"`
	UserId     string            `json:"user_id"`
	InstanceId string            `json:"instance_id"`
	DesignId   string            `json:"design_id"`
	ReleaseId  string            `json:"release_id"`
	LastUpdate int64             `json:"last_update"`
	Error      string            `json:"error,omitempty"`
	DeleteInfo *ModuleDeleteInfo `json:"delete_info"`
	ModuleType string            `json:"module_type"`
	ModuleData map[string]any    `json:"module_data"`
	Keys       []string          `json:"keys"`
}

type SmartServiceParameter

type SmartServiceParameter struct {
	Id         string `json:"id"`
	Value      any    `json:"value"`
	Label      string `json:"label"`
	ValueLabel string `json:"value_label,omitempty"`
}

type SmartServiceRelease

type SmartServiceRelease struct {
	Id               string                  `json:"id"`
	DesignId         string                  `json:"design_id"`
	Name             string                  `json:"name"`
	Description      string                  `json:"description"`
	CreatedAt        int64                   `json:"created_at"`
	NewReleaseId     string                  `json:"new_release_id,omitempty"`
	Creator          string                  `json:"creator"`
	Usable           *bool                   `json:"usable,omitempty"`
	ChangedResources []model.ChangedResource `json:"changed_resources,omitempty"`
	// UpdateOf is read on creation only: the current release that the new one updates, also when
	// it was released from another design (SNRGY-4535)
	UpdateOf string `json:"update_of,omitempty"`
}

type SmartServiceReleaseExtended

type SmartServiceReleaseExtended struct {
	SmartServiceRelease
	BpmnXml         string          `json:"bpmn_xml"`
	SvgXml          string          `json:"svg_xml"`
	ParsedInfo      ReleaseInfo     `json:"parsed_info"`
	PermissionsInfo PermissionsInfo `json:"permissions_info"`
}

type SyncDeployment

type SyncDeployment struct {
	CamundaDeployment
	SyncInfo
	Diagram      string `json:"diagram,omitempty"`
	DefinitionId string `json:"definition_id,omitempty"`
	Error        string `json:"error,omitempty"`
}

type SyncHistoricProcessInstance

type SyncHistoricProcessInstance struct {
	HistoricProcessInstance
	SyncInfo
}

type SyncHistoricProcessInstancesWithTotal

type SyncHistoricProcessInstancesWithTotal struct {
	Total int                           `json:"total"`
	Data  []SyncHistoricProcessInstance `json:"data"`
}

type SyncIncident

type SyncIncident struct {
	Incident
	SyncInfo
}

type SyncInfo

type SyncInfo struct {
	NetworkId       string `json:"network_id"`
	IsPlaceholder   bool   `json:"is_placeholder"`
	MarkedForDelete bool   `json:"marked_for_delete"`
	MarkedAsMissing bool   `json:"marked_as_missing"`
	SyncDate        string `json:"sync_date"`
}

type Variable

type Variable struct {
	Value     any            `json:"value"`
	Type      string         `json:"type"`
	ValueInfo map[string]any `json:"valueInfo"`
}

Variable is a typed value in the form of Camunda.

Jump to

Keyboard shortcuts

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