Skip to content

Commit

Permalink
setting missing workflowType
Browse files Browse the repository at this point in the history
  • Loading branch information
hkryeung committed Oct 18, 2022
1 parent d7591a3 commit edeaa5b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public String PerformFunction(String input, Context context) throws Exception {
String collectionVersion = (String) config.get("version");
Boolean rangeIs360 = (Boolean) config.get("rangeIs360");
JSONObject boundingBox = (JSONObject) config.get("boundingBox");
/** call the setWorkFlowType by passing in the stateMachine name to set a WorkflowTypeEnum
* this will help the logic in postIngestProcess function.
*/
this.setWorkFlowType((String) config.get("stateMachine"));

String isoRegex = (String)config.get("isoRegex");
String archiveXmlRegex = (String)config.get("archiveXmlRegex");
Expand Down Expand Up @@ -318,7 +322,7 @@ private void setCMRMetadataToProvider(String input)
String provider = (String)config.get("provider");
CMRRestClientProvider.setProvider(provider);
}

public void setWorkFlowType(String stateMachine) throws ParseException {
AdapterLogger.LogInfo("current state machine:" + stateMachine);
if(StringUtils.endsWithIgnoreCase(stateMachine, "IngestWorkflow")) {
Expand Down

0 comments on commit edeaa5b

Please sign in to comment.