eclipselabs/passerelle

Problem with fork/join actor in submodels

Closed this issue · 4 comments

What steps will reproduce the problem?
1. Create a submodel with a fork and a join actor
2. Create a workflow which uses this submodel
3. Execute the workflow

What is the expected output? What do you see instead?

The DAWN fork and join actors work fine if used in the workflow top-level. 
However, in a submodel I get the following error:

16:30:24.726 TRACE .test_forkJoin_subModel.testForkJoinSubModule.Fork - 
doFire() - obtained response 
    Independent msgs:
        2: msgID=2
        1: msgID=3
    Sequenced msgs: 
16:30:24.727 TRACE .test_forkJoin_subModel.testForkJoinSubModule.Fork - 
doFire() - exit 
16:30:24.727 TRACE .test_forkJoin_subModel.testForkJoinSubModule.Fork doFire() 
- exit 
16:30:24.727 TRACE Fork -  - fire() - exit 
16:30:24.727 TRACE Fork -  - postfire() - entry 
16:30:24.727 TRACE .test_forkJoin_subModel.testForkJoinSubModule.Fork 
doPostFire() - entry 
16:30:24.728 TRACE .test_forkJoin_subModel.testForkJoinSubModule.Fork - 
doPostFire() - entry 
16:30:24.742 ERROR .test_forkJoin_subModel.testForkJoinSubModule.Fork 
postfire() -generated exception during doPostFire() 
java.lang.IllegalArgumentException: port .testForkJoinSubModule.Fork.2 not 
defined in actor .test_forkJoin_subModel.testForkJoinSubModule.Fork
    at com.isencia.passerelle.actor.Actor.sendOutputMsg(Actor.java:1123) [com.isencia.passerelle.engine/:na]
    at com.isencia.passerelle.actor.v5.Actor.processFinished(Actor.java:529) [com.isencia.passerelle.engine/:na]
    at com.isencia.passerelle.actor.v5.Actor.doPostFire(Actor.java:363) [com.isencia.passerelle.engine/:na]
    at com.isencia.passerelle.actor.Actor.postfire(Actor.java:746) [com.isencia.passerelle.engine/:na]
    at com.isencia.passerelle.domain.ProcessThread.doActorIterationWithoutEvents(ProcessThread.java:251) [com.isencia.passerelle.engine/:na]
    at com.isencia.passerelle.domain.ProcessThread.run(ProcessThread.java:131) [com.isencia.passerelle.engine/:na]
16:30:24.745 DEBUG notifyActorInactive() - Marking actor 
.test_forkJoin_subModel.testForkJoinSubModule.Fork as inactive. 
16:30:24.746 TRACE Fork -  - postfire() - exit - false 
16:30:24.746 DEBUG .test_forkJoin_subModel.testForkJoinSubModule.Fork - Error 
in ProcessThread ptolemy.kernel.util.IllegalActionException:   in 
.test_forkJoin_subModel.testForkJoinSubModule.Fork
Because:
port .testForkJoinSubModule.Fork.2 not defined in actor 
.test_forkJoin_subModel.testForkJoinSubModule.Fork 
16:30:24.746 TRACE Fork -  - wrapup() - entry 

Please use labels and text to provide additional information.

Tested in master version of DAWN under linux x64 (Ubuntu 1210). I called the 
two ports of the fork actor '1' and '2'.

Original issue reported on code.google.com by s.olof.svensson@gmail.com on 17 Jun 2013 at 2:35

Example fork/join actor submodel.

Original comment by s.olof.svensson@gmail.com on 17 Jun 2013 at 2:38

Attachments:

Olof, 

Could it be that you don't have the actual version of 
com.isencia.passerelle.actor in your DAWN passerelle fork?

Can you synchronize this bundle and retest (or at least the package 
com.isencia.passerelle.actor.dynaport) ?

The OutputPortBuilder, which is used by the Fork actor, was updated in April to 
resolve some cloning issues. (and submodels involve cloning).

I added a test case in the com.isencia.passerelle.actor.forkjoin.test and it 
runs fine as is...

Original comment by erwin...@gmail.com on 19 Jun 2013 at 9:23

  • Changed state: Started
Hi Erwin,

Yes, updating com.isencia.passerelle.actor to the latest revision did the 
trick! My test workflow with a fork/join in a submodel now runs fine. Thanks a 
lot for the help!

Olof

Original comment by s.olof.svensson@gmail.com on 19 Jun 2013 at 10:24

  • Changed state: Fixed

Original comment by erwin...@gmail.com on 5 May 2014 at 2:52

  • Changed state: Verified