<div>Hello Shi:</div>
<div> </div>
<div>    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:(</div>
<div> </div>
<div>1: Make a copy of the original document.</div>
<div>2: Replace the copy with original (current) document in Process. So that process uses this copy for further modification.</div>
<div>3: Once copy is finalised, replace the original with copy. This will replace the original document in CMS resource with this "finalized copy".</div>
<div>    3.1: If copy is descarded, original will be maintained in CMS resource.</div>
<div> </div>
<div>To achieve above, I tried following:</div>
<div> </div>
<div>1: Hooked self defined ActionHandler on transitioon "Create a new Publish WorkFlow". </div>
<div>2: Got original document using cms.readFile(FileName).</div>
<div>3: Cloned the original document uisng file.clone() method of CmsFile. This successfully cloned the original file. Perhaps I got the copy.</div>
<div> </div>
<div>Now I tried to "Replace the copy with original (current) document in Process"</div>
<div>I Tried to get the reference of the "<strong>point/step</strong>" (in process) of the file I uploaded while starting new process. But following returns always null:</div><font size="2">
<p>executionContext.getContextInstance().getVariable(</p></font><font color="#2a00ff" size="2">"content"</font><font size="2">)</font>
<p><font size="2">I am not sure, but this is my understanding that variable "<strong>content</strong>" 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.</font></p>

<p><font size="2">Apart from above, I tried altrenate paths to get the reference of file attached in process. Used:</font></p>
<div>ProcessDefinition, TaskMgmtDefinition, Task, TaskController and Transition classes</div>
<div> </div>
<div>It will be great if you advise on the above problem.</div>
<div> </div>
<div>Thank you!!</div>
<div> </div>
<div>Bye,</div>
<div>Viki.<br><br> </div>
<div><br> </div>
<div class="gmail_quote">On Jan 30, 2008 11:08 PM, Shi Yusen <<a href="mailto:shiys@langhua.cn">shiys@langhua.cn</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="Ih2E3d"><br>><br>>     I notice that, since it is a document publishing process, which<br>> starts with selecting "ready-made" document present in opencms<br>> repository and then it it forwarded for draft doc, recview doc and<br>
> finaly publishing document. However, if the document is<br>> changed/modified in between on any task-node, the changes get reflect<br>> on the document present in opencms repository. Whereas, as per my<br>> understanding of document publishing process, the changed should not<br>
> reflect to original doc in opencms repository untill unless the<br>> document is finally published through publishing process. And this is<br>> something which I am looking for. How it could be done? Any insights?<br>
</div>Currently, the publish process is only for the publish target in<br>OpenCms.<br><br>Perhaps there are 2 solutions to your requirement:<br>1. If the document is some text format such as html, xml, when starting<br>a new process, you can copy the original document to a new one and<br>
control operations on both document files in your process.<br><br>2. If the document is in MS Word format, you can use revise function and<br>store all the process messages in one file.<br>
<div class="Ih2E3d"><br>><br>> 2nd thing is that: I created a new process (myProcess) project in<br>> eclipse, deployed their in jboss and examined/run from jbpm-console.<br>> Then I tried migrating same process under<br>
> "OpenCms-7.0.2-jBPM-3.1.2/processes directory in eclipse. I created a<br>> classes folder in which I placed .class files, and placed gpd.xml,<br>> processdefinition.xml and processimage.jpg in<br>> OpenCms-7.0.2-jBPM-3.1.2/processes/myProcess. Build .myProcess.process<br>
> and successfully deployed/uploaded to jbpm-Workflow in opencms. But<br>> after clicking "new workflow" in admin console, I got<br>> NullPointerException. My question, what is the right approach of<br>
> migrating JPDL process created in  eclipse into your plug-in that is,<br>> OpenCms-7.0.2-jBPM-3.1.2/processes in eclipse?<br></div>The OpenCms-jBPM is integrated in 2 parts:<br>1. User, group and document level permission: the user, group in<br>
processdefinition.xml should also exist in your OpenCms. This part is<br>quite common, almost all workflow engines can do this.<br><br>2. The access control and xml element level permission: OpenCms is very<br>powerful on xml operation, but the access control is document level;<br>
jBPM allows to define the access control in xml element level. We<br>extended the OpenCms xml editor to support using jBPM process definition<br>to control what user can do at xml element level. This is the special<br>interesting part which make us to give up other workflow engines.<br>

<div class="Ih2E3d"><br>Regards,<br><br>Shi Yusen/Beijing Langhua Ltd.<br><br><br><br><br></div>
<div>
<div></div>
<div class="Wj3C7c">_______________________________________________<br>This mail is sent to you from the opencms-dev mailing list<br>To change your list options, or to unsubscribe from the list, please visit<br><a href="http://lists.opencms.org/mailman/listinfo/opencms-dev" target="_blank">http://lists.opencms.org/mailman/listinfo/opencms-dev</a><br>
</div></div></blockquote></div><br>