Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #151 in AAP/plexus-interop-github-staging from AAP…
Browse files Browse the repository at this point in the history
…/plexus-interop:master to db-contrib/develop

* commit '962b40d1ef0446cede2642c6926bdfb906ca3e59':
  AAP-19502 Web Plexus: [launch_on_call = ALWAYS] option is not respected on call
  • Loading branch information
MaxWellHays committed Nov 18, 2020
2 parents d8883fc + 962b40d commit 17f50aa
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions web/packages/broker/src/broker/InvocationRequestHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,18 @@ export class InvocationRequestHandler {
return appConnection;
} else {
const targetMethods = this.registryService.getMatchingProvidedMethods(sourceConnection.applicationId, methodReference);
const targetAppIds = targetMethods
.map(method => method.providedService.application.id);
const appConnection = await this.appLifeCycleManager.getOrSpawnConnectionForOneOf(targetAppIds, sourceConnection.instanceId);
return appConnection;
if (
targetMethods.length === 1 &&
targetMethods[0].options.filter(o => o.id === "interop.ProvidedMethodOptions.launch_on_call" && o.value === "ALWAYS").length > 0
) {
const appConnection = await this.appLifeCycleManager.spawnConnection(targetMethods[0].providedService.application.id);
return appConnection;
} else {
const targetAppIds = targetMethods
.map(method => method.providedService.application.id);
const appConnection = await this.appLifeCycleManager.getOrSpawnConnectionForOneOf(targetAppIds, sourceConnection.instanceId);
return appConnection;
}
}
}


}

0 comments on commit 17f50aa

Please sign in to comment.