0

I want to re-use code abstracted out as activity diagrams in Cameo Systems Modeler. I plan to make them functions which accept input variables and return other variables.

I am noticing that None gets passed out of the sub-diagram to its calling parent. How can I overcome this limitation?

I have already added input and output nodes to the model for the nested activity, and they appear both in the parent view and the nested view. I got a yellow/orange "warning" around the nested activity diagram which provided a clickable menu with a warning triangle symbol and options to automatically add the input(s) and output(s) to the nested activity diagram.

If I want to re-use these activity diagrams, do I have to make sure the input and output variables of the calling parent match what shows in the nested diagram? I believe I have done that and yet I cannot figure out what is wrong.

I was hoping that the variable would be passed up to the calling parent, but it is not getting passed. I have even "debugged" by setting breakpoints and watching what happens in the nested diagram, and the problem is the interface with the caller, not in the nested diagram.

5
  • Diagrams can not be used. Diagrams are there to present model information to humans. You can instantiate activities in form of actions, though. Commented Feb 9, 2023 at 10:02
  • @qwerty_so what are opaque blocks then? Commented Feb 9, 2023 at 13:23
  • Probably opaque blocks. Like bricks. Show a picture of what you think you're talking of. Commented Feb 9, 2023 at 13:39
  • @qwerty_so I meant opaque actions. They are for code execution only. That is what I am using them for. Commented Feb 9, 2023 at 16:12
  • Well, an OpaqueAction is an Action whose functionality is not specified within UML as the specs say. But you are talking about diagrams above. Why not add some picture to clarify what you mean? Commented Feb 9, 2023 at 16:36

1 Answer 1

1

I understand your question as: "How to pass objects from CallBehaviorActions to the called Activity and back?"

Actually, that should be straight forward. Just define an Activity with ActivityParameterNodes. When you drop such an Activity on the diagram of another Activity, Cameo will create a CallBehaviorAction with matching Pins. That's it.

Of course, you can also create matching Pins manually.

Sign up to request clarification or add additional context in comments.

2 Comments

And then you have to connect those nodes (with object flow connectors) to something within the called activity diagram to make the objects (tokens)? actually flow in or out.
Well, if you don't do this, you are just ignoring the input or generating null tokens as output. If that is what you want - UML allows it Please note that tokens are flowing. Object tokens reference objects.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.