@@ -3,7 +3,7 @@ import { ItemBatcher } from './distributed-map/item-batcher';
33import { IItemReader } from './distributed-map/item-reader' ;
44import { ResultWriter , ResultWriterV2 } from './distributed-map/result-writer' ;
55import { MapBase , MapBaseJsonataOptions , MapBaseJsonPathOptions , MapBaseOptions , MapBaseProps } from './map-base' ;
6- import { Annotations , FeatureFlags , ValidationError } from '../../../core' ;
6+ import { Annotations , FeatureFlags } from '../../../core' ;
77import { FieldUtils } from '../fields' ;
88import { StateGraph } from '../state-graph' ;
99import { StateMachineType } from '../state-machine' ;
@@ -314,11 +314,6 @@ export class DistributedMap extends MapBase implements INextable {
314314 * Return the Amazon States Language object for this state
315315 */
316316 public toStateJson ( stateMachineQueryLanguage ?: QueryLanguage ) : object {
317- // https://docs.aws.amazon.com/step-functions/latest/dg/statemachine-structure.html
318- if ( stateMachineQueryLanguage == QueryLanguage . JSONATA && this . queryLanguage == QueryLanguage . JSON_PATH ) {
319- throw new ValidationError ( 'When StateMachine query language is JSONata, individual states cannot use JSONPath.' , this ) ;
320- }
321-
322317 let rendered : any = super . toStateJson ( stateMachineQueryLanguage ) ;
323318 if ( rendered . ItemProcessor . ProcessorConfig . ExecutionType ) {
324319 Annotations . of ( this ) . addWarningV2 ( '@aws-cdk/aws-stepfunctions:propertyIgnored' , 'Property \'ProcessorConfig.executionType\' is ignored, use the \'mapExecutionType\' in the \'DistributedMap\' class instead.' ) ;
@@ -327,9 +322,7 @@ export class DistributedMap extends MapBase implements INextable {
327322 rendered . ItemProcessor . ProcessorConfig . ExecutionType = this . mapExecutionType ;
328323 // ItemReader and ResultWriter configuration will base on the Map's query language.
329324 // If Map's query language is not specified, then use state machine's query language.
330- const stateQueryLanguage = stateMachineQueryLanguage == QueryLanguage . JSONATA
331- ? QueryLanguage . JSONATA
332- : this . queryLanguage ?? stateMachineQueryLanguage ;
325+ const stateQueryLanguage = this . queryLanguage ?? stateMachineQueryLanguage ;
333326
334327 const renderedResultWriter = this . renderResultWriter ( stateQueryLanguage ) ;
335328 this . addWarningIfResultWriterIsEmpty ( renderedResultWriter ) ;
0 commit comments