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
- func DeploymentInput(ctx context.Context, c Converter, token string, namespace string, ...) (model.DeploymentInput, model.Conversion, error)
- type AnalyticsInfo
- type BpmnResource
- type CamundaDeployment
- type Controller
- type Converter
- type Count
- type Counter
- type Dependencies
- type DeploymentDisabled
- type DeploymentMetadata
- type DeviceDependency
- type EventDependency
- type ExtendedDeployment
- type Handler
- type HistoricProcessInstance
- type HistoricProcessInstancesWithTotal
- type Hub
- type Incident
- type IoBulkRequest
- type IoVariable
- type IoVariableWithUnixTimestamp
- type IotDescription
- type MaintenanceProcedure
- type ModuleDeleteInfo
- type ModuleInfo
- type PermissionsInfo
- type PrepareRequest
- type Process
- type ProcessDefinition
- type ProcessInstance
- type PublicCommand
- type ReleaseInfo
- type ReleaseParameter
- type ResourceUsage
- type ResourceUsageRelease
- type ScheduleEntry
- type SmartServiceDesign
- type SmartServiceExtendedParameter
- type SmartServiceInstance
- type SmartServiceInstanceInfo
- type SmartServiceInstanceInit
- type SmartServiceModule
- type SmartServiceParameter
- type SmartServiceRelease
- type SmartServiceReleaseExtended
- type SyncDeployment
- type SyncHistoricProcessInstance
- type SyncHistoricProcessInstancesWithTotal
- type SyncIncident
- type SyncInfo
- type Variable
Constants ¶
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 BpmnResource ¶
type BpmnResource struct {
Id string `json:"id"`
}
type CamundaDeployment ¶
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 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 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
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 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 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 ModuleInfo ¶
type ModuleInfo struct {
Analytics []AnalyticsInfo `json:"analytics"`
}
type PermissionsInfo ¶
type PrepareRequest ¶
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 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 ScheduleEntry ¶
type SmartServiceDesign ¶
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 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 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"`
}