Step 5: Adding the Postponed Workflow State to the Composite State
To add the Postponed
workflow state to the composite state, do the
following:
- In the
SOInvoiceRepairOrder_Workflow
class, add thePostponed
workflow state in the WithFlowStates method, as shown in the following code.flowStates.UpdateSequence<ARDocStatus.HoldToBalance>( seq => { return seq.WithStates(states => { states.Add<ARDocStatus_Postponed.postponed>( flowState => { return flowState .PlaceAfter<ARDocStatus.creditHold>() .IsSkippedWhen(conditions.DiscountEmpty) .WithActions(actions => { actions.Add(approveDiscount, action => action .IsDuplicatedInToolbar() .WithConnotation( ActionConnotation.Success)); }); }); }); });
In the code above, you have done the following:
- Added the
Postponed
workflow state after theCreditHold
workflow state - Specified that the
Postponed
workflow state should be skipped if theDiscountEmpty
condition is true - Added the
approveDiscount
action to thePostponed
workflow state
- Added the
- Save your changes.