AnsweredAssumed Answered

Populating in/out parameters using CallActivityParseHandler

Question asked by gokceng1 on Dec 18, 2013
Latest reply on Dec 19, 2013 by jbarrez
Hello,
Till this day, I've used parse handlers to assign listeners to the different types of activities. I've tried to add some io parameters to a call activity while parsing:


@Override
protected void executeParse(BpmnParse bpmnParse, CallActivity callActivity) {
   super.executeParse(bpmnParse, callActivity);
   initInOutParameters(callActivity);
}

The code above is ok. I saw the inParameters list populated. But in DefaultActivityBehaviorFactory.java class, the parameter of createCallActivityBehavior method doesn't have any ioParameter in it. Because, this method(createCallActivityBehavior) is called beforehand(by the super). When I've populated the io parameters, it has already assigned the io parameters.
What I want to ask is, do I need to change my approach and by-pass super call and do whatever super does. Like this:


@Override
protected void executeParse(BpmnParse bpmnParse, CallActivity callActivity) {
   //super.executeParse(bpmnParse, callActivity);
   ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, callActivity, BpmnXMLConstants.ELEMENT_CALL_ACTIVITY);
   activity.setScope(true);
   initInOutParameters(callActivity);
   activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createCallActivityBehavior(callActivity));
}

What do you think about this? How can I solve this because this is not a good solution I think. I need to have a hook for this, like a postParse method.

Outcomes