0
votes

I have an Orchestration Step which works on some precondition, even if one of the precondition is satisfied the orchestration step gets skipped but I want it to work the other way.

If any of the Precondition is not satisfied I want that Orchestration Step to be executed.

Below is my orchestration step where if remember me checkbox is not checked (kmsiValue) then I want to run the orchestration step irrespective of other preconditions but I am not able to achieve that.

 <OrchestrationStep Order="7" Type="ClaimsExchange">
          <Preconditions>
            <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
              <Value>isActiveMFASession</Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
            <Precondition Type="ClaimEquals" ExecuteActionsIf="true">
             <Value>kmsiValue</Value>
             <Value>True</Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
            <Precondition Type="ClaimEquals" ExecuteActionsIf="true">
              <Value>isLastMFATimeGreaterThanWindow</Value>
              <Value>False</Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
          </Preconditions>
          <ClaimsExchanges>
            <ClaimsExchange Id="PhoneFactor-Verify-MFATimeWindow" TechnicalProfileReferenceId="PhoneFactor-InputOrVerify" />
          </ClaimsExchanges>
        </OrchestrationStep>

Update :

Sorry but I am a bit confused now , I already have a TP for Remember me , the value changes accordingly on checkbox selection

<ClaimsProvider>
  <DisplayName>Local Account</DisplayName>
  <TechnicalProfiles>
    <TechnicalProfile Id="SelfAsserted-LocalAccountSignin-Email">
      <Metadata>
        <Item Key="setting.enableRememberMe">True</Item>
      </Metadata>
       <InputClaims>
      <InputClaim ClaimTypeReferenceId="kmsiValue" DefaultValue="{Context:KMSI}" AlwaysUseDefaultValue="true"/>
</InputClaims>
          <OutputClaims>
                    <OutputClaim ClaimTypeReferenceId="kmsiValue" DefaultValue="{Context:KMSI}" AlwaysUseDefaultValue="true" />
           </OutputClaims>
    </TechnicalProfile>
  </TechnicalProfiles>
</ClaimsProvider>

The question I have is how can I split my orchestration steps now to make it work?

2

2 Answers

1
votes

I would split this into two sub journeys. One subjourney for KMSI=True, and another subjourney for KMSI=False. Then in this subjourney design the orchestration steps. Where KMSI=true, the orchestration step contains your other preconditions. Where KMSI=false, your orchestration step contains no preconditions.

0
votes

One way is to put all the logic into a REST API and return T or F depending on whether you want the step skipped.

The other way is to have a step that just checks KMSI. If that results in the TP being run, set a flag.

In the next step, check the flag and skip if the TP has been run. Otherwise, run the other steps.

Update

@Jas is a good idea but set a flag in the first step e.g.

<OutputClaim ClaimTypeReferenceId="kmsi" DefaultValue="true" AlwaysUseDefaultValue="true"/>

and use a precondition "claimsequal" in the second step.

"kmsi" should be boolean.