groupAbstractPartyByWellKnownParty - corda

corda / net.corda.core.identity / groupAbstractPartyByWellKnownParty

# groupAbstractPartyByWellKnownParty

`fun groupAbstractPartyByWellKnownParty(serviceHub: ServiceHub, parties: Collection<AbstractParty>, ignoreUnrecognisedParties: Boolean): Map<Party, List<AbstractParty>>`

Group each AbstractParty by the well known party using the ServiceHub.identityService, in preparation for creating FlowSessions, for example.

### Parameters

`parties` - the AbstractPartys to group.

`ignoreUnrecognisedParties` - if this is false, throw an exception if some of the AbstractPartys cannot be mapped to a Party.

Return
a map of well known Party to associated AbstractPartys.

`fun groupAbstractPartyByWellKnownParty(serviceHub: ServiceHub, parties: Collection<AbstractParty>): Map<Party, List<AbstractParty>>`

Group each AbstractParty by the well known party using the ServiceHub.identityService, in preparation for creating FlowSessions, for example. Throw an exception if some of the AbstractPartys cannot be mapped to a Party.

### Parameters

`parties` - the AbstractPartys to group.

Return
a map of well known Party to associated AbstractPartys.