[jboss-jira] [JBoss JIRA] Commented: (GPD-77) Need a way to initialize palette objects in GD 3.1

Koen Aers (JIRA) jira-events at lists.jboss.org
Tue Aug 14 18:23:05 EDT 2007


    [ http://jira.jboss.com/jira/browse/GPD-77?page=comments#action_12372168 ] 
            
Koen Aers commented on GPD-77:
------------------------------

So I answered to quickly (it is already past midnight here ;-) )

The solution for your problem is using either the initialize() method or do the initialization in the constructor. If the constructor or the initialize() method gets called when reading the diagram from the xml, you *have* to make sure in the adapter that the proper values for the attributes and nested elements are written into the newly created (and possibly wrongly initialized) semantic element object. This is done by the XmlAdapter.initialze(SemanticElement) method for the XmlAdapter of this particular semantic element.

Have e.g. a look at the Task/TaskDomAdapter combo. Newly created instances of a task have attributes initialized to particular values. The initalize(SemanticElement) method in TaskDomAdapter will override these attributes with the values found in the xml.

Hope this helps,
Koen

> Need a way to initialize palette objects in GD 3.1
> --------------------------------------------------
>
>                 Key: GPD-77
>                 URL: http://jira.jboss.com/jira/browse/GPD-77
>             Project: JBoss jBPM GPD
>          Issue Type: Feature Request
>          Components: jpdl
>    Affects Versions: jBPM JPDL Designer 3.1.0.alpha4
>            Reporter: John Ruud
>         Assigned To: Koen Aers
>             Fix For: jBPM JPDL Designer 3.1.0.beta2
>
>         Attachments: GPD-77.patch
>
>
> For example, whenever an 'EndState' node is added to the diagram, I need for it to be initialized with a particular event, action, and some action properties. I have made some minor changes to the GD code in order to support this, as described in the following post: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=108175
> It would be very helpful if these changes, or similar functionality, can be included in 3.1, as I wouldn't need to keep maintaining my own custom version of the GD feature. I'd be happy to post a patch, if that helps (while my changes are very simple, as described in the post)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list