I am trying to unerstand the correct way how to model syncronous function call in Capella.
It’s possible to use one FunctionalExchange (Operation type) with ExchangeItem with input\output parameters. It;s possible to use two separate FunctionsExchnages (with Data type). One for input parameters. And another for output parameters.
Functional exchanges can be used to model data transfer in both direction using ExchangeItems with Operation type and input\outptut parameters. Input parameters are tarnsfered into FE direction. Output parameters are transfered to FE opposite direction. In this way transfer of return parameters is defined implilcitly.
This way is good as only one FE is used and it results in less clutter on diagrams. If you know sematics of transfering data in both direction it could be used. But from visual notation it’s not very obvious about backward transfer of data.
We can model output parameter transfer using the second functional exchange with a return semantics. In this way transfer of return parameters is defined explicitly. When this way is used diagrams become more cluttered (two FE are needed to call functions). But it’s in this way it’s more easily to understan data flows.
We will use the following ExchangeItems for these two cases
Let’s decompose LowLevelFunction for both cases
When send FE with output parameters are defined we will have simple result. All is clear
When only one FE with input and output paramaters is used we will have the folowing result
In the second case some function is needed to unpack input parameter from FE1 and pack output parameter to FE1 after it’s ready. I don’t like assing such sub function to unpack\pack input\output parameters. It’s not easy to interpretate for unsophisticated user of this diagram.
What do you think about using these two methods ?