Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Bertil Muth
    @bertilmuth
    It's not a big deal.
    Frédéric THOMAS
    @doublefx
    good then
    Frédéric THOMAS
    @doublefx
    Also, Can you please add the sources to the build, since 1.8, it has been removed
    Bertil Muth
    @bertilmuth
    What? I didn't change anything in the build file, maybe something was wrong with the upload.
    I'll check the build file just to be absolutely sure.
    Frédéric THOMAS
    @doublefx
    ok, I'll see the fixed version whether I get the source.jar
    Bertil Muth
    @bertilmuth
    Yep. I see the sources.jar for v1.8 in Nexus Repository Manager. Odd.
    Frédéric THOMAS
    @doublefx
    yes, odd, my remote machine has crashed today, maybe some files have been corrupted,
    anyway good to know that's not on your side
    I was thinking that if you feel you need the step to be recorded even when the condition is false, maybe you can change the type from String to RecordedStep with String stepName, boolean condition, so the step will be recored but I can filter the false out
    Bertil Muth
    @bertilmuth
    I'm not clinging to my need, and already implemented the hotfix :-)
    Frédéric THOMAS
    @doublefx
    ok, great, sorry :-)
    Bertil Muth
    @bertilmuth
    Ok, you can use v1.8.1. Sources are available in my download.
    I meant: I can see the sources locally.
    Frédéric THOMAS
    @doublefx
    I use them as part of the maven artifact
    from my IDE
    is the maven artifact built and pushed?
    and I don't know what you mean "Sources are available in my download"
    Bertil Muth
    @bertilmuth
    I just downloaded v1.8.1 with Maven, and I can navigate to the sources with my IDE. Gradle as well. That's what I meant.
    Frédéric THOMAS
    @doublefx
    ah ok, thanks
    trying now
    weird
    image.png
    Frédéric THOMAS
    @doublefx
    Bertil Muth
    @bertilmuth
    And it worked before v1.8?
    Frédéric THOMAS
    @doublefx
    yes
    The test above now passes but, when condition is true, after systemPublish(), the returned event is not considered, it goes to the next step instead
    //@formatter:off
    return builder
    .useCase(PROCESS_ORDER)
        .basicFlow()
          .step(HANDLES_PROCESS_ORDER_START_EVENT).on(process_order_start_event).systemPublish(start_process_order)
          .step(HANDLES_ORDER_STATUS).system(handles_order_status)
          .step(HANDLES_EMPLOYMENT_STATUS).system(handles_employment_status)
          .step(HANDLES_PERSONAL_PENSION_ORDER_TYPE).system(handles_personal_pension_order_type)
          .step(HANDLES_VALIDATE_CEDING_PROVIDERS).inCase(is_personal_pension_transfer).systemPublish(validates_ceding_providers)
          .step(HANDLES_GCD_VALIDATION).systemPublish(validates_gcd)
          .step("HANDLES_VALIDATE_AML").system(stop)
    
        .flow(RUFUS_CHECK).after(HANDLES_PERSONAL_PENSION_ORDER_TYPE).condition(is_isa_product)
          .step(HANDLES_CHECK_RUFUS_STATUS).systemPublish(rufus_check_start).to(rufus_flow)
          .step(HANDLES_RUFUS_CHECK_SUCCESS).on(rufus_check_success).continuesAt(HANDLES_GCD_VALIDATION)
    
        .flow(CEDING_PROVIDERS_VALIDATION_FAILED)
          .step(HANDLES_CEDING_PROVIDERS_VALIDATION_FAILED).on(ceding_providers_validation_failed).systemPublish(respond_ceding_providers_failure_E104)
    
        .flow(PUBLISH_RESPONSE).anytime()
          .step(HANDLES_PUBLISH_RESPONSE).on(publish_response).systemPublish(response)
    
        .flow(PROCESS_ORDER_EXCEPTION).anytime()
          .step(HANDLES_PROCESS_ORDER_EXCEPTION).on(process_order_exception).system(stop_on_exception)
    
      .build();
    //@formatter:on

    @Test
    public void HANDLES_CEDING_PROVIDERS_VALIDATION_FAILED_respond_ceding_providers_failure_E104() {
    // GIVEN
    final PublishResponseEvent publishResponseEvent = of(new ResponseEntity<>(response, OK));

    given(cedingProvidersValidationStep.isPersonalPensionTransfer()).willReturn(true);
    given(cedingProvidersValidationStep.validateCedingProviders()).willReturn(cedingProvidersValidationFailed);
    given(cedingProvidersValidationStep.respondCedingProvidersFailureE104())
        .willReturn(publishResponseEvent);
    
    givenFlowWillStopAt(PUBLISH_RESPONSE);
    
    // WHEN
    modelRunner.reactTo(processOrderRequest);
    
    // THEN
    assertRecordedStepNames(HANDLES_PROCESS_ORDER_START_EVENT,
                            HANDLES_ORDER_STATUS,
                            HANDLES_EMPLOYMENT_STATUS,
                            HANDLES_PERSONAL_PENSION_ORDER_TYPE,
                            HANDLES_VALIDATE_CEDING_PROVIDERS,
                            HANDLES_CEDING_PROVIDERS_VALIDATION_FAILED,
                            HANDLES_PUBLISH_RESPONSE);

    }

    [Handles Process Order Start Event, Handles Order Status, Handles Employment Status, Handles Personal Pension Order Type, Handles Validate Ceding Providers, Handles GCD Validation, HANDLES_VALIDATE_AML]
    Frédéric THOMAS
    @doublefx
    works if I add .insteadOf(HANDLES_GCD_VALIDATION)
    Bertil Muth
    @bertilmuth
    to which flow? Sorry, I'm a bit lost.
    Frédéric THOMAS
    @doublefx
    I remember now what you told me yerterday, flows need conditions, the on() is not enough
    .flow(CEDING_PROVIDERS_VALIDATION_FAILED).insteadOf(HANDLES_GCD_VALIDATION)
    .step(HANDLES_CEDING_PROVIDERS_VALIDATION_FAILED).on(ceding_providers_validation_failed).systemPublish(respond_ceding_providers_failure_E104)
    Bertil Muth
    @bertilmuth
    Yes. You could use anytime() as well.
    The rule of thumb is: if it's not the basic flow, it needs a condition (or flow position).
    Frédéric THOMAS
    @doublefx
    Have a great weekend Bertil, I hope I won't disturb you for a while now, many thanks again
    Bertil Muth
    @bertilmuth
    You as well. I‘ll be on vacation now, but will check what‘s going on from time to time.
    Frédéric THOMAS
    @doublefx
    enjoy your free time then, fingers crossed, all is ok now
    Bertil Muth
    @bertilmuth
    Yeah, if you have any issues, feel free to post them in Gitter / raise a GitHub issue. I‘ll take care of it when I find the time. Just don‘t expect as rapid responses :-)
    Frédéric THOMAS
    @doublefx
    hehe, ok, actually, I expect no more issues
    because if there are some, i'll be in trouble
    Bertil Muth
    @bertilmuth
    I started writing some documentation on use cases with flows:
    I will continue when I find the time
    Bertil Muth
    @bertilmuth
    ... Updated to a simpler example
    Bertil Muth
    @bertilmuth
    Just released v1.8.2 that closes 2 loopholes in the builder API. Otherwise, there are no differences to v1.8.1.
    Bertil Muth
    @bertilmuth
    Updated the Readme to consistently refer to the Actor syntax
    Bertil Muth
    @bertilmuth
    Just released v1.9.
    See the issues for details. Main issue fixed is an issue with on(...).continuesAt(...)