@@ -369,66 +369,67 @@ void testActionDefForEach() {
369369 }
370370
371371 /**
372- * @see <a href="https://github.com/serverlessworkflow/sdk-java/issues/213">Retry definition validation doesn't work</a>
372+ * @see <a href="https://github.com/serverlessworkflow/sdk-java/issues/213">Retry definition
373+ * validation doesn't work</a>
373374 */
374375 @ Test
375376 public void testValidateRetry () {
376377 WorkflowValidator workflowValidator = new WorkflowValidatorImpl ();
377378 List <ValidationError > validationErrors =
378- workflowValidator
379- .setSource (
380- "{\n "
381- + " \" id\" : \" workflow_1\" ,\n "
382- + " \" name\" : \" workflow_1\" ,\n "
383- + " \" description\" : \" workflow_1\" ,\n "
384- + " \" version\" : \" 1.0\" ,\n "
385- + " \" specVersion\" : \" 0.8\" ,\n "
386- + " \" start\" : \" Task1\" ,\n "
387- + " \" functions\" : [\n "
388- + " {\n "
389- + " \" name\" : \" increment\" ,\n "
390- + " \" type\" : \" custom\" ,\n "
391- + " \" operation\" : \" worker\" \n "
392- + " }\n "
393- + " ],\n "
394- + " \" retries\" : [\n "
395- + " {\n "
396- + " \" maxAttempts\" : 3\n "
397- + " },\n "
398- + " {\n "
399- + " \" name\" : \" testRetry\" \n "
400- + " }\n "
401- + " ],\n "
402- + " \" states\" : [\n "
403- + " {\n "
404- + " \" name\" : \" Task1\" ,\n "
405- + " \" type\" : \" operation\" ,\n "
406- + " \" actionMode\" : \" sequential\" ,\n "
407- + " \" actions\" : [\n "
408- + " {\n "
409- + " \" functionRef\" : {\n "
410- + " \" refName\" : \" increment\" ,\n "
411- + " \" arguments\" : {\n "
412- + " \" input\" : \" some text\" \n "
413- + " }\n "
414- + " },\n "
415- + " \" retryRef\" : \" const\" ,\n "
416- + " \" actionDataFilter\" : {\n "
417- + " \" toStateData\" : \" ${ .result }\" \n "
418- + " }\n "
419- + " }\n "
420- + " ],\n "
421- + " \" end\" : true\n "
422- + " }\n "
423- + " ]\n "
424- + "}" )
425- .validate ();
379+ workflowValidator
380+ .setSource (
381+ "{\n "
382+ + " \" id\" : \" workflow_1\" ,\n "
383+ + " \" name\" : \" workflow_1\" ,\n "
384+ + " \" description\" : \" workflow_1\" ,\n "
385+ + " \" version\" : \" 1.0\" ,\n "
386+ + " \" specVersion\" : \" 0.8\" ,\n "
387+ + " \" start\" : \" Task1\" ,\n "
388+ + " \" functions\" : [\n "
389+ + " {\n "
390+ + " \" name\" : \" increment\" ,\n "
391+ + " \" type\" : \" custom\" ,\n "
392+ + " \" operation\" : \" worker\" \n "
393+ + " }\n "
394+ + " ],\n "
395+ + " \" retries\" : [\n "
396+ + " {\n "
397+ + " \" maxAttempts\" : 3\n "
398+ + " },\n "
399+ + " {\n "
400+ + " \" name\" : \" testRetry\" \n "
401+ + " }\n "
402+ + " ],\n "
403+ + " \" states\" : [\n "
404+ + " {\n "
405+ + " \" name\" : \" Task1\" ,\n "
406+ + " \" type\" : \" operation\" ,\n "
407+ + " \" actionMode\" : \" sequential\" ,\n "
408+ + " \" actions\" : [\n "
409+ + " {\n "
410+ + " \" functionRef\" : {\n "
411+ + " \" refName\" : \" increment\" ,\n "
412+ + " \" arguments\" : {\n "
413+ + " \" input\" : \" some text\" \n "
414+ + " }\n "
415+ + " },\n "
416+ + " \" retryRef\" : \" const\" ,\n "
417+ + " \" actionDataFilter\" : {\n "
418+ + " \" toStateData\" : \" ${ .result }\" \n "
419+ + " }\n "
420+ + " }\n "
421+ + " ],\n "
422+ + " \" end\" : true\n "
423+ + " }\n "
424+ + " ]\n "
425+ + "}" )
426+ .validate ();
426427
427428 Assertions .assertNotNull (validationErrors );
428429 Assertions .assertEquals (2 , validationErrors .size ());
429430 Assertions .assertEquals ("Retry name should not be empty" , validationErrors .get (0 ).getMessage ());
430431 Assertions .assertEquals (
431- "Operation State action 'null' retryRef does not reference an existing workflow retry definition" ,
432- validationErrors .get (1 ).getMessage ());
432+ "Operation State action 'null' retryRef does not reference an existing workflow retry definition" ,
433+ validationErrors .get (1 ).getMessage ());
433434 }
434435}
0 commit comments