[opencms-dev] defining process in jBPM-OpenCms?

Vikrama Sanjeeva viki.sanjeeva at gmail.com
Sat Feb 2 21:55:18 CET 2008


Hello Shi:

    Well, I tried working on solution 1, that is making a copy of original
and passing copy to process. Actually, I thought of the following solution.
Here are the steps, I worked with no success:(

1: Make a copy of the original document.
2: Replace the copy with original (current) document in Process. So that
process uses this copy for further modification.
3: Once copy is finalised, replace the original with copy. This will replace
the original document in CMS resource with this "finalized copy".
    3.1: If copy is descarded, original will be maintained in CMS resource.

To achieve above, I tried following:

1: Hooked self defined ActionHandler on transitioon "Create a new Publish
WorkFlow".
2: Got original document using cms.readFile(FileName).
3: Cloned the original document uisng file.clone() method of CmsFile. This
successfully cloned the original file. Perhaps I got the copy.

Now I tried to "Replace the copy with original (current) document in
Process"
I Tried to get the reference of the "*point/step*" (in process) of the file
I uploaded while starting new process. But following returns always null:

executionContext.getContextInstance().getVariable("content")

I am not sure, but this is my understanding that variable "*content*" which
is defined in your process (for publishing document) is the one which
saves/stores the file attached while starting process. If this is wrong
understanding then kindly clearify with right.

Apart from above, I tried altrenate paths to get the reference of file
attached in process. Used:
ProcessDefinition, TaskMgmtDefinition, Task, TaskController and Transition
classes

It will be great if you advise on the above problem.

Thank you!!

Bye,
Viki.




On Jan 30, 2008 11:08 PM, Shi Yusen <shiys at langhua.cn> wrote:

>
> >
> >     I notice that, since it is a document publishing process, which
> > starts with selecting "ready-made" document present in opencms
> > repository and then it it forwarded for draft doc, recview doc and
> > finaly publishing document. However, if the document is
> > changed/modified in between on any task-node, the changes get reflect
> > on the document present in opencms repository. Whereas, as per my
> > understanding of document publishing process, the changed should not
> > reflect to original doc in opencms repository untill unless the
> > document is finally published through publishing process. And this is
> > something which I am looking for. How it could be done? Any insights?
> Currently, the publish process is only for the publish target in
> OpenCms.
>
> Perhaps there are 2 solutions to your requirement:
> 1. If the document is some text format such as html, xml, when starting
> a new process, you can copy the original document to a new one and
> control operations on both document files in your process.
>
> 2. If the document is in MS Word format, you can use revise function and
> store all the process messages in one file.
>
> >
> > 2nd thing is that: I created a new process (myProcess) project in
> > eclipse, deployed their in jboss and examined/run from jbpm-console.
> > Then I tried migrating same process under
> > "OpenCms-7.0.2-jBPM-3.1.2/processes directory in eclipse. I created a
> > classes folder in which I placed .class files, and placed gpd.xml,
> > processdefinition.xml and processimage.jpg in
> > OpenCms-7.0.2-jBPM-3.1.2/processes/myProcess. Build .myProcess.process
> > and successfully deployed/uploaded to jbpm-Workflow in opencms. But
> > after clicking "new workflow" in admin console, I got
> > NullPointerException. My question, what is the right approach of
> > migrating JPDL process created in  eclipse into your plug-in that is,
> > OpenCms-7.0.2-jBPM-3.1.2/processes in eclipse?
> The OpenCms-jBPM is integrated in 2 parts:
> 1. User, group and document level permission: the user, group in
> processdefinition.xml should also exist in your OpenCms. This part is
> quite common, almost all workflow engines can do this.
>
> 2. The access control and xml element level permission: OpenCms is very
> powerful on xml operation, but the access control is document level;
> jBPM allows to define the access control in xml element level. We
> extended the OpenCms xml editor to support using jBPM process definition
> to control what user can do at xml element level. This is the special
> interesting part which make us to give up other workflow engines.
>
> Regards,
>
> Shi Yusen/Beijing Langhua Ltd.
>
>
>
>
>  _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20080202/89c2bb23/attachment.htm>


More information about the opencms-dev mailing list