File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
impl/test/src/test/java/io/serverlessworkflow/impl/test Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -171,4 +171,28 @@ void test_export_as_with_taskInput_utility() {
171171
172172 softly .assertAll ();
173173 }
174+
175+ @ Test
176+ void test_using_fluent () {
177+ SoftAssertions softly = new SoftAssertions ();
178+
179+ Workflow workflow =
180+ FuncWorkflowBuilder .workflow ("enrichOutputWithInputTest" )
181+ .tasks (
182+ function ("sumFive" , (Long input ) -> input + 5 , Long .class )
183+ .inputFrom (
184+ (object , workflowContext , taskContextData ) ->
185+ taskOutput (taskContextData , Long .class ) * 2 ))
186+ .build ();
187+
188+ try (WorkflowApplication app = WorkflowApplication .builder ().build ()) {
189+ WorkflowDefinition def = app .workflowDefinition (workflow );
190+ WorkflowModel model = def .instance (10L ).start ().join ();
191+ Number number = model .asNumber ().orElseThrow ();
192+
193+ softly .assertThat (number .longValue ()).isEqualTo (25L );
194+ }
195+
196+ softly .assertAll ();
197+ }
174198}
You can’t perform that action at this time.
0 commit comments