|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
How to create processHello,everybody:
I have a problem when I import a workflow package,I want to create a process in the package.I can create the process,howerver, how to persist it(how to save it to the database).I need your help!!!!!! |
|||
|
|
Re: How to create processHello Skysea,
Frankly, I am not sure I understood the question (what you mean by "save it to the database"). But I'll try to explain you what I do and it may be helpful. I have put in place workflow for the web content publishing. Since workflow is nothing more than consumer of user actions, I needed persistence of the association of the web content with the process in order to be able to, first, infinitely in time extend access to the process instance, and second, be able to communicate the process instance between different application instances. For that I have created my own database, added a simple table with just two fields, processInstanceId and webContentId. Now whevever I need to figure out the state of my web content ID, I query the table, see if I have a process accociated with it and then query the Shark for the rest. If this is kind of persistence you are looking for then here it is - trivial and effective. DS -- You receive this message as a subscriber of the shark@... mailing list. To unsubscribe: mailto:shark-unsubscribe@... For general help: mailto:sympa@...?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
|||
|
|
答复: Re: How to create processHello,DS: I am glad to receive your message,your
understanding is right.when I created a process in my program,how can I persist
it?Do you give me a example? This is my codes for creating process: public
static void createInstance(String username, String pwd,String pkgID) throws
Exception { SharkInterfaceWrapper.setProperties("D:\\tws-community-2.4-8-25\\conf\\Shark.conf",
true); UserTransaction ut =
(UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
ut.begin(); SharkConnection sc =
SharkInterfaceWrapper.getSharkConnection("admin", null); WMConnectInfo wmci=new
WMConnectInfo("admin", "12", "Shark",
""); sc.connect(wmci); String pkgId =
"sqpkg#1#sqpkg_wp1"; String pDefId = "0"; String procDefName =
SharkInterfaceWrapper.getShark()
.getXPDLBrowser()
.getUniqueProcessDefinitionName(sc.getSessionHandle(), pkgId, "",
pDefId); WfProcessMgr mgr =
sc.getProcessMgr(procDefName); WfProcess process =
mgr.create_process(null); process.start(); System.out.println("success"); } -----邮件原件----- Hello Skysea, Frankly, I am not sure I understood the
question (what you mean by "save it to the database"). But I'll try
to explain you what I do and it may be helpful. I have put in place workflow for the web
content publishing. Since workflow is nothing more than consumer of user
actions, I needed persistence of the association of the web content with the
process in order to be able to, first, infinitely in time extend access to the
process instance, and second, be able to communicate the process instance
between different application instances. For that I have created my own database,
added a simple table with just two fields, processInstanceId and webContentId.
Now whevever I need to figure out the state of my web content ID, I query the
table, see if I have a process accociated with it and then query the Shark for
the rest. If this is kind of persistence you are
looking for then here it is - trivial and effective. DS -- You receive this message as a subscriber of the shark@... mailing list. To unsubscribe: mailto:shark-unsubscribe@... For general help: mailto:sympa@...?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
|||
|
|
Re: 答复: Re: How to create processWell, it looks like you need to read some docs. Apparently you were able to
find some info how to create process. So if you keep reading further, you'll find very nice example of how to search for processes, activities, etc. process has key() method. That's what you persist and what you use in the filter to recreate process object later. Again just check out the docs directory. -- You receive this message as a subscriber of the shark@... mailing list. To unsubscribe: mailto:shark-unsubscribe@... For general help: mailto:sympa@...?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
|||
|
|
答复: Re: 答复: Re: How to create processI looked for many docs,but I didn't find any info helping me.Do you have
some docs about Shark? Thank you for your help! Regards! -----邮件原件----- 发件人: DS [mailto:dmitry.shulga@...] 发送时间: 2009年9月4日 10:29 收件人: shark@... 主题: [shark] Re: 答复: Re: How to create process Well, it looks like you need to read some docs. Apparently you were able to find some info how to create process. So if you keep reading further, you'll find very nice example of how to search for processes, activities, etc. process has key() method. That's what you persist and what you use in the filter to recreate process object later. Again just check out the docs directory. -- You receive this message as a subscriber of the shark@... mailing list. To unsubscribe: mailto:shark-unsubscribe@... For general help: mailto:sympa@...?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
|||
|
|
RE: 答复: Re: How to create processWinstone, Try putting ut.commit();
at the end of the procedure to commit your changes to the database. You need to
look for documentation on JTA rather than Shark.
From: 王鹏
[mailto:winstone_wang@...] Hello,DS: I am glad to receive your
message,your understanding is right.when I created a process in my program,how
can I persist it?Do you give me a example? This is my codes for creating process: public
static void createInstance(String username, String pwd,String pkgID) throws
Exception
{
SharkInterfaceWrapper.setProperties("D:\\tws-community-2.4-8-25\\conf\\Shark.conf",
true); UserTransaction ut =
(UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
ut.begin(); SharkConnection sc =
SharkInterfaceWrapper.getSharkConnection("admin", null);
WMConnectInfo wmci=new
WMConnectInfo("admin", "12", "Shark",
""); sc.connect(wmci); String pkgId =
"sqpkg#1#sqpkg_wp1"; String pDefId = "0"; String procDefName =
SharkInterfaceWrapper.getShark()
.getXPDLBrowser()
.getUniqueProcessDefinitionName(sc.getSessionHandle(), pkgId, "",
pDefId); WfProcessMgr mgr =
sc.getProcessMgr(procDefName); WfProcess process =
mgr.create_process(null); process.start();
System.out.println("success");
} -----邮件原件----- Hello Skysea, Frankly, I am not sure I understood the
question (what you mean by "save it to the database"). But I'll try
to explain you what I do and it may be helpful. I have put in place workflow for the web
content publishing. Since workflow is nothing more than consumer of user
actions, I needed persistence of the association of the web content with the
process in order to be able to, first, infinitely in time extend access to the
process instance, and second, be able to communicate the process instance
between different application instances. For that I have created my own database,
added a simple table with just two fields, processInstanceId and webContentId.
Now whevever I need to figure out the state of my web content ID, I query the
table, see if I have a process accociated with it and then query the Shark for
the rest. If this is kind of persistence you are
looking for then here it is - trivial and effective. DS Celona Technologies Limited (Company No. 3262010) is registered in England and Wales, and its registered office is Level 4, 63 Gee Street, London EC1V 3RS. The information contained in this e-mail message is the confidential property of Celona Technologies Limited and may be privileged and protected from disclosure. If you are not the intended recipient, any use, dissemination, distribution or copying is strictly prohibited. If you think you have received this e-mail message in error, please e-mail the sender. Thank you. -- You receive this message as a subscriber of the shark@... mailing list. To unsubscribe: mailto:shark-unsubscribe@... For general help: mailto:sympa@...?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
|||
|
|
答复: RE: 答复: Re: How to create processHi, Thank you for
your help,I have resolved the problem using your method. 发件人: Gary Howard
[mailto:gary.howard@...] Winstone, Try
putting ut.commit(); at the end of the procedure to commit your changes
to the database. You
need to look for documentation on JTA rather than Shark.
From: 王鹏 [mailto:winstone_wang@...]
Hello,DS: I am glad to receive your
message,your understanding is right.when I created a process in my program,how can
I persist it?Do you give me a example? This is my codes for creating process: public
static void createInstance(String username, String pwd,String pkgID) throws
Exception
{
SharkInterfaceWrapper.setProperties("D:\\tws-community-2.4-8-25\\conf\\Shark.conf",
true); UserTransaction ut =
(UserTransaction) new
InitialContext().lookup("java:comp/UserTransaction");
ut.begin(); SharkConnection sc =
SharkInterfaceWrapper.getSharkConnection("admin", null);
WMConnectInfo wmci=new
WMConnectInfo("admin", "12", "Shark",
""); sc.connect(wmci); String pkgId =
"sqpkg#1#sqpkg_wp1"; String pDefId = "0"; String procDefName = SharkInterfaceWrapper.getShark()
.getXPDLBrowser()
.getUniqueProcessDefinitionName(sc.getSessionHandle(), pkgId, "",
pDefId); WfProcessMgr mgr =
sc.getProcessMgr(procDefName); WfProcess process =
mgr.create_process(null); process.start();
System.out.println("success");
} -----邮件原件----- Hello Skysea, Frankly, I am not sure I understood the
question (what you mean by "save it to the database"). But I'll try
to explain you what I do and it may be helpful. I have put in place workflow for the web
content publishing. Since workflow is nothing more than consumer of user actions,
I needed persistence of the association of the web content with the process in
order to be able to, first, infinitely in time extend access to the process
instance, and second, be able to communicate the process instance between
different application instances. For that I have created my own database,
added a simple table with just two fields, processInstanceId and webContentId.
Now whevever I need to figure out the state of my web content ID, I query the
table, see if I have a process accociated with it and then query the Shark for
the rest. If this is kind of persistence you are
looking for then here it is - trivial and effective. DS
-- You receive this message as a subscriber of the shark@... mailing list. To unsubscribe: mailto:shark-unsubscribe@... For general help: mailto:sympa@...?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
| Free embeddable forum powered by Nabble | Forum Help |