protected BaseFlow( PlatformInfo platformInfo, Map<Object, Object> properties, Config defaultConfig, String name, Map<String, String> flowDescriptor ) { if( platformInfo != null ) this.platformInfo = platformInfo; this.name = name; if( flowDescriptor != null ) this.flowDescriptor = new LinkedHashMap<>( flowDescriptor ); addSessionProperties( properties ); initConfig( properties, defaultConfig ); }
protected BaseFlow( PlatformInfo platformInfo, Map<Object, Object> properties, Config defaultConfig, FlowDef flowDef ) { properties = PropertyUtil.asFlatMap( properties ); if( platformInfo != null ) this.platformInfo = platformInfo; this.name = flowDef.getName(); this.tags = flowDef.getTags(); this.runID = flowDef.getRunID(); this.classPath = flowDef.getClassPath(); if( !flowDef.getFlowDescriptor().isEmpty() ) this.flowDescriptor = new LinkedHashMap<>( flowDef.getFlowDescriptor() ); addSessionProperties( properties ); initConfig( properties, defaultConfig ); setSources( flowDef.getSourcesCopy() ); setSinks( flowDef.getSinksCopy() ); setTraps( flowDef.getTrapsCopy() ); setCheckpoints( flowDef.getCheckpointsCopy() ); initFromTaps(); retrieveSourceFields(); retrieveSinkFields(); }