Skip to content

Commit 5eba81d

Browse files
OctaveLaventuredelemaf
authored andcommitted
[backend] implement new workflows engine (#14047)
1 parent 8d8cc99 commit 5eba81d

40 files changed

Lines changed: 1945 additions & 45 deletions

opencti-platform/opencti-front/lang/back/de.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
"Csv_mapper_type": "Csv_mapper_type",
181181
"Ctime": "Ctime",
182182
"Current draft context": "Aktueller Entwurfskontext",
183+
"Current State": "Aktueller Stand",
183184
"Current state cursor": "Aktueller Status Cursor",
184185
"Current state date": "Aktuelles Statusdatum",
185186
"Current stated date": "Aktuell angegebenes Datum",
@@ -427,6 +428,7 @@
427428
"Height measure": "Höhenmaß",
428429
"Height measure date": "Höhenmaß Datum",
429430
"Hidden": "Versteckte",
431+
"History": "Geschichte",
430432
"Holder name": "Name des Inhabers",
431433
"HUB_REGISTRATION_MANAGER": "Hub-Registrierungsmanager",
432434
"IBAN": "IBAN",
@@ -1053,6 +1055,9 @@
10531055
"Work status": "Arbeitsstatus",
10541056
"Workbench labels": "Workbench-Etiketten",
10551057
"Workflow activated": "Workflow aktiviert",
1058+
"Workflow content": "Inhalt des Arbeitsablaufs",
1059+
"Workflow Definition ID": "Workflow-Definitions-ID",
1060+
"Workflow ID": "Arbeitsablauf-ID",
10561061
"Workflow status": "Workflow-Status",
10571062
"Workspace graph data": "Daten des Arbeitsbereichsdiagramms",
10581063
"Workspace type": "Arbeitsbereichstyp",

opencti-platform/opencti-front/lang/back/en.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
"Csv_mapper_type": "Csv_mapper_type",
181181
"Ctime": "Ctime",
182182
"Current draft context": "Current draft context",
183+
"Current State": "Current State",
183184
"Current state cursor": "Current state cursor",
184185
"Current state date": "Current state date",
185186
"Current stated date": "Current stated date",
@@ -427,6 +428,7 @@
427428
"Height measure": "Height measure",
428429
"Height measure date": "Height measure date",
429430
"Hidden": "Hidden",
431+
"History": "History",
430432
"Holder name": "Holder name",
431433
"HUB_REGISTRATION_MANAGER": "Hub registration manager",
432434
"IBAN": "IBAN",
@@ -1053,6 +1055,9 @@
10531055
"Work status": "Work status",
10541056
"Workbench labels": "Workbench labels",
10551057
"Workflow activated": "Workflow activated",
1058+
"Workflow content": "Workflow content",
1059+
"Workflow Definition ID": "Workflow Definition ID",
1060+
"Workflow ID": "Workflow ID",
10561061
"Workflow status": "Workflow status",
10571062
"Workspace graph data": "Workspace graph data",
10581063
"Workspace type": "Workspace type",

opencti-platform/opencti-front/lang/back/es.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
"Csv_mapper_type": "Csv_mapper_type",
181181
"Ctime": "Ctime",
182182
"Current draft context": "Contexto actual del proyecto",
183+
"Current State": "Estado actual",
183184
"Current state cursor": "Cursor de estado actual",
184185
"Current state date": "Fecha de estado actual",
185186
"Current stated date": "Fecha actual",
@@ -427,6 +428,7 @@
427428
"Height measure": "Medida de altura",
428429
"Height measure date": "Altura medida fecha",
429430
"Hidden": "Oculto",
431+
"History": "Historia",
430432
"Holder name": "Nombre del titular",
431433
"HUB_REGISTRATION_MANAGER": "Gestor de inscripciones Hub",
432434
"IBAN": "IBAN",
@@ -1053,6 +1055,9 @@
10531055
"Work status": "Situación laboral",
10541056
"Workbench labels": "Etiquetas del Workbench",
10551057
"Workflow activated": "Flujo de trabajo activado",
1058+
"Workflow content": "Contenido del flujo de trabajo",
1059+
"Workflow Definition ID": "ID de definición del flujo de trabajo",
1060+
"Workflow ID": "ID del flujo de trabajo",
10561061
"Workflow status": "Estado del flujo de trabajo",
10571062
"Workspace graph data": "Datos del gráfico del espacio de trabajo",
10581063
"Workspace type": "Tipo de espacio de trabajo",

opencti-platform/opencti-front/lang/back/fr.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
"Csv_mapper_type": "Csv_mapper_type",
181181
"Ctime": "Ctime",
182182
"Current draft context": "Contexte du projet actuel",
183+
"Current State": "État actuel",
183184
"Current state cursor": "Curseur d'état actuel",
184185
"Current state date": "Date de l'état actuel",
185186
"Current stated date": "Current stated date",
@@ -427,6 +428,7 @@
427428
"Height measure": "Mesure de la taille",
428429
"Height measure date": "Date de mesure de la taille",
429430
"Hidden": "Caché",
431+
"History": "Historique",
430432
"Holder name": "Nom du titulaire",
431433
"HUB_REGISTRATION_MANAGER": "Manager d'enregistrement du Hub",
432434
"IBAN": "IBAN",
@@ -1053,6 +1055,9 @@
10531055
"Work status": "Statut du travail",
10541056
"Workbench labels": "Étiquettes de l'atelier",
10551057
"Workflow activated": "Flux de travail activé",
1058+
"Workflow content": "Contenu du flux de travail",
1059+
"Workflow Definition ID": "ID de définition du flux de travail",
1060+
"Workflow ID": "ID du flux de travail",
10561061
"Workflow status": "Statut du flux de travail",
10571062
"Workspace graph data": "Données du graphique de l'espace de travail",
10581063
"Workspace type": "Type d'espace de travail",

opencti-platform/opencti-front/lang/back/it.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
"Csv_mapper_type": "Tipo_csv_mapper",
181181
"Ctime": "Ctime",
182182
"Current draft context": "Contesto della bozza corrente",
183+
"Current State": "Stato attuale",
183184
"Current state cursor": "Cursore dello stato corrente",
184185
"Current state date": "Data dello stato corrente",
185186
"Current stated date": "Data dichiarata corrente",
@@ -427,6 +428,7 @@
427428
"Height measure": "Misura dell'altezza",
428429
"Height measure date": "Data della misura dell'altezza",
429430
"Hidden": "Nascosto",
431+
"History": "Storia",
430432
"Holder name": "Nome del titolare",
431433
"HUB_REGISTRATION_MANAGER": "Responsabile della registrazione dell'hub",
432434
"IBAN": "IBAN",
@@ -1053,6 +1055,9 @@
10531055
"Work status": "Stato del lavoro",
10541056
"Workbench labels": "Etichette della workbench",
10551057
"Workflow activated": "Workflow attivato",
1058+
"Workflow content": "Contenuto del flusso di lavoro",
1059+
"Workflow Definition ID": "ID definizione flusso di lavoro",
1060+
"Workflow ID": "ID flusso di lavoro",
10561061
"Workflow status": "Stato del workflow",
10571062
"Workspace graph data": "Dati del grafico dello spazio di lavoro",
10581063
"Workspace type": "Tipo di spazio di lavoro",

opencti-platform/opencti-front/lang/back/ja.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
"Csv_mapper_type": "Csv_mapper_type",
181181
"Ctime": "Ctime",
182182
"Current draft context": "現在のドラフト状況",
183+
"Current State": "現在の状態",
183184
"Current state cursor": "ヘッダー",
184185
"Current state date": "摂取実行",
185186
"Current stated date": "現在の記載日",
@@ -427,6 +428,7 @@
427428
"Height measure": "身長メジャー",
428429
"Height measure date": "身長測定日",
429430
"Hidden": "ヒドゥン",
431+
"History": "歴史",
430432
"Holder name": "ホルダー名",
431433
"HUB_REGISTRATION_MANAGER": "ハブ登録マネージャー",
432434
"IBAN": "IBAN",
@@ -1053,6 +1055,9 @@
10531055
"Work status": "勤務状況",
10541056
"Workbench labels": "ラベル",
10551057
"Workflow activated": "イベントの種類",
1058+
"Workflow content": "ワークフローの内容",
1059+
"Workflow Definition ID": "ワークフロー定義ID",
1060+
"Workflow ID": "ワークフローID",
10561061
"Workflow status": "ワークフローの状態",
10571062
"Workspace graph data": "ワークスペースのグラフデータ",
10581063
"Workspace type": "ワークスペースタイプ",

opencti-platform/opencti-front/lang/back/ko.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
"Csv_mapper_type": "Csv_매퍼_유형",
181181
"Ctime": "변경 시간",
182182
"Current draft context": "현재 초안 컨텍스트",
183+
"Current State": "현재 상태",
183184
"Current state cursor": "현재 상태 커서",
184185
"Current state date": "현재 상태 날짜",
185186
"Current stated date": "현재 명시된 날짜",
@@ -427,6 +428,7 @@
427428
"Height measure": "키 측정",
428429
"Height measure date": "키 측정 날짜",
429430
"Hidden": "숨김",
431+
"History": "기록",
430432
"Holder name": "소지자 이름",
431433
"HUB_REGISTRATION_MANAGER": "허브 등록 관리자",
432434
"IBAN": "IBAN",
@@ -1053,6 +1055,9 @@
10531055
"Work status": "작업 상태",
10541056
"Workbench labels": "작업대 라벨",
10551057
"Workflow activated": "워크플로우 활성화됨",
1058+
"Workflow content": "워크플로 콘텐츠",
1059+
"Workflow Definition ID": "워크플로 정의 ID",
1060+
"Workflow ID": "워크플로 ID",
10561061
"Workflow status": "워크플로우 상태",
10571062
"Workspace graph data": "작업 공간 그래프 데이터",
10581063
"Workspace type": "작업 공간 유형",

opencti-platform/opencti-front/lang/back/ru.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
"Csv_mapper_type": "Csv_mapper_type",
181181
"Ctime": "Время изменения метаданных",
182182
"Current draft context": "Текущий контекст проекта",
183+
"Current State": "Текущее состояние",
183184
"Current state cursor": "Курсор текущего состояния",
184185
"Current state date": "Текущая дата состояния",
185186
"Current stated date": "Текущая заявленная дата",
@@ -427,6 +428,7 @@
427428
"Height measure": "Мера высоты",
428429
"Height measure date": "Дата измерения высоты",
429430
"Hidden": "Скрытый",
431+
"History": "История",
430432
"Holder name": "Имя владельца",
431433
"HUB_REGISTRATION_MANAGER": "Менеджер по регистрации хаба",
432434
"IBAN": "IBAN",
@@ -1053,6 +1055,9 @@
10531055
"Work status": "Статус работы",
10541056
"Workbench labels": "Наклейки на верстак",
10551057
"Workflow activated": "Активирован рабочий процесс",
1058+
"Workflow content": "Содержание рабочего процесса",
1059+
"Workflow Definition ID": "Идентификатор определения рабочего процесса",
1060+
"Workflow ID": "Идентификатор рабочего процесса",
10561061
"Workflow status": "Состояние рабочего процесса",
10571062
"Workspace graph data": "Данные графиков рабочей области",
10581063
"Workspace type": "Тип рабочего пространства",

opencti-platform/opencti-front/lang/back/zh.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
"Csv_mapper_type": "Csv_mapper_type",
181181
"Ctime": "Ctime",
182182
"Current draft context": "当前草案背景",
183+
"Current State": "当前状态",
183184
"Current state cursor": "当前状态游标",
184185
"Current state date": "当前状态日期",
185186
"Current stated date": "当前状态日期",
@@ -427,6 +428,7 @@
427428
"Height measure": "高度计算",
428429
"Height measure date": "高度计算时间",
429430
"Hidden": "隐藏",
431+
"History": "历史",
430432
"Holder name": "持有人姓名",
431433
"HUB_REGISTRATION_MANAGER": "集线器注册管理器",
432434
"IBAN": "IBAN",
@@ -1053,6 +1055,9 @@
10531055
"Work status": "工作状态",
10541056
"Workbench labels": "工作台标签",
10551057
"Workflow activated": "已激活的工作流程",
1058+
"Workflow content": "工作流程内容",
1059+
"Workflow Definition ID": "工作流程定义 ID",
1060+
"Workflow ID": "工作流 ID",
10561061
"Workflow status": "工作流程状态",
10571062
"Workspace graph data": "工作区图表数据",
10581063
"Workspace type": "工作区类型",

opencti-platform/opencti-front/src/schema/relay.schema.graphql

Lines changed: 95 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9793,6 +9793,11 @@ type Query {
97939793
Auth log history by provider id: internal_id for DB providers, or static id for singletons (Headers, Cert).
97949794
"""
97959795
authLogHistoryById(id: String!): [AuthLogEntry!]!
9796+
9797+
workflowDefinition(entityType: String!): WorkflowSchema
9798+
workflowInstance(entityId: String!): WorkflowInstance
9799+
allowedNextStatuses(entityId: String!): [Status!]!
9800+
allowedTransitions(entityId: String!): [WorkflowTransition!]!
97969801
}
97979802

97989803
type Subscription {
@@ -10742,6 +10747,94 @@ type Mutation {
1074210747
ldapProviderAdd(input: LdapInput!): AuthenticationProvider
1074310748
ldapProviderEdit(id: ID!, input: LdapInput!): AuthenticationProvider
1074410749
ldapProviderDelete(id: ID!): ID
10750+
workflowDefinitionSet(entityType: String!, definition: String!): EntitySetting
10751+
workflowDefinitionDelete(entityType: String!): EntitySetting
10752+
triggerWorkflowEvent(entityId: String!, eventName: String!): WorkflowTriggerResult!
10753+
}
10754+
10755+
enum WorkflowActionMode {
10756+
sync
10757+
async
10758+
}
10759+
10760+
type WorkflowActionConfig {
10761+
type: String!
10762+
params: String
10763+
mode: WorkflowActionMode!
10764+
}
10765+
10766+
type WorkflowConditionConfig {
10767+
type: String
10768+
field: String
10769+
operator: String
10770+
value: String
10771+
}
10772+
10773+
type WorkflowSerializedState {
10774+
name: String!
10775+
onEnter: [WorkflowActionConfig!]
10776+
onExit: [WorkflowActionConfig!]
10777+
}
10778+
10779+
type WorkflowSerializedTransition {
10780+
from: String!
10781+
to: String!
10782+
event: String!
10783+
actions: [WorkflowActionConfig!]
10784+
conditions: [WorkflowConditionConfig!]
10785+
}
10786+
10787+
type WorkflowSchema {
10788+
id: ID!
10789+
name: String!
10790+
initialState: String!
10791+
states: [WorkflowSerializedState!]!
10792+
transitions: [WorkflowSerializedTransition!]!
10793+
}
10794+
10795+
type EntitySetting implements InternalObject & BasicObject {
10796+
workflow_configuration: Boolean
10797+
workflow_id: String
10798+
id: ID!
10799+
entity_type: String!
10800+
standard_id: String!
10801+
parent_types: [String!]!
10802+
metrics: [Metric]
10803+
target_type: String!
10804+
platform_entity_files_ref: Boolean
10805+
platform_hidden_type: Boolean
10806+
enforce_reference: Boolean
10807+
attributes_configuration: String
10808+
attributesDefinitions: [TypeAttribute!]!
10809+
mandatoryAttributes: [String!]!
10810+
scaleAttributes: [ScaleAttribute!]!
10811+
defaultValuesAttributes: [DefaultValueAttribute!]!
10812+
availableSettings: [String!]!
10813+
created_at: DateTime!
10814+
updated_at: DateTime!
10815+
refreshed_at: DateTime
10816+
overview_layout_customization: [OverviewWidgetCustomization!]
10817+
fintelTemplates(first: Int, after: ID, orderBy: FintelTemplateOrdering, orderMode: OrderingMode, search: String): FintelTemplateConnection
10818+
requestAccessConfiguration: RequestAccessConfiguration
10819+
}
10820+
10821+
type WorkflowTriggerResult {
10822+
success: Boolean!
10823+
newState: String
10824+
reason: String
10825+
status: Status
10826+
}
10827+
10828+
type WorkflowTransition {
10829+
event: String!
10830+
toState: String!
10831+
toStatus: Status
10832+
}
10833+
10834+
type WorkflowInstance {
10835+
id: ID!
10836+
currentState: String!
10837+
allowedTransitions: [WorkflowTransition!]!
1074510838
}
1074610839

1074710840
type Channel implements BasicObject & StixObject & StixCoreObject & StixDomainObject {
@@ -12902,30 +12995,6 @@ type OverviewWidgetCustomization {
1290212995
label: String!
1290312996
}
1290412997

12905-
type EntitySetting implements InternalObject & BasicObject {
12906-
id: ID!
12907-
entity_type: String!
12908-
standard_id: String!
12909-
parent_types: [String!]!
12910-
metrics: [Metric]
12911-
target_type: String!
12912-
platform_entity_files_ref: Boolean
12913-
platform_hidden_type: Boolean
12914-
enforce_reference: Boolean
12915-
attributes_configuration: String
12916-
attributesDefinitions: [TypeAttribute!]!
12917-
mandatoryAttributes: [String!]!
12918-
scaleAttributes: [ScaleAttribute!]!
12919-
defaultValuesAttributes: [DefaultValueAttribute!]!
12920-
availableSettings: [String!]!
12921-
created_at: DateTime!
12922-
updated_at: DateTime!
12923-
refreshed_at: DateTime
12924-
overview_layout_customization: [OverviewWidgetCustomization!]
12925-
fintelTemplates(first: Int, after: ID, orderBy: FintelTemplateOrdering, orderMode: OrderingMode, search: String): FintelTemplateConnection
12926-
requestAccessConfiguration: RequestAccessConfiguration
12927-
}
12928-
1292912998
enum EntitySettingsOrdering {
1293012999
target_type
1293113000
_score
@@ -14936,6 +15005,7 @@ type DraftWorkspace implements InternalObject & BasicObject {
1493615005
validationWork: Work
1493715006
authorizedMembers: [MemberAccess!]!
1493815007
currentUserAccessRight: String
15008+
workflowInstance: WorkflowInstance
1493915009
}
1494015010

1494115011
type DraftObjectsCount {
@@ -16077,4 +16147,4 @@ type AuthenticationProviderMigrationResult {
1607716147
type AvailableSecretInfo {
1607816148
provider_name: String!
1607916149
secret_name: String!
16080-
}
16150+
}

0 commit comments

Comments
 (0)