6 Replies Latest reply on Mar 28, 2006 10:31 PM by jhudson

    how to add metadata... if possible?

    jhudson

      I would like to add metadata to the task and transition nodes similar to the way hibernate works:
      <transition ...>
      bar1
      bar2


      And then, be able to access this information from the process definition. Is this possible.. or is there any other way to do this? Thanks.

      Joe

        • 1. Re: how to add metadata... if possible?
          jhudson

          sorry, I forgot to put the example in a code block so it got all messed up

          <transition ...>
           <meta attribute="foo1">bar1</meta>
           <meta attribute="foo2">bar2</meta>
          </transition>


          • 2. Re: how to add metadata... if possible?
            jhudson

            Please, can anybody help me with this? How can I add metadata? Thanks very much.

            Joe

            • 3. Re: how to add metadata... if possible?
              michaelchanin

              I'm 99% sure this feature doesn't exist.

              jBPM developers, could this be added? I'd also have use for this.

              • 4. Re: how to add metadata... if possible?
                aguizar

                If you mean something like transition.getMetaAttr("foo1") and get "bar1" in return, I'm afraid that's not possible. This doesn't mean you can't supply a similar facility with a little bit of creativity.

                The FileDefinition gives you access to custom files in the process archive. There is a method Node.getFullyQualifiedName() which returns an XPath-style string that uniquely identifies the node. You could add an XML document to your archive with elements structured as per the fully qualified name of the node and put whatever attributes and child nodes you please. You could even create a MetadataDefinition that inherited from ModuleDefinition that encapsulated these details:

                public class MetadataDefinition extends ModuleDefinition {
                 public Element getMetadata(Node n);
                 public Element getMetadata(Transition t);
                }

                Alternatively, you can file a request feature in JIRA. But please be patient :-)

                • 5. Re: how to add metadata... if possible?
                  jhudson

                  Please, there must be people writing presentation layers around JBPM, right? Could somebody please give me some advice as to how to store presentation-related data associated with the workflow definition. For example, what screen should I show for a given task... If there are more than 1 transition, which one should be defaulted...

                  I entered a Jira task a long time ago but no one seems to care. I really want to use JBPM but I also require the ability to create a nice presentation as well. Any advice would be greatly appreciated. Thanks.

                  Joe

                  • 6. Re: how to add metadata... if possible?
                    jhudson

                    Maybe voting would help. If anybody thinks this might be helpful, please vote for it. The task can be found here: http://jira.jboss.com/jira/browse/JBPM-581