Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Service Oriented Architecture Tools Platform (STP) » bpmn files creation problem
bpmn files creation problem [message #613886] Fri, 21 March 2008 15:31 Go to next message
Eclipse UserFriend
Originally posted by: s.balard.prometil.com

Hi,
for needs of my own RCP application, i use stp bpmn.
I developed a wizard which has to create its own project type. Under
project root, i want the wizard create automatically a .bpmn file and
its relative .bpmn_diagram file.
In wizard performFinish() method, i wrote this :

IRunnableWithProgress op1 = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor)
throws InvocationTargetException {
BpmnDiagramEditorUtil.createNewDiagramFile(
BpmnDiagramFileCreator.getInstance(), ((IProject)
ResourcesPlugin.getWorkspace().getRoot().getProject(
newProjectMainPage.getProjectName()))
.getFullPath(), newProjectMainPage
.getProjectName(), null, ViewType.DIAGRAM_LINK,
getShell(), monitor);
monitor.done();
}
};
and executed it a little further in the method code :

getContainer().run(false, true, op1);

The .bpmn_diagram is well created but it is empty and the .bpmn isn't
created.
Can anyone help me please ?
Regards,
Sebastien
Re: bpmn files creation problem [message #613889 is a reply to message #613886] Sat, 22 March 2008 17:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: atoulme.intalio.com

Sebastien, the code in this util method relies heavily on the platform
and its path system. You will need to tweak it to make it work with RCP.

Hope this helps.

Antoine

Sebastien BALARD wrote:
> Hi,
> for needs of my own RCP application, i use stp bpmn.
> I developed a wizard which has to create its own project type. Under
> project root, i want the wizard create automatically a .bpmn file and
> its relative .bpmn_diagram file.
> In wizard performFinish() method, i wrote this :
>
> IRunnableWithProgress op1 = new IRunnableWithProgress() {
> public void run(IProgressMonitor monitor)
> throws InvocationTargetException {
> BpmnDiagramEditorUtil.createNewDiagramFile(
> BpmnDiagramFileCreator.getInstance(), ((IProject)
> ResourcesPlugin.getWorkspace().getRoot().getProject(
> newProjectMainPage.getProjectName()))
> .getFullPath(), newProjectMainPage
> .getProjectName(), null, ViewType.DIAGRAM_LINK,
> getShell(), monitor);
> monitor.done();
> }
> };
> and executed it a little further in the method code :
>
> getContainer().run(false, true, op1);
>
> The .bpmn_diagram is well created but it is empty and the .bpmn isn't
> created.
> Can anyone help me please ?
> Regards,
> Sebastien
Re: bpmn files creation problem [message #613890 is a reply to message #613889] Wed, 26 March 2008 16:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: s.balard.prometil.com

Hi,
can you be a little more precise, please.
BpmnDiagramEditorUtil.createNewDiagramFile(...) has to create both .bpmn
and .bpmn_diagram normally, in the same time. I don't understand why it
can create the .bpmn_diagram and not the .bpmn.
I don't think it is a problem of platform or its path system but i can
be in a mist.
Regards
Sebastien

Antoine Toulme wrote:
> Sebastien, the code in this util method relies heavily on the platform
> and its path system. You will need to tweak it to make it work with RCP.
>
> Hope this helps.
>
> Antoine
>
> Sebastien BALARD wrote:
>> Hi,
>> for needs of my own RCP application, i use stp bpmn.
>> I developed a wizard which has to create its own project type. Under
>> project root, i want the wizard create automatically a .bpmn file and
>> its relative .bpmn_diagram file.
>> In wizard performFinish() method, i wrote this :
>>
>> IRunnableWithProgress op1 = new IRunnableWithProgress() {
>> public void run(IProgressMonitor monitor)
>> throws InvocationTargetException {
>> BpmnDiagramEditorUtil.createNewDiagramFile(
>> BpmnDiagramFileCreator.getInstance(), ((IProject)
>> ResourcesPlugin.getWorkspace().getRoot().getProject(
>> newProjectMainPage.getProjectName()))
>> .getFullPath(), newProjectMainPage
>> .getProjectName(), null, ViewType.DIAGRAM_LINK,
>> getShell(), monitor);
>> monitor.done();
>> }
>> };
>> and executed it a little further in the method code :
>>
>> getContainer().run(false, true, op1);
>>
>> The .bpmn_diagram is well created but it is empty and the .bpmn isn't
>> created.
>> Can anyone help me please ?
>> Regards,
>> Sebastien
Re: bpmn files creation problem [message #613893 is a reply to message #613890] Wed, 26 March 2008 16:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: atoulme.intalio.com

Sebastien,

when doing RCP, you have no access to the workspace, so there are no
IFiles, and no way to get the full path of a resource.

Sebastien BALARD wrote:
> Hi,
> can you be a little more precise, please.
> BpmnDiagramEditorUtil.createNewDiagramFile(...) has to create both .bpmn
> and .bpmn_diagram normally, in the same time. I don't understand why it
> can create the .bpmn_diagram and not the .bpmn.
> I don't think it is a problem of platform or its path system but i can
> be in a mist.
> Regards
> Sebastien
>
> Antoine Toulme wrote:
>> Sebastien, the code in this util method relies heavily on the platform
>> and its path system. You will need to tweak it to make it work with RCP.
>>
>> Hope this helps.
>>
>> Antoine
>>
>> Sebastien BALARD wrote:
>>> Hi,
>>> for needs of my own RCP application, i use stp bpmn.
>>> I developed a wizard which has to create its own project type. Under
>>> project root, i want the wizard create automatically a .bpmn file and
>>> its relative .bpmn_diagram file.
>>> In wizard performFinish() method, i wrote this :
>>>
>>> IRunnableWithProgress op1 = new IRunnableWithProgress() {
>>> public void run(IProgressMonitor monitor)
>>> throws InvocationTargetException {
>>> BpmnDiagramEditorUtil.createNewDiagramFile(
>>> BpmnDiagramFileCreator.getInstance(), ((IProject)
>>> ResourcesPlugin.getWorkspace().getRoot().getProject(
>>> newProjectMainPage.getProjectName()))
>>> .getFullPath(), newProjectMainPage
>>> .getProjectName(), null,
>>> ViewType.DIAGRAM_LINK, getShell(), monitor);
>>> monitor.done();
>>> }
>>> };
>>> and executed it a little further in the method code :
>>>
>>> getContainer().run(false, true, op1);
>>>
>>> The .bpmn_diagram is well created but it is empty and the .bpmn isn't
>>> created.
>>> Can anyone help me please ?
>>> Regards,
>>> Sebastien
Re: bpmn files creation problem [message #613895 is a reply to message #613893] Thu, 27 March 2008 01:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: atoulme.intalio.com

Some more comments here:

The easiest is to generate 2 files with the
appropriate markup inside them without going through the
BpmnDiagramEditorUtil.

Otherwise not sure what is happening. You might want to
consider placing breakpoints and sending us a patch (in a bug) if there
is something to change.

Thanks,

Antoine

Antoine Toulme wrote:
> Sebastien,
>
> when doing RCP, you have no access to the workspace, so there are no
> IFiles, and no way to get the full path of a resource.
>
> Sebastien BALARD wrote:
>> Hi,
>> can you be a little more precise, please.
>> BpmnDiagramEditorUtil.createNewDiagramFile(...) has to create both
>> .bpmn and .bpmn_diagram normally, in the same time. I don't understand
>> why it can create the .bpmn_diagram and not the .bpmn.
>> I don't think it is a problem of platform or its path system but i can
>> be in a mist.
>> Regards
>> Sebastien
>>
>> Antoine Toulme wrote:
>>> Sebastien, the code in this util method relies heavily on the
>>> platform and its path system. You will need to tweak it to make it
>>> work with RCP.
>>>
>>> Hope this helps.
>>>
>>> Antoine
>>>
>>> Sebastien BALARD wrote:
>>>> Hi,
>>>> for needs of my own RCP application, i use stp bpmn.
>>>> I developed a wizard which has to create its own project type. Under
>>>> project root, i want the wizard create automatically a .bpmn file
>>>> and its relative .bpmn_diagram file.
>>>> In wizard performFinish() method, i wrote this :
>>>>
>>>> IRunnableWithProgress op1 = new IRunnableWithProgress() {
>>>> public void run(IProgressMonitor monitor)
>>>> throws InvocationTargetException {
>>>> BpmnDiagramEditorUtil.createNewDiagramFile(
>>>> BpmnDiagramFileCreator.getInstance(), ((IProject)
>>>> ResourcesPlugin.getWorkspace().getRoot().getProject(
>>>> newProjectMainPage.getProjectName()))
>>>> .getFullPath(), newProjectMainPage
>>>> .getProjectName(), null,
>>>> ViewType.DIAGRAM_LINK, getShell(), monitor);
>>>> monitor.done();
>>>> }
>>>> };
>>>> and executed it a little further in the method code :
>>>>
>>>> getContainer().run(false, true, op1);
>>>>
>>>> The .bpmn_diagram is well created but it is empty and the .bpmn
>>>> isn't created.
>>>> Can anyone help me please ?
>>>> Regards,
>>>> Sebastien
Re: bpmn files creation problem [message #613897 is a reply to message #613893] Thu, 27 March 2008 09:30 Go to previous message
Eclipse UserFriend
Originally posted by: s.balard.prometil.com

Hi,
I have solved my problem. In fact, i called
BpmnDiagramEditorUtil.createNewDiagramFile(...) with all these
parameters plus another of PreferencesHint type (i added it because i
believed it could have configured my bpmn diagram file). Adding it, i
didn't called BpmnDiagramEditorUtil.createNewDiagramFile(...) but
EditorUtil.createNewDiagramFile(..., PreferencesHint myPrefs).
(EditorUtil is the super super class of BpmnDiagramEditorUtil).
Now, it works perfectly.
Regards
Sebastien

Antoine Toulme wrote:
> Sebastien,
>
> when doing RCP, you have no access to the workspace, so there are no
> IFiles, and no way to get the full path of a resource.
>
> Sebastien BALARD wrote:
>> Hi,
>> can you be a little more precise, please.
>> BpmnDiagramEditorUtil.createNewDiagramFile(...) has to create both
>> .bpmn and .bpmn_diagram normally, in the same time. I don't understand
>> why it can create the .bpmn_diagram and not the .bpmn.
>> I don't think it is a problem of platform or its path system but i can
>> be in a mist.
>> Regards
>> Sebastien
>>
>> Antoine Toulme wrote:
>>> Sebastien, the code in this util method relies heavily on the
>>> platform and its path system. You will need to tweak it to make it
>>> work with RCP.
>>>
>>> Hope this helps.
>>>
>>> Antoine
>>>
>>> Sebastien BALARD wrote:
>>>> Hi,
>>>> for needs of my own RCP application, i use stp bpmn.
>>>> I developed a wizard which has to create its own project type. Under
>>>> project root, i want the wizard create automatically a .bpmn file
>>>> and its relative .bpmn_diagram file.
>>>> In wizard performFinish() method, i wrote this :
>>>>
>>>> IRunnableWithProgress op1 = new IRunnableWithProgress() {
>>>> public void run(IProgressMonitor monitor)
>>>> throws InvocationTargetException {
>>>> BpmnDiagramEditorUtil.createNewDiagramFile(
>>>> BpmnDiagramFileCreator.getInstance(), ((IProject)
>>>> ResourcesPlugin.getWorkspace().getRoot().getProject(
>>>> newProjectMainPage.getProjectName()))
>>>> .getFullPath(), newProjectMainPage
>>>> .getProjectName(), null,
>>>> ViewType.DIAGRAM_LINK, getShell(), monitor);
>>>> monitor.done();
>>>> }
>>>> };
>>>> and executed it a little further in the method code :
>>>>
>>>> getContainer().run(false, true, op1);
>>>>
>>>> The .bpmn_diagram is well created but it is empty and the .bpmn
>>>> isn't created.
>>>> Can anyone help me please ?
>>>> Regards,
>>>> Sebastien
Previous Topic:Question:Does this developing environment suitable?
Next Topic:Human Tasks
Goto Forum:
  


Current Time: Mon Dec 22 11:25:24 GMT 2014

Powered by FUDForum. Page generated in 0.03326 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software