diff --git a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/CreateNewChatFlow.java b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/CreateNewChatFlow.java index 3082d0a..cb5bf45 100644 --- a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/CreateNewChatFlow.java +++ b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/CreateNewChatFlow.java @@ -132,7 +132,7 @@ public class CreateNewChatFlow implements RPCStartableFlow { return flowEngine.subFlow(new FinalizeChatSubFlow(signedTransaction, otherMember.getName())); } catch (Exception e) { - log.warn("Failed to process utxo flow for request body '$requestBody' because:'${e.message}'"); + log.warn("Failed to process utxo flow for request body " + requestBody + " because: " + e.getMessage()); throw new CordaRuntimeException(e.getMessage()); } } diff --git a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/UpdateChatFlow.java b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/UpdateChatFlow.java index 75d8da0..831275d 100644 --- a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/UpdateChatFlow.java +++ b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/UpdateChatFlow.java @@ -75,7 +75,7 @@ public class UpdateChatFlow implements RPCStartableFlow { List> chatStates = ledgerService.findUnconsumedStatesByType(ChatState.class); List> chatStatesWithId = chatStates.stream() - .filter(sar -> sar.getState().getContractState().getId() == flowArgs.getId()).collect(toList()); + .filter(sar -> sar.getState().getContractState().getId().equals(flowArgs.getId())).collect(toList()); if (chatStatesWithId.size() != 1) throw new CordaRuntimeException("Multiple or zero Chat states with id " + flowArgs.id + " found"); StateAndRef stateAndRef = chatStatesWithId.get(0); @@ -84,7 +84,7 @@ public class UpdateChatFlow implements RPCStartableFlow { ChatState state = stateAndRef.getState().getContractState(); List members = state.getParticipants().stream().map( - it -> requireNonNull(memberLookup.lookup(it), "Member not found from Key") + it -> requireNonNull(memberLookup.lookup(it), "Member not found from public Key "+ it + ".") ).collect(toList()); // Now we want to check that there is only one member other than ourselves in the chat. @@ -108,7 +108,7 @@ public class UpdateChatFlow implements RPCStartableFlow { return flowEngine.subFlow(new FinalizeChatSubFlow(signedTransaction, otherMember.getName())); } catch (Exception e) { - log.warn("Failed to process utxo flow for request body '$requestBody' because:'${e.message}'"); + log.warn("Failed to process utxo flow for request body " + requestBody + " because: " + e.getMessage()); throw e; } }