Skip to content

Commit

Permalink
connector GovernanceActionProcessInstance to first engine action
Browse files Browse the repository at this point in the history
Signed-off-by: Mandy Chessell <mandy.e.chessell@gmail.com>
  • Loading branch information
mandy-chessell committed Oct 9, 2024
1 parent b3a6287 commit 324b667
Show file tree
Hide file tree
Showing 64 changed files with 1,281 additions and 2,011 deletions.
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
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@ private File getFileBasedKeystore(boolean generateIfNotExists) {
*
* @return File
*/
@SuppressWarnings(value = "deprecation")
private File createKeyStore() {

final String methodName = "createKeyStore";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand All @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
{
Expand Down
Loading

0 comments on commit 324b667

Please sign in to comment.