-
1. Re: [jBPM 4.3] Transition - Custom Attributes
rebody May 25, 2010 11:19 PM (in response to jbpm4user)Hi Rams,
Now, Transition cannot store/parse custom attributes. Since the transitionImpl was a part of internal pvm, it cannot be override either. It seems like that we should let transition pluggable.
Create a TransitionBuilder for this scenario may be a good idea, But how could we handle the additional customized attributes in transition? JpdlParser won't parse these additional attribute now.
So I think this will be a huge task, and we should dig deeper.
-
2. Re: [jBPM 4.3] Transition - Custom Attributes
jbpm4user May 26, 2010 5:10 PM (in response to rebody)Thanks HuiSheng,
I was thinking if attributes could be added as key value pairs to TransitionImpl, Looked at the code in JpdlParser where the transitions are getting parsed currently.
public void parseTransitions(Element element, ActivityImpl activity, Parse parse) {List<Element> transitionElements = XmlUtil.elements(element, "transition");UnresolvedTransitions unresolvedTransitions = parse.findObject(UnresolvedTransitions.class);for (Element transitionElement: transitionElements) {String transitionName = XmlUtil.attribute(transitionElement, "name", false, parse);Element timerElement = XmlUtil.element(transitionElement, "timer");if (timerElement!=null) {TimerDefinitionImpl timerDefinitionImpl = parseTimerDefinition(timerElement, parse, activity);timerDefinitionImpl.setSignalName(transitionName);}TransitionImpl transition = activity.createOutgoingTransition();transition.setName(transitionName);unresolvedTransitions.add(transition, transitionElement);parseOnEvent(transitionElement, parse, transition, Event.TAKE);}}Do you think will it be possible to be fixed for next jBPM release say 4.5 (are you part of jboss jbpm team) ?
-
3. Re: [jBPM 4.3] Transition - Custom Attributes
rebody May 26, 2010 9:57 PM (in response to jbpm4user)Hi Rams,
I can commit some patches into svn repo. But Alejandro is in charge. So if we want to achieve some big feature like this, we should let him know.
Maybe you could open a JIRA issue for this. And we could discuss this later. Recently we are focusing on bug fixes for releasing jBPM-4.4. Thank you very much.
-
4. Re: [jBPM 4.3] Transition - Custom Attributes
swiderski.maciej May 27, 2010 2:08 AM (in response to rebody)HI,
I am afraid that this is not the right way to go (at least as far as I understood it). If we let custom (unknown and unlimited) attributes to be placed on transition (or any other element) we will not be able to validate the xml against xsd. Another thing is how shall it be accessible from an execution?
In my opinion you could use variables for this purpose. Especially that 4.4 will have support for variable declaration within jpdl so everything stays on the process definition level. Your JSP pages can access process variable and get interesting value for a given outcome.
-
5. Re: [jBPM 4.3] Transition - Custom Attributes
jbpm4user May 28, 2010 12:42 PM (in response to swiderski.maciej)I am afraid that this is not the right way to go (at least as far as I understood it). If we let custom (unknown and unlimited) attributes to be placed on transition (or any other element) we will not be able to validate the xml against xsd.
-- agree to it completely.
Another thing is how shall it be accessible from an execution?
-- i was thinking from activity as it has api for incoming and outgoing transitions, each of these transitions could have the attributes..but may not be right way to do it.