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_Workflowclass, add thePostponedworkflow 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
Postponedworkflow state after theCreditHoldworkflow state - Specified that the
Postponedworkflow state should be skipped if theDiscountEmptycondition is true - Added the
approveDiscountaction to thePostponedworkflow state
- Added the
- Save your changes.
