I have written an Opaque Behavior (OB) where its body is a class path to java class and language is "Binary." I am able to execute this OB in the Expression Evaluation tool without a problem. (Note, the binary is written as a ParameterizedExpression.)
When I try to execute the OB as a Call Behavior Action on an activity diagram, the Simulator issues a warning: Unknown language 'Binary', Opaque Behavior XYZ was not evaluated. I need to be able to invoke a binary behavior from an activity diagram. How can I accomplish this?
Also, in this example, one of my parameters is defined as a javax.swing.JTextArea, and the Simulator considers this to be an illegal value even though it tells me it was expecting a javax.swing.JTextArea. (Passing it as a java.lang.Object also failed...because it was seeing a javax.swing.JTextArea!). Here is one of the warnings in full:
WARN: Illegal value, '[javax.swing.JTextArea[,0,0,570x280,layout=javax.swing.plaf.basic.BasicTextUI\\\$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=javax.swing.border.CompoundBorder@7761fa62,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=javax.swing.plaf.ColorUIResource[r=0,g=0,b=0],disabledTextColor=javax.swing.plaf.ColorUIResource[r=109,g=109,b=109],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=2,left=2,bottom=2,right=2],selectedTextColor=javax.swing.plaf.ColorUIResource[r=255,g=255,b=255],selectionColor=javax.swing.plaf.ColorUIResource[r=0,g=120,b=215],colums=0,columWidth=0,rows=0,rowHeight=0,word=true,wrap=true]]' is not javax.swing.JTextArea in Call Behavior Action. |
Here are some screen captures, first the FetchData java class is 'hooked' into the Opaque Behavior (which works in the Expression Evaluation tool:
Next, here is where FetchData is being referenced as a Call Behavior action in an activity diagram. The Simulator does not recognize the binary-based Opaque Expression and needlessly fusses about the textArea parameter:
What am I doing wrong? Why can I not execute a binary behavior in simulation?
Background: FetchData queues incoming UDP network packets and feeds them to a simulation's user interface when called upon.
