2 Replies Latest reply on Jul 4, 2011 8:02 AM by David Faulstich

    TaskInstance

    sarvesh nallamilli Newbie

      How to create a new column in TaskInstance.


      Plz help

        • 1. Re: TaskInstance
          Leo van den berg Master

          Hi,


          Please try to Google first, because there are several sites where you can find an answer. You need to replace the implementation of TaskInstance  with your own implementation and register it. As an additional warning: do not add a column to store domain objcts. It is not the way to go.


          Leo

          • 2. Re: TaskInstance
            David Faulstich Newbie
            <blockquote>
            _sarvesh nallamilli wrote on Jun 29, 2011 06:30:_<br/>

            How to create a new column in TaskInstance.

            Plz help
            </blockquote>

            I never do that (add a columnn), but I think that you will need to change de source code of TaskInstace.java, rebuild id, change the hibernate mapping and add a column to the table.

            But I don´t know if you need to do that. You may just "outject" a variable do the task instance using Business Scope:

                ...
                @Out(scope=ScopeType.BUSINESS_PROCESS, required=false)
                Long idDocument;
                ...

            You may retrieve the variable using: <h:outputText value="#{task.variables['idDocument']}" />
            Inside a datatable or to print a taskinstance on the html.


            Do not put complex types (objects) inside this scope, it will be serialized and the deserialization is a little heavy procedure.