Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect GovernanceActionProcessInstance to first engine action #8436

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion EgeriaContentPacksGUIDMap.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/APIsContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/ApacheAtlasContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/ApacheKafkaContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoBusinessSystemsArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoClinicalTrialsTemplatesArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoComboArchive.omarchive

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoGovernanceProgramArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoOrganizationArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoSustainabilityArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoTypesArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CoreContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/ObservabilityContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/OpenMetadataTypes.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/PostgresContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/UnityCatalogContentPack.omarchive

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ public DigitalServiceBuilder(String qualifiedName,
* @param serviceName name of this OMAS
* @param serverName name of local server
*/
@SuppressWarnings(value = "deprecation")
public DigitalServiceBuilder(String displayName,
String description,
String versionNumber,
Original file line number Diff line number Diff line change
@@ -691,6 +691,7 @@ private File getFileBasedKeystore(boolean generateIfNotExists) {
*
* @return File
*/
@SuppressWarnings(value = "deprecation")
private File createKeyStore() {

final String methodName = "createKeyStore";
Original file line number Diff line number Diff line change
@@ -173,7 +173,7 @@ public InstanceProperties getInstanceProperties(String methodName) throws Inval

properties = repositoryHelper.addStringPropertyToInstance(serviceName,
properties,
OpenMetadataType.SUPPORTED_ASSET_TYPE_NAME,
OpenMetadataProperty.SUPPORTED_ASSET_TYPE_NAME.name,
supportedAssetTypeName,
methodName);

@@ -185,7 +185,7 @@ public InstanceProperties getInstanceProperties(String methodName) throws Inval

properties = repositoryHelper.addStringPropertyToInstance(serviceName,
properties,
OpenMetadataType.EXPECTED_DATA_FORMAT,
OpenMetadataProperty.EXPECTED_DATA_FORMAT.name,
expectedDataFormat,
methodName);

@@ -197,43 +197,43 @@ public InstanceProperties getInstanceProperties(String methodName) throws Inval

properties = repositoryHelper.addStringPropertyToInstance(serviceName,
properties,
OpenMetadataType.CONNECTOR_FRAMEWORK_NAME,
OpenMetadataProperty.CONNECTOR_FRAMEWORK_NAME.name,
connectorFrameworkName,
methodName);

properties = repositoryHelper.addStringPropertyToInstance(serviceName,
properties,
OpenMetadataType.CONNECTOR_INTERFACE_LANGUAGE,
OpenMetadataProperty.CONNECTOR_INTERFACE_LANGUAGE.name,
connectorInterfaceLanguage,
methodName);

properties = repositoryHelper.addStringArrayPropertyToInstance(serviceName,
properties,
OpenMetadataType.CONNECTOR_INTERFACES,
OpenMetadataProperty.CONNECTOR_INTERFACES.name,
connectorInterfaces,
methodName);

properties = repositoryHelper.addStringPropertyToInstance(serviceName,
properties,
OpenMetadataType.TARGET_TECHNOLOGY_SOURCE,
OpenMetadataProperty.TARGET_TECHNOLOGY_SOURCE.name,
targetTechnologySource,
methodName);

properties = repositoryHelper.addStringPropertyToInstance(serviceName,
properties,
OpenMetadataType.TARGET_TECHNOLOGY_NAME,
OpenMetadataProperty.TARGET_TECHNOLOGY_NAME.name,
targetTechnologyName,
methodName);

properties = repositoryHelper.addStringArrayPropertyToInstance(serviceName,
properties,
OpenMetadataType.TARGET_TECHNOLOGY_INTERFACES,
OpenMetadataProperty.TARGET_TECHNOLOGY_INTERFACES.name,
targetTechnologyInterfaces,
methodName);

properties = repositoryHelper.addStringArrayPropertyToInstance(serviceName,
properties,
OpenMetadataType.TARGET_TECHNOLOGY_VERSIONS,
OpenMetadataProperty.TARGET_TECHNOLOGY_VERSIONS.name,
targetTechnologyVersions,
methodName);

Original file line number Diff line number Diff line change
@@ -517,7 +517,7 @@ public String getConnectorTypeForAsset(String userId,

List<String> specificMatchPropertyNames = new ArrayList<>();

specificMatchPropertyNames.add(OpenMetadataType.SUPPORTED_ASSET_TYPE_NAME);
specificMatchPropertyNames.add(OpenMetadataProperty.SUPPORTED_ASSET_TYPE_NAME.name);

List<EntityDetail> connectorTypes = this.getEntitiesByValue(userId,
supportedAssetTypeName,
@@ -553,11 +553,11 @@ public String getConnectorTypeForAsset(String userId,
if (connectorType != null)
{
String framework = repositoryHelper.getStringProperty(serviceName,
OpenMetadataType.CONNECTOR_FRAMEWORK_NAME,
OpenMetadataProperty.CONNECTOR_FRAMEWORK_NAME.name,
connectorType.getProperties(),
methodName);
String language = repositoryHelper.getStringProperty(serviceName,
OpenMetadataType.CONNECTOR_INTERFACE_LANGUAGE,
OpenMetadataProperty.CONNECTOR_INTERFACE_LANGUAGE.name,
connectorType.getProperties(),
methodName);

Original file line number Diff line number Diff line change
@@ -588,6 +588,7 @@ public String initiateGovernanceActionProcess(String userId,
final String governanceActionProcessGUIDParameterName = "governanceActionProcessEntity.getGUID()";
final String governanceActionProcessInstanceGUIDParameterName = "governanceActionProcessInstanceGUID";
final String governanceActionProcessStepGUIDParameterName = "governanceActionProcessFlowRelationship.getEntityTwoProxy().getGUID()";
final String engineActionGUIDParameterName = "engineActionGUID";

/*
* Effective time is set to "now" so that the process definition that is active now is
@@ -780,31 +781,56 @@ public String initiateGovernanceActionProcess(String userId,
false,
serviceSupportedZones,
OpenMetadataType.PROCESS_HIERARCHY_TYPE_GUID,
OpenMetadataType.PROCESS_HIERARCHY_TYPE_GUID,
OpenMetadataType.PROCESS_HIERARCHY_TYPE_NAME,
processBuilder.getProcessHierarchyProperties(ProcessContainmentType.OWNED.getOrdinal()),
effectiveTime,
methodName);

prepareEngineActionFromProcessStep(userId,
processInstanceGUID,
governanceActionProcessStepGUID,
governanceActionProcessStepGUIDParameterName,
guard,
false,
requestedStartDate,
null,
userId,
combinedRequestParameters,
requestSourceGUIDs,
newTargetsForAction,
processInstanceQualifiedName,
processQualifiedName,
originatorServiceName,
originatorEngineName,
serviceSupportedZones,
methodName);
String engineActionGUID = prepareEngineActionFromProcessStep(userId,
processInstanceGUID,
governanceActionProcessStepGUID,
governanceActionProcessStepGUIDParameterName,
guard,
false,
requestedStartDate,
null,
userId,
combinedRequestParameters,
requestSourceGUIDs,
newTargetsForAction,
processInstanceQualifiedName,
processQualifiedName,
originatorServiceName,
originatorEngineName,
serviceSupportedZones,
methodName);

if (engineActionGUID != null)
{
this.uncheckedLinkElementToElement(userId,
null,
null,
processInstanceGUID,
governanceActionProcessInstanceGUIDParameterName,
OpenMetadataType.GOVERNANCE_ACTION_PROCESS_INSTANCE.typeName,
engineActionGUID,
engineActionGUIDParameterName,
OpenMetadataType.ENGINE_ACTION.typeName,
false,
false,
serviceSupportedZones,
OpenMetadataType.ENGINE_ACTION_REQUEST_SOURCE.typeGUID,
OpenMetadataType.ENGINE_ACTION_REQUEST_SOURCE.typeName,
repositoryHelper.addStringPropertyToInstance(serviceName,
null,
OpenMetadataType.REQUEST_SOURCE_NAME_PROPERTY_NAME,
processInstanceName,
methodName),
effectiveTime,
methodName);
}

return processInstanceGUID;
return processInstanceGUID;
}
else
{
Loading