Skip to content

Commit

Permalink
FIX stato trasmissione
Browse files Browse the repository at this point in the history
  • Loading branch information
mspasiano committed Jul 14, 2018
1 parent 551660f commit f5107e9
Showing 1 changed file with 9 additions and 12 deletions.
Expand Up @@ -208,18 +208,15 @@ public Forward basicDoBringBack(ActionContext actioncontext) throws BusinessProc
public Forward doRicercaLibera(ActionContext context) {
AbstractFirmaDigitaleDocContBP bp = (AbstractFirmaDigitaleDocContBP)context.getBusinessProcess();
try {
Optional<StatoTrasmissione> statoTrasmissione = Optional.ofNullable(bp.getModel())
.filter(StatoTrasmissione.class::isInstance)
.map(StatoTrasmissione.class::cast);
if (statoTrasmissione.isPresent()) {
bp.setModel(context, statoTrasmissione
.map(stato -> {
stato.setStato_trasmissione(StatoTrasmissione.ALL);
return statoTrasmissione;
}).map(OggettoBulk.class::cast).orElse(null));
bp.setColumnSet(context, statoTrasmissione.get().getStato_trasmissione());
}
} catch (BusinessProcessException e) {
bp.setModel(context, Optional.ofNullable(bp.getModel())
.filter(StatoTrasmissione.class::isInstance)
.map(StatoTrasmissione.class::cast)
.map(statoTrasmissione -> {
statoTrasmissione.setStato_trasmissione(StatoTrasmissione.ALL);
return statoTrasmissione;
}).map(OggettoBulk.class::cast).orElse(null));
bp.setColumnSet(context, StatoTrasmissione.ALL);
} catch (BusinessProcessException e) {
return handleException(context, e);
}
return super.doRicercaLibera(context);
Expand Down

0 comments on commit f5107e9

Please sign in to comment.