cancel
Showing results for 
Search instead for 
Did you mean: 

Abuse of the dataInputAssociation

bernd_ruecker
Champ in-the-making
Champ in-the-making
I now use the same shortcut for the CallActivity which is used in the WebServiceTask. But what I recognized is, that it only works if you disable schema validation (basically because the IDREF doesn’t have a correct target). See http://forums.activiti.org/en/viewtopic.php?f=4&t=885&p=3731#p3731

I would say that is a no go! Either we implement the spec correctly, or we add own extensions. And forcing people to disable schema validation for shortcuts is a pretty bad idea. What do you guys think? Or does anybody know an easy solution to get the schema validation to work?

To test/see it go to the CallActivityAdvancedTest / testSubProcessWithDataInputOutput and switch the schemaValidation attribute of the @Deployment annotation to true (and the test will fail).


Joram:
mmm, never noticed that. Thanks for pointing that out, because that is most certainly NOT the idea.

So there are two options here:
- removing the shortcut, and implementing the real deal
- fixing the shortcut

I4'm actually more in favour of the first option at this point, since we wont get any surprises from that …
20 REPLIES 20

jbarrez
Star Contributor
Star Contributor
Ok, I think I understand your reasoning. But I dont see the problem with completing (execution listeren end event) and completed (activityBehavior).

Where would that differentiation cause problems?

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
<callActivity id="callSubProcess" calledElement="simpleSubProcess" >
  <extensionElements>
    <activiti:in outerSource="superVariable" innerTarget="subVariable" />
    <activiti:smileysurprised:ut innerSourceExpression="#{someExpression + 3}" outerTarget="superVariable" />
  </extensionElements>
</callActivity>

But I'm not sure if this removes confusion instead adding.

WDYT?

I'm in favour of this one.. maybe with the dataInput/Output as Bernd described. Using the listener feels like abuse to me and it certainly is not directly clear if you write bpmn xml by hand 🙂

bernd_ruecker
Champ in-the-making
Champ in-the-making
Okay I asked Falko for his opinion as well, and he voted for the in/out extension. Since there were no more answers here, I implemented that and commit it.

Here the example from the new test case:


    <callActivity id="callSubProcess" calledElement="simpleSubProcess" >
   <extensionElements>
     <activiti:in source="superVariable" target="subVariable" />
     <activiti:smileysurprised:ut source="subVariable" target="superVariable" />
   </extensionElements>     
    </callActivity>

bernd_ruecker
Champ in-the-making
Champ in-the-making
Okay, I added a new schema version ending with 5.2, any more to do in that area?

For the webservices I created http://jira.codehaus.org/browse/ACT-570

jbarrez
Star Contributor
Star Contributor
I'll look at the code tomorrow morning.

Have you documented and tested it?

bernd_ruecker
Champ in-the-making
Champ in-the-making
See http://jira.codehaus.org/browse/ACT-560, documentation is still open since we decided on a final version.
A TestCase is there, yes.

tombaeyens
Champ in-the-making
Champ in-the-making
Bernd, we've reviewed the names once more and think that we should go for these names:

<callActivity id="callSubProcess" calledElement="simpleSubProcess" >
  <extensionElements>
    <activiti:variableIn superVariable="superVariable" subVariable="subVariable" />
    <activiti:variableOut subVariable="subVariable" superVariable="superVariable" />
  </extensionElements>     
</callActivity>

Can you update the parsing?

bernd_ruecker
Champ in-the-making
Champ in-the-making
Hi Tom.
Then it doesn't fit for ServiceTask's any more, that's why I don't like the "variable" in the name any more. Then it is 100% bound to CallActivities.
Where is the advantage?
Cheers
Bernd

tombaeyens
Champ in-the-making
Champ in-the-making
Can you remind me about the situation how this was to be used for service tasks?

There were a couple of situations that I wanted to unify at first.  But we've gone through those yesterday when I was talking to Joram and we only found one (task properties) and decided that that is OK to be dealt with differently.

bernd_ruecker
Champ in-the-making
Champ in-the-making
The ServiceTask Shortcut to pass parameters and hand results… See Tests for the WebServiceTask (the "…simplistic…" one).