Skip to content

Commit 8072b6f

Browse files
committed
[client] Pass workflow ID to relationship creation
1 parent a42ba01 commit 8072b6f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pycti/entities/opencti_stix_core_relationship.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ def create(self, **kwargs):
588588
external_references = kwargs.get("externalReferences", None)
589589
kill_chain_phases = kwargs.get("killChainPhases", None)
590590
granted_refs = kwargs.get("objectOrganization", None)
591+
x_opencti_workflow_id = kwargs.get("x_opencti_workflow_id", None)
591592
update = kwargs.get("update", False)
592593

593594
self.opencti.app_logger.info(
@@ -630,6 +631,7 @@ def create(self, **kwargs):
630631
"objectOrganization": granted_refs,
631632
"externalReferences": external_references,
632633
"killChainPhases": kill_chain_phases,
634+
"x_opencti_workflow_id": x_opencti_workflow_id,
633635
"update": update,
634636
}
635637
},
@@ -1190,6 +1192,11 @@ def import_from_stix2(self, **kwargs):
11901192
if "x_opencti_granted_refs" in stix_relation
11911193
else None
11921194
),
1195+
x_opencti_workflow_id=(
1196+
stix_relation["x_opencti_workflow_id"]
1197+
if "x_opencti_workflow_id" in stix_relation
1198+
else None
1199+
),
11931200
update=update,
11941201
)
11951202
else:

0 commit comments

Comments
 (0)