AnsweredAssumed Answered

Condition on sequence flow

Question asked by lykm02 on Feb 1, 2012
Latest reply on Feb 2, 2012 by lykm02
I have read some example from user guide page. Those cases like the following case:

    <sequenceFlow id="endFlow1" sourceRef="exclusiveGw" targetRef="theEnd">
         [b]<conditionExpression xsi:type="tFormalExpression">${loanRequest.approved}</conditionExpression>[/b]
         Are there other xsi:type allowed? E.g. class?
         And I find tFormalExpression in xsd which can be replaced by "expression".
        
    </sequenceFlow>


I am confused by xsi:type="tFormalExpression".
If  tFormalExpression is unique value for xsi:type, why not set it as default value? If not, what are optional cases?

My idea is that I want to extend conditionExpression by class, instead of injecting some instance of class into process instance.
Because it will lead to clear code.
E.g.
When config file as following :

    <sequenceFlow id="endFlow1" sourceRef="exclusiveGw" targetRef="theEnd">
         [b]<conditionExpression xsi:type="class"><extension name="com.xxx.xxxx.condition"></conditionExpression>[/b]
    </sequenceFlow>


Java Code could be simply

     // Those two line can be noted, And we can focus on how to push process instance.
     // Otherwise, we should set condition variable. Why not move those logic into other class?
     // loanrequest = xxxService.find();
     // runtimeService.setVariable(execution.getId(), "loanrequest", loanrequest);
     runtimeService.signal(execution.getId());

Hope for your explain.

Outcomes