|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
Instantiate process from applicationWe are trying to use the Shark API to instantiate (and interact with) a process from an external Java application.
We looked in the Shark code (latest from CVS) and found the SharkTest area, however it appeared to have a lot of extra calls. Our engine is running and the process is loaded, so what is the minimum amount of code needed to obtain a link to the server instance and instantiate it. Is this already documented somewhere? Has anyone done this, and would you be willing to post a simple example to the list?
Thanks in advance for your help.
Luke R.
Marshfield Clinic
-- 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: Instantiate process from applicationHi Luke,
Here's some code sample from our application, which may help you: ut = SharkInterfaceWrapper.getUserTransaction(); ut.begin(); /*"xpdl" below is a domain object for us which has info about package defintion, verison etc. and getProcessManager() is * a method I will reproduce below. */ WfProcessMgr processMgr = getProcessManager(sharkConnection, xpdl); process= processMgr.create_process(null); /*if you want to set process variables now, then you can do so now as follows:*/ process.set_process_context(myContextMap); process.start(); ut.commit(); Here's the getProcessManager method using our xpdl domain object: private WfProcessMgr getProcessManager(SharkConnection sharkConnection, Xpdl xpdl) throws Exception { XPDLBrowser xpdlb = Shark.getInstance().getXPDLBrowser(); String procDefName = xpdlb.getUniqueProcessDefinitionName( sharkConnection.getSessionHandle(), xpdl.getPackageId(), (new Integer(xpdl.getVersion())).toString(), xpdl.getProcessDefinitionId()); WfProcessMgr mgr = sharkConnection.getProcessMgr(procDefName); return mgr; } Hope this helps, regards, Geeta "Luke Rasmussen" <lrasm274@... om> To shark@... 12/17/2008 05:09 cc PM Subject [shark] Instantiate process from Please respond to application shark@... We are trying to use the Shark API to instantiate (and interact with) a process from an external Java application. We looked in the Shark code (latest from CVS) and found the SharkTest area, however it appeared to have a lot of extra calls. Our engine is running and the process is loaded, so what is the minimum amount of code needed to obtain a link to the server instance and instantiate it. Is this already documented somewhere? Has anyone done this, and would you be willing to post a simple example to the list? Thanks in advance for your help. Luke R. Marshfield Clinic -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- 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 -- 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 |
|
|
adding authorization for sharkI need to add a fairly complicated authorization layer on top of shark. In my application, all users are already authenticated (logged in) and I need to check if they are authorize. I will be using both static roles such as regular users, managers, etc and instance based properties such as organizations, etc. Can someone point me to some sample code that does this. Thanks in advance.
-- 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: Instantiate process from applicationThank you very much Geeta! I'll give this a shot and let you know how it works for us.
Luke R.
Marshfield Clinic On Wed, Dec 17, 2008 at 12:59 PM, <gramani@...> wrote: Hi Luke, -- 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: Instantiate process from applicationWe have been trying to get a program working to connect to Shark using code from the Shark documentation and this mailing list.
We are wondering if anyone can help troubleshoot or explain why we are geting the error: javax.transaction.NotSupportedException: Nested transactions not supported2009-01-12 10:11:44,587: SharkConnectionImpl -> Unexpected error while user admin loggs on java.lang.Exception: No transaction begun. at org.enhydra.shark.SharkTxSynchronizationFactory.createTxSynchronization(SharkTxSynchronizationFactory.java:83) at org.enhydra.shark.SharkUtilities.getTxSynchronization(SharkUtilities.java:469) at org.enhydra.shark.SharkUtilities.getResourceFromCache(SharkUtilities.java:492) at org.enhydra.shark.SharkUtilities.getResource(SharkUtilities.java:515) at org.enhydra.shark.SharkConnectionImpl.connect(SharkConnectionImpl.java:73) at org.enhydra.shark.client.utilities.SharkInterfaceWrapper.getSharkConnection(SharkInterfaceWrapper.java:329) at org.marshfieldclinic.Shark.MSharkClientConnector.main(MSharkClientConnector.java:91) We are using the following code: public static void main(String[] args) { try { System.out.println("1"); SharkInterfaceWrapper.setProperties("X:\\tws-community-2.2\\conf\\Shark.conf", true); System.out.println("1a"); UserTransaction ut = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction"); Map cntxt = new HashMap(); ut.begin(); String username = "admin"; SharkConnection sc = SharkInterfaceWrapper.getSharkConnection(username, null); ut.commit(); System.out.println("7"); WMConnectInfo wmci=new WMConnectInfo("", "", "", ""); System.out.println("8"); sc.connect(wmci); ut.begin(); String pkgId = "1"; String pDefId = "0"; String procDefName = SharkInterfaceWrapper.getShark() .getXPDLBrowser() .getUniqueProcessDefinitionName(sc.getSessionHandle(), pkgId, "", pDefId); WfProcessMgr mgr = sc.getProcessMgr(procDefName); ut.commit(); WfProcess process = mgr.create_process(null); /*if you want to set process variables now, then you can do so now as follows:*/ process.set_process_context(cntxt); process.start(); ut.commit(); } catch (Exception exc) { System.out.println("Exception: " + exc); System.out.println("Message: " + exc.getMessage()); exc.printStackTrace(); } } Thank you, Luke R. Marshfield Clinic
On Fri, Dec 19, 2008 at 3:18 PM, Luke Rasmussen <lrasm274@...> wrote:
-- 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: Re: Instantiate process from application Hi,
It seems your code would work only if after line: SharkInterfaceWrapper.setProperties("X:\\tws-community-2.2\\conf\\Shark.conf", true); you put the following: SharkInterfaceWrapper.getShark(); Regards, Sasa. Luke Rasmussen wrote: We have been trying to get a program working to connect to Shark using code from the Shark documentation and this mailing list. We are wondering if anyone can help troubleshoot or explain why we are geting the error: javax.transaction.NotSupportedException: Nested transactions not supported2009-01-12 10:11:44,587: SharkConnectionImpl -> Unexpected error while user admin loggs on java.lang.Exception: No transaction begun. at org.enhydra.shark.SharkTxSynchronizationFactory.createTxSynchronization(SharkTxSynchronizationFactory.java:83) at org.enhydra.shark.SharkUtilities.getTxSynchronization(SharkUtilities.java:469) at org.enhydra.shark.SharkUtilities.getResourceFromCache(SharkUtilities.java:492) at org.enhydra.shark.SharkUtilities.getResource(SharkUtilities.java:515) at org.enhydra.shark.SharkConnectionImpl.connect(SharkConnectionImpl.java:73) at org.enhydra.shark.client.utilities.SharkInterfaceWrapper.getSharkConnection(SharkInterfaceWrapper.java:329) at org.marshfieldclinic.Shark.MSharkClientConnector.main(MSharkClientConnector.java:91) We are using the following code: public static void main(String[] args) { try { System.out.println("1"); SharkInterfaceWrapper.setProperties("X:\\tws-community-2.2\\conf\\Shark.conf", true); System.out.println("1a"); UserTransaction ut = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction"); Map cntxt = new HashMap(); ut.begin(); String username = "admin"; SharkConnection sc = SharkInterfaceWrapper.getSharkConnection(username, null); ut.commit(); System.out.println("7"); WMConnectInfo wmci=new WMConnectInfo("", "", "", ""); System.out.println("8"); sc.connect(wmci); ut.begin(); String pkgId = "1"; String pDefId = "0"; String procDefName = SharkInterfaceWrapper.getShark() .getXPDLBrowser() .getUniqueProcessDefinitionName(sc.getSessionHandle(), pkgId, "", pDefId); WfProcessMgr mgr = sc.getProcessMgr(procDefName); ut.commit(); WfProcess process = mgr.create_process(null); /*if you want to set process variables now, then you can do so now as follows:*/ process.set_process_context(cntxt); process.start(); ut.commit(); } catch (Exception exc) { System.out.println("Exception: " + exc); System.out.println("Message: " + exc.getMessage()); exc.printStackTrace(); } } Thank you, Luke R. Marshfield Clinic On Fri, Dec 19, 2008 at 3:18 PM, Luke Rasmussen wrote: Thank you very much Geeta! I'll give this a shot and let you know how it works for us. Luke R. Marshfield Clinic On Wed, Dec 17, 2008 at 12:59 PM, wrote: Hi Luke, Here's some code sample from our application, which may help you: ut = SharkInterfaceWrapper.getUserTransaction(); ut.begin(); /*"xpdl" below is a domain object for us which has info about package defintion, verison etc. and getProcessManager() is * a method I will reproduce below. */ WfProcessMgr processMgr = getProcessManager(sharkConnection, xpdl); process= processMgr.create_process(null); /*if you want to set process variables now, then you can do so now as follows:*/ process.set_process_context(myContextMap); process.start(); ut.commit(); Here's the getProcessManager method using our xpdl domain object: private WfProcessMgr getProcessManager(SharkConnection sharkConnection, Xpdl xpdl) throws Exception { XPDLBrowser xpdlb = Shark.getInstance().getXPDLBrowser(); String procDefName = xpdlb.getUniqueProcessDefinitionName( sharkConnection.getSessionHandle(), xpdl.getPackageId(), (new Integer(xpdl.getVersion())).toString(), xpdl.getProcessDefinitionId()); WfProcessMgr mgr = sharkConnection.getProcessMgr(procDefName); return mgr; } Hope this helps, regards, Geeta "Luke Rasmussen" To shark@... 12/17/2008 05:09 cc PM Subject [shark] Instantiate process from Please respond to application shark@... We are trying to use the Shark API to instantiate (and interact with) a process from an external Java application. We looked in the Shark code (latest from CVS) and found the SharkTest area, however it appeared to have a lot of extra calls. Our engine is running and the process is loaded, so what is the minimum amount of code needed to obtain a link to the server instance and instantiate it. Is this already documented somewhere? Has anyone done this, and would you be willing to post a simple example to the list? Thanks in advance for your help. Luke R. Marshfield Clinic -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- 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 -- 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 -- 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: Re: Re: Instantiate process from applicationThat cleared up that error, and now we just need to give it valid package information and we should be all set to go. Thank you very much for your help Sasa!
Luke R. Marshfield Clinic
On Mon, Jan 12, 2009 at 2:49 PM, Sasa Bojanic <sasaboy@...> wrote: Hi, -- 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: Re: Re: Re: Instantiate process from applicationHi Luke,
Another thing to keep in mind: make sure you do not have nested transactions. So for every ut.begin(); you should have a matching ut.commit(); with no ut.begin(); *in between*. This is the meaning of " javax.transaction.NotSupportedException: Nested transactions not > supported" error you got. I myself got stuck with this error for a while before I could figure out what was wrong! Hope this helps:) Geeta "Luke Rasmussen" <lrasm274@...> wrote on 01/13/2009 03:40:24 PM: > That cleared up that error, and now we just need to give it valid > package information and we should be all set to go. Thank you very > much for your help Sasa! > > Luke R. > Marshfield Clinic > > On Mon, Jan 12, 2009 at 2:49 PM, Sasa Bojanic <sasaboy@...> wrote: > Hi, > > It seems your code would work only if after line: > > SharkInterfaceWrapper.setProperties("X:\\tws-community-2. > 2\\conf\\Shark.conf", > true); > you put the following: > > SharkInterfaceWrapper.getShark(); > > Regards, > Sasa. > > Luke Rasmussen wrote: We have been trying to get a program working to > connect to Shark using code from the Shark documentation and this mailing > list. > > We are wondering if anyone can help troubleshoot or explain why we are > geting the error: > javax.transaction.NotSupportedException: Nested transactions not > supported2009-01-12 10:11:44,587: SharkConnectionImpl -> Unexpected error > while user admin loggs on > java.lang.Exception: No transaction begun. > at > org.enhydra.shark.SharkTxSynchronizationFactory. > createTxSynchronization(SharkTxSynchronizationFactory.java:83) > at > > at > org.enhydra.shark.SharkUtilities.getResourceFromCache(SharkUtilities.java:492) > at > org.enhydra.shark.SharkUtilities.getResource(SharkUtilities.java:515) > at > org.enhydra.shark.SharkConnectionImpl.connect(SharkConnectionImpl.java:73) > at > org.enhydra.shark.client.utilities.SharkInterfaceWrapper. > getSharkConnection(SharkInterfaceWrapper.java:329) > at > org.marshfieldclinic.Shark.MSharkClientConnector. > main(MSharkClientConnector.java:91) > > > We are using the following code: > public static void main(String[] args) > { > try { > System.out.println("1"); > SharkInterfaceWrapper.setProperties("X:\\tws- > community-2.2\\conf\\Shark.conf", > true); > System.out.println("1a"); > > UserTransaction ut = (UserTransaction) new > InitialContext().lookup("java:comp/UserTransaction"); > > Map cntxt = new HashMap(); > > ut.begin(); > > String username = "admin"; > SharkConnection sc = > SharkInterfaceWrapper.getSharkConnection(username, null); > > ut.commit(); > > System.out.println("7"); > WMConnectInfo wmci=new WMConnectInfo("", "", "", ""); > > System.out.println("8"); > sc.connect(wmci); > > ut.begin(); > > String pkgId = "1"; > String pDefId = "0"; > String procDefName = SharkInterfaceWrapper.getShark() > .getXPDLBrowser() > .getUniqueProcessDefinitionName(sc.getSessionHandle(), > pkgId, "", pDefId); > WfProcessMgr mgr = sc.getProcessMgr(procDefName); > > ut.commit(); > > WfProcess process = mgr.create_process(null); > > /*if you want to set process variables now, then you can > do so now as > follows:*/ > process.set_process_context(cntxt); > > process.start(); > ut.commit(); > } > catch (Exception exc) { > System.out.println("Exception: " + exc); > System.out.println("Message: " + exc.getMessage()); > exc.printStackTrace(); > } > } > > Thank you, > > Luke R. > Marshfield Clinic > > On Fri, Dec 19, 2008 at 3:18 PM, Luke Rasmussen wrote: > Thank you very much Geeta! I'll give this a shot and let you know > how it works for us. Luke R. > Marshfield Clinic > On Wed, Dec 17, 2008 at 12:59 PM, wrote: > Hi Luke, > > Here's some code sample from our application, which may help you: > > ut = SharkInterfaceWrapper.getUserTransaction(); > ut.begin(); > > /*"xpdl" below is a domain object for us which has info about package > defintion, verison etc. and getProcessManager() is * a method I will > reproduce below. > */ > WfProcessMgr processMgr = getProcessManager(sharkConnection, xpdl); > > process= processMgr.create_process(null); > > /*if you want to set process variables now, then you can do so now as > follows:*/ > process.set_process_context(myContextMap); > > process.start(); > ut.commit(); > > Here's the getProcessManager method using our xpdl domain object: > WfProcessMgr getProcessManager(SharkConnection sharkConnection, > Xpdl xpdl) throws Exception { > XPDLBrowser xpdlb = Shark.getInstance().getXPDLBrowser(); > String procDefName = > xpdlb.getUniqueProcessDefinitionName( > sharkConnection.getSessionHandle(), > xpdl.getPackageId(), > (new Integer(xpdl.getVersion())).toString(), > xpdl.getProcessDefinitionId()); > WfProcessMgr mgr = sharkConnection.getProcessMgr(procDefName); > return mgr; > } > > Hope this helps, > regards, > Geeta > > > > > "Luke Rasmussen" > To > shark@... > 12/17/2008 05:09 cc > Subject > [shark] Instantiate process from > Please respond to application > shark@... > > > > > > > > > > We are trying to use the Shark API to instantiate (and interact with) a > process from an external Java application. > > We looked in the Shark code (latest from CVS) and found the SharkTest > area, > however it appeared to have a lot of extra calls. Our engine is running > and the process is loaded, so what is the minimum amount of code needed > to > obtain a link to the server instance and instantiate it. Is this > documented somewhere? Has anyone done this, and would you be willing to > post a simple example to the list? > > Thanks in advance for your help. > > Luke R. > Marshfield Clinic > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > -- > 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 > > > > > -- > 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 > > > > > > > > > > -- > You receive this message as a subscriber of the shark@... mailing > To unsubscribe: mailto:shark-unsubscribe@... > For general help: mailto:sympa@...?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > -- > 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 -- 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 |
|
|
Shark delets assignments after work items doneHi,
We noticed that Shark will delete data from DB once
task is completed. We prefer to keep DELETE privileges as
restricted as possible. Is it possible to get a list tables Shark will need
to delete from?
Thanks,
Jessica Zhao
-- 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: Re: Re: Re: Re: Instantiate process from applicationThanks Geeta, that's good advice!
I'm happy to report that we were able to get an example working, and fully executed a process without any errors. Thanks again for all the help with this. Luke R. Marshfield Clinic On Tue, Jan 13, 2009 at 9:49 AM, <gramani@...> wrote: Hi Luke, -- 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: Shark delets assignments after work items doneHi,
when task is completed, shark deletes from DB only information about assignees for that task. And this information is stored within table SHKAssignmentsTable. Greetings, Sasa. Zhao, Jessica wrote: > Hi, > > We noticed that Shark will delete data from DB once task is completed. > We prefer to keep DELETE privileges as restricted as possible. Is it > possible to get a list tables Shark will need to delete from? > > Thanks, > > Jessica Zhao > -- 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 |
|
|
Shark List IssueHello all,
Its difficult to explain the situation but lets try.... I have a problem with lists and shark.... The shark process starts to run when a request from an outside program is made (my program). Situation: My program first receives a list of arguments to a list variable type; Sends it to shark let say "LIST_IN_VAR", also starting the process; And after doing some work sends the same list to my program which will use it to do more things...; Shark don't really uses the list, at least in this example. It simply receives and resend it to my program, but the list needs to enter in shark. Problem: The problem is that I can't used Lists in shark... so what I do now is: LIST_IN_VAR is now defined as a string. When a request is made, my program converts the list to a string and sends it to shark Shark do is work....And in the end My program receives the "where to send" and the list as a String Converts the string back to LIST and sends and continue doing its job.... How can I use the list type from shark? It's possible to create a variable of type list and define a initial value?? Regards and thanks, Pedro -- 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: Shark List IssueHello Pedro,
I am not sure if maybe I misunderstand your question, but I hope you know that arbitrary (custome defined) Java classes can be used as process variables..? From the current version docs I see this: "you can define any Java object to be a workflow variable (through the use of XPDL ExternalReference data type), and then use it in shark (of course, this class has to be on shark's classpath). " In earlier version's docs, there was more on this topic here: http://shark.objectweb.org/doc/1.1/HowTo/how_to.html#d0e360 Again, I apologise if I didn't get your question :) Geeta "uninova" <pd@...> wrote on 01/15/2009 02:33:00 PM: > Hello all, > > Its difficult to explain the situation but lets try.... > > I have a problem with lists and shark.... > The shark process starts to run when a request from an outside program is > made (my program). > > Situation: > My program first receives a list of arguments to a list variable type; > Sends it to shark let say "LIST_IN_VAR", also starting the process; > And after doing some work sends the same list to my program which will > it to do more things...; > Shark don't really uses the list, at least in this example. It simply > receives and resend it to my program, but the list needs to enter in > > Problem: > The problem is that I can't used Lists in shark... so what I do now is: > LIST_IN_VAR is now defined as a string. > When a request is made, my program converts the list to a string and sends > it to shark > Shark do is work....And in the end > My program receives the "where to send" and the list as a String > Converts the string back to LIST and sends and continue doing its job.... > > How can I use the list type from shark? > It's possible to create a variable of type list and define a initial value?? > > Regards and thanks, > Pedro > > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > -- > You receive this message as a subscriber of the shark@... mailing > To unsubscribe: mailto:shark-unsubscribe@... > For general help: mailto:sympa@...?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws -- 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: Shark List IssueHello again,
I already familiar with that feature, and already tried a classed build by me. But I couldn't solve the situation. For sure I'm not doing the things right. The only resolution that come to my mind was (using the example bellow): (its different from the past one but I think the point is the same) Let's suppose I have a start activity. The transition from this activity loads the values(Static values) to the variable defined using the class build by me, lets say "my list type"... A is an instance of "my_list_type"!!! how can I create an instance?!?! This is not the right way.... a.add(2); a.add(3); a.add(7); The problem now, at least for me, is how do you instantiate the class?!you need an instance right?!?! What I need to change? So let's suppose: MY_list_type is defined using the class my_personal_list.java bellow: ######################################### private List real_list; My_personal_list() { } Add_value(int value) { Real_list.add(value); } Retrieve_list() { Return real_list; } ##################################### Regards, Pedro -----Mensagem original----- De: gramani@... [mailto:gramani@...] Enviada: quinta-feira, 15 de Janeiro de 2009 14:54 Para: shark@... Assunto: [shark] Re: Shark List Issue Hello Pedro, I am not sure if maybe I misunderstand your question, but I hope you know that arbitrary (custome defined) Java classes can be used as process variables..? From the current version docs I see this: "you can define any Java object to be a workflow variable (through the use of XPDL ExternalReference data type), and then use it in shark (of course, this class has to be on shark's classpath). " In earlier version's docs, there was more on this topic here: http://shark.objectweb.org/doc/1.1/HowTo/how_to.html#d0e360 Again, I apologise if I didn't get your question :) Geeta "uninova" <pd@...> wrote on 01/15/2009 02:33:00 PM: > Hello all, > > Its difficult to explain the situation but lets try.... > > I have a problem with lists and shark.... > The shark process starts to run when a request from an outside program > is made (my program). > > Situation: > My program first receives a list of arguments to a list variable type; > Sends it to shark let say "LIST_IN_VAR", also starting the process; > And after doing some work sends the same list to my program which will > it to do more things...; > Shark don't really uses the list, at least in this example. It simply > receives and resend it to my program, but the list needs to enter in > > Problem: > The problem is that I can't used Lists in shark... so what I do now is: > LIST_IN_VAR is now defined as a string. > When a request is made, my program converts the list to a string and sends > it to shark > Shark do is work....And in the end > My program receives the "where to send" and the list as a String > Converts the string back to LIST and sends and continue doing its job.... > > How can I use the list type from shark? > It's possible to create a variable of type list and define a initial value?? > > Regards and thanks, > Pedro > > > > -- > This message has been scanned for viruses and dangerous content by > MailScanner, and is believed to be clean. > > > -- > You receive this message as a subscriber of the shark@... mailing > To unsubscribe: mailto:shark-unsubscribe@... For general help: > mailto:sympa@...?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws -- 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: Re: Shark List IssueIs this the right way?
Thanks, Pedro -----Mensagem original----- De: uninova [mailto:pd@...] Enviada: quinta-feira, 15 de Janeiro de 2009 16:44 Para: shark@... Assunto: [shark] RE: Re: Shark List Issue Hello again, I already familiar with that feature, and already tried a classed build by me. But I couldn't solve the situation. For sure I'm not doing the things right. The only resolution that come to my mind was (using the example bellow): (its different from the past one but I think the point is the same) Let's suppose I have a start activity. The transition from this activity loads the values(Static values) to the variable defined using the class build by me, lets say "my list type"... A is an instance of "my_list_type"!!! how can I create an instance?!?! This is not the right way.... a.add(2); a.add(3); a.add(7); The problem now, at least for me, is how do you instantiate the class?!you need an instance right?!?! What I need to change? So let's suppose: MY_list_type is defined using the class my_personal_list.java bellow: ######################################### private List real_list; My_personal_list() { } Add_value(int value) { Real_list.add(value); } Retrieve_list() { Return real_list; } ##################################### Regards, Pedro -----Mensagem original----- De: gramani@... [mailto:gramani@...] Enviada: quinta-feira, 15 de Janeiro de 2009 14:54 Para: shark@... Assunto: [shark] Re: Shark List Issue Hello Pedro, I am not sure if maybe I misunderstand your question, but I hope you know that arbitrary (custome defined) Java classes can be used as process variables..? From the current version docs I see this: "you can define any Java object to be a workflow variable (through the use of XPDL ExternalReference data type), and then use it in shark (of course, this class has to be on shark's classpath). " In earlier version's docs, there was more on this topic here: http://shark.objectweb.org/doc/1.1/HowTo/how_to.html#d0e360 Again, I apologise if I didn't get your question :) Geeta "uninova" <pd@...> wrote on 01/15/2009 02:33:00 PM: > Hello all, > > Its difficult to explain the situation but lets try.... > > I have a problem with lists and shark.... > The shark process starts to run when a request from an outside program > is made (my program). > > Situation: > My program first receives a list of arguments to a list variable type; > Sends it to shark let say "LIST_IN_VAR", also starting the process; > And after doing some work sends the same list to my program which will > it to do more things...; > Shark don't really uses the list, at least in this example. It simply > receives and resend it to my program, but the list needs to enter in > > Problem: > The problem is that I can't used Lists in shark... so what I do now is: > LIST_IN_VAR is now defined as a string. > When a request is made, my program converts the list to a string and sends > it to shark > Shark do is work....And in the end > My program receives the "where to send" and the list as a String > Converts the string back to LIST and sends and continue doing its job.... > > How can I use the list type from shark? > It's possible to create a variable of type list and define a initial value?? > > Regards and thanks, > Pedro > > > > -- > This message has been scanned for viruses and dangerous content by > MailScanner, and is believed to be clean. > > > -- > You receive this message as a subscriber of the shark@... mailing > To unsubscribe: mailto:shark-unsubscribe@... For general help: > mailto:sympa@...?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws -- 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: Re: Shark List IssueHi Pedro:
Here's how i would define my xpdl (again, I apologise if I do not understand your situation correctly): 1. The xpdl has your custom defined process variable of class MyListType, and MyListType is of course in your class path . 1. The xpdl has a start activity, which leads to an activity in the *System* lane (ie performer is System and the activity is mapped to a Java class, say, MyInstantiater which is also in in your class path). The path out of this system activity leads to the rest of the activities for your app. 2. The above Java class, MyInstantiater, has the logic needed to instantiate your class MyListType as well as populate the custom defined process variable. Why won't this work? Regards, Geeta "uninova" <pd@...> wrote on 01/15/2009 04:44:01 PM: > Hello again, > I already familiar with that feature, and already tried a classed build by > me. But I couldn't solve the situation. For sure I'm not doing the things > right. > > The only resolution that come to my mind was (using the example bellow): > (its different from the past one but I think the point is the same) > Let's suppose I have a start activity. > The transition from this activity loads the values(Static values) to the > variable defined using the class build by me, lets say "my list type"... > A is an instance of "my_list_type"!!! how can I create an instance?!?! This > is not the right way.... > a.add(2); > a.add(3); > a.add(7); > > > The problem now, at least for me, is how do you instantiate the class?!you > need an instance right?!?! What I need to change? > > So let's suppose: > MY_list_type is defined using the class my_personal_list.java bellow: > ######################################### > private List real_list; > My_personal_list() > { > > } > Add_value(int value) > { > Real_list.add(value); > } > Retrieve_list() > { > Return real_list; > } > ##################################### > > > > Regards, > Pedro > > > > > > > > > > -----Mensagem original----- > De: gramani@... [mailto:gramani@...] > Enviada: quinta-feira, 15 de Janeiro de 2009 14:54 > Para: shark@... > Assunto: [shark] Re: Shark List Issue > > Hello Pedro, > > I am not sure if maybe I misunderstand your question, but I hope you know > that arbitrary (custome defined) Java classes can be used as process > variables..? From the current version docs I see this: "you can define > Java object to be a workflow variable (through the use of XPDL > ExternalReference data type), and then use it in shark (of course, this > class has to be on shark's classpath). " > > In earlier version's docs, there was more on this topic here: > > http://shark.objectweb.org/doc/1.1/HowTo/how_to.html#d0e360 > > Again, I apologise if I didn't get your question :) Geeta > > "uninova" <pd@...> wrote on 01/15/2009 02:33:00 PM: > > > Hello all, > > > > Its difficult to explain the situation but lets try.... > > > > I have a problem with lists and shark.... > > The shark process starts to run when a request from an outside program > > is made (my program). > > > > Situation: > > My program first receives a list of arguments to a list variable type; > > Sends it to shark let say "LIST_IN_VAR", also starting the process; > > And after doing some work sends the same list to my program which will > use > > it to do more things...; > > Shark don't really uses the list, at least in this example. It simply > > receives and resend it to my program, but the list needs to enter in > shark. > > > > Problem: > > The problem is that I can't used Lists in shark... so what I do now is: > > LIST_IN_VAR is now defined as a string. > > When a request is made, my program converts the list to a string and > sends > > it to shark > > Shark do is work....And in the end > > My program receives the "where to send" and the list as a String > > Converts the string back to LIST and sends and continue doing its > > > > How can I use the list type from shark? > > It's possible to create a variable of type list and define a initial > value?? > > > > Regards and thanks, > > Pedro > > > > > > > > -- > > This message has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > -- > > 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 > > > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > -- > You receive this message as a subscriber of the shark@... mailing > To unsubscribe: mailto:shark-unsubscribe@... > For general help: mailto:sympa@...?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws -- 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: RE: Re: Shark List IssueHi Geeta,
I was trying to follow what you said and some problems came... - So I started to build a new process called "simple_process" (this way I can learn, without destroying things I have already done). - create a new workflow variable (list_var) of type LIST(basic type string); - created a workflow participant (sys_participant) of type system; - defined a Formal Parameter (list_input) of type LIST(basic type string); - from my previous tests I can't introduce a list to this formal parameter..... An error of something like "type not supported" always come up. How can I use your way to do what I want?! Is this the right way?! For sure it's something very simple but I'm not getting it! Sorry :( Regards, Pedro -----Mensagem original----- De: gramani@... [mailto:gramani@...] Enviada: sábado, 17 de Janeiro de 2009 14:04 Para: shark@... Assunto: [shark] Re: RE: Re: Shark List Issue Hi Pedro: Here's how i would define my xpdl (again, I apologise if I do not understand your situation correctly): 1. The xpdl has your custom defined process variable of class MyListType, and MyListType is of course in your class path . 1. The xpdl has a start activity, which leads to an activity in the *System* lane (ie performer is System and the activity is mapped to a Java class, say, MyInstantiater which is also in in your class path). The path out of this system activity leads to the rest of the activities for your app. 2. The above Java class, MyInstantiater, has the logic needed to instantiate your class MyListType as well as populate the custom defined process variable. Why won't this work? Regards, Geeta "uninova" <pd@...> wrote on 01/15/2009 04:44:01 PM: > Hello again, > I already familiar with that feature, and already tried a classed > build by > me. But I couldn't solve the situation. For sure I'm not doing the > things right. > > The only resolution that come to my mind was (using the example bellow): > (its different from the past one but I think the point is the same) > Let's suppose I have a start activity. > The transition from this activity loads the values(Static values) to > the variable defined using the class build by me, lets say "my list type"... > A is an instance of "my_list_type"!!! how can I create an instance?!?! This > is not the right way.... > a.add(2); > a.add(3); > a.add(7); > > > The problem now, at least for me, is how do you instantiate the class?!you > need an instance right?!?! What I need to change? > > So let's suppose: > MY_list_type is defined using the class my_personal_list.java bellow: > ######################################### > private List real_list; > My_personal_list() > { > > } > Add_value(int value) > { > Real_list.add(value); > } > Retrieve_list() > { > Return real_list; > } > ##################################### > > > > Regards, > Pedro > > > > > > > > > > -----Mensagem original----- > De: gramani@... [mailto:gramani@...] > Enviada: quinta-feira, 15 de Janeiro de 2009 14:54 > Para: shark@... > Assunto: [shark] Re: Shark List Issue > > Hello Pedro, > > I am not sure if maybe I misunderstand your question, but I hope you > know that arbitrary (custome defined) Java classes can be used as > process variables..? From the current version docs I see this: "you > can define > Java object to be a workflow variable (through the use of XPDL > ExternalReference data type), and then use it in shark (of course, > this class has to be on shark's classpath). " > > In earlier version's docs, there was more on this topic here: > > http://shark.objectweb.org/doc/1.1/HowTo/how_to.html#d0e360 > > Again, I apologise if I didn't get your question :) Geeta > > "uninova" <pd@...> wrote on 01/15/2009 02:33:00 PM: > > > Hello all, > > > > Its difficult to explain the situation but lets try.... > > > > I have a problem with lists and shark.... > > The shark process starts to run when a request from an outside > > program is made (my program). > > > > Situation: > > My program first receives a list of arguments to a list variable > > type; Sends it to shark let say "LIST_IN_VAR", also starting the > > process; And after doing some work sends the same list to my program > > which will > use > > it to do more things...; > > Shark don't really uses the list, at least in this example. It > > simply receives and resend it to my program, but the list needs to > > enter in > shark. > > > > Problem: > > The problem is that I can't used Lists in shark... so what I do now is: > > LIST_IN_VAR is now defined as a string. > > When a request is made, my program converts the list to a string and > sends > > it to shark > > Shark do is work....And in the end > > My program receives the "where to send" and the list as a String > > Converts the string back to LIST and sends and continue doing its > > > > How can I use the list type from shark? > > It's possible to create a variable of type list and define a initial > value?? > > > > Regards and thanks, > > Pedro > > > > > > > > -- > > This message has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > -- > > 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 > > > > > -- > This message has been scanned for viruses and dangerous content by > MailScanner, and is believed to be clean. > > > -- > You receive this message as a subscriber of the shark@... mailing > To unsubscribe: mailto:shark-unsubscribe@... For general help: > mailto:sympa@...?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws -- 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:Shark List IssueHello,
Can any body help me with this subject? Thanks in advance, Pedro -----Mensagem original----- De: PedroUninova [mailto:pd@...] Enviada: terça-feira, 20 de Janeiro de 2009 14:49 Para: shark@... Assunto: [shark] RE: Re: RE: Re: Shark List Issue Hi Geeta, I was trying to follow what you said and some problems came... - So I started to build a new process called "simple_process" (this way I can learn, without destroying things I have already done). - create a new workflow variable (list_var) of type LIST(basic type string); - created a workflow participant (sys_participant) of type system; - defined a Formal Parameter (list_input) of type LIST(basic type string); - from my previous tests I can't introduce a list to this formal parameter..... An error of something like "type not supported" always come up. How can I use your way to do what I want?! Is this the right way?! For sure it's something very simple but I'm not getting it! Sorry :( Regards, Pedro -----Mensagem original----- De: gramani@... [mailto:gramani@...] Enviada: sábado, 17 de Janeiro de 2009 14:04 Para: shark@... Assunto: [shark] Re: RE: Re: Shark List Issue Hi Pedro: Here's how i would define my xpdl (again, I apologise if I do not understand your situation correctly): 1. The xpdl has your custom defined process variable of class MyListType, and MyListType is of course in your class path . 1. The xpdl has a start activity, which leads to an activity in the *System* lane (ie performer is System and the activity is mapped to a Java class, say, MyInstantiater which is also in in your class path). The path out of this system activity leads to the rest of the activities for your app. 2. The above Java class, MyInstantiater, has the logic needed to instantiate your class MyListType as well as populate the custom defined process variable. Why won't this work? Regards, Geeta "uninova" <pd@...> wrote on 01/15/2009 04:44:01 PM: > Hello again, > I already familiar with that feature, and already tried a classed > build by > me. But I couldn't solve the situation. For sure I'm not doing the > things right. > > The only resolution that come to my mind was (using the example bellow): > (its different from the past one but I think the point is the same) > Let's suppose I have a start activity. > The transition from this activity loads the values(Static values) to > the variable defined using the class build by me, lets say "my list type"... > A is an instance of "my_list_type"!!! how can I create an instance?!?! This > is not the right way.... > a.add(2); > a.add(3); > a.add(7); > > > The problem now, at least for me, is how do you instantiate the class?!you > need an instance right?!?! What I need to change? > > So let's suppose: > MY_list_type is defined using the class my_personal_list.java bellow: > ######################################### > private List real_list; > My_personal_list() > { > > } > Add_value(int value) > { > Real_list.add(value); > } > Retrieve_list() > { > Return real_list; > } > ##################################### > > > > Regards, > Pedro > > > > > > > > > > -----Mensagem original----- > De: gramani@... [mailto:gramani@...] > Enviada: quinta-feira, 15 de Janeiro de 2009 14:54 > Para: shark@... > Assunto: [shark] Re: Shark List Issue > > Hello Pedro, > > I am not sure if maybe I misunderstand your question, but I hope you > know that arbitrary (custome defined) Java classes can be used as > process variables..? From the current version docs I see this: "you > can define > Java object to be a workflow variable (through the use of XPDL > ExternalReference data type), and then use it in shark (of course, > this class has to be on shark's classpath). " > > In earlier version's docs, there was more on this topic here: > > http://shark.objectweb.org/doc/1.1/HowTo/how_to.html#d0e360 > > Again, I apologise if I didn't get your question :) Geeta > > "uninova" <pd@...> wrote on 01/15/2009 02:33:00 PM: > > > Hello all, > > > > Its difficult to explain the situation but lets try.... > > > > I have a problem with lists and shark.... > > The shark process starts to run when a request from an outside > > program is made (my program). > > > > Situation: > > My program first receives a list of arguments to a list variable > > type; Sends it to shark let say "LIST_IN_VAR", also starting the > > process; And after doing some work sends the same list to my program > > which will > use > > it to do more things...; > > Shark don't really uses the list, at least in this example. It > > simply receives and resend it to my program, but the list needs to > > enter in > shark. > > > > Problem: > > The problem is that I can't used Lists in shark... so what I do now is: > > LIST_IN_VAR is now defined as a string. > > When a request is made, my program converts the list to a string and > sends > > it to shark > > Shark do is work....And in the end > > My program receives the "where to send" and the list as a String > > Converts the string back to LIST and sends and continue doing its > > > > How can I use the list type from shark? > > It's possible to create a variable of type list and define a initial > value?? > > > > Regards and thanks, > > Pedro > > > > > > > > -- > > This message has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > -- > > 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 > > > > > -- > This message has been scanned for viruses and dangerous content by > MailScanner, and is believed to be clean. > > > -- > You receive this message as a subscriber of the shark@... mailing > To unsubscribe: mailto:shark-unsubscribe@... For general help: > mailto:sympa@...?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws -- 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:Shark List IssueHi Pedro, the reason you got thsi error ""type not supported"" is because
List is not supported as a type for a process variable. Only basic types like String, Integer, Boolean etc are supported. So if you want to start out building a "simple process" then start with one of the basic types. Once you have that working then move on to more complex Java types. As I mentioned earlier if you want a process variable which is of type List the only way that i know how to do it is to build a Java class which will have the List functionalty and then use it as I described earlier: " > > you can define any > > Java object to be a workflow variable (through the use of XPDL > > ExternalReference data type), and then use it in shark (of course, > > this class has to be on shark's classpath). " So go step by step. Make sure you get a Basic type like Integer/String working, then move on to an arbitrary java class. Regards, Geeta "PedroUninova" <pd@...> wrote on 01/23/2009 10:32:21 PM: > Hello, > Can any body help me with this subject? > > Thanks in advance, > Pedro > > -----Mensagem original----- > De: PedroUninova [mailto:pd@...] > Enviada: terça-feira, 20 de Janeiro de 2009 14:49 > Para: shark@... > Assunto: [shark] RE: Re: RE: Re: Shark List Issue > > Hi Geeta, > > I was trying to follow what you said and some problems came... > - So I started to build a new process called "simple_process" (this way I > can learn, without destroying things I have already done). > - create a new workflow variable (list_var) of type LIST(basic type > - created a workflow participant (sys_participant) of type system; > - defined a Formal Parameter (list_input) of type LIST(basic type > - from my previous tests I can't introduce a list to this formal > parameter..... > An error of something like "type not supported" always come up. > > How can I use your way to do what I want?! Is this the right way?! > For sure it's something very simple but I'm not getting it! Sorry :( > > Regards, > Pedro > > -----Mensagem original----- > De: gramani@... [mailto:gramani@...] > Enviada: sábado, 17 de Janeiro de 2009 14:04 > Para: shark@... > Assunto: [shark] Re: RE: Re: Shark List Issue > > Hi Pedro: > > Here's how i would define my xpdl (again, I apologise if I do not > your situation correctly): > > 1. The xpdl has your custom defined process variable of class MyListType, > and MyListType is of course in your class path . > 1. The xpdl has a start activity, which leads to an activity in the > *System* lane (ie performer is System and the activity is mapped to a > class, say, MyInstantiater which is also in in your class path). The path > out of this system activity leads to the rest of the activities for your > app. > 2. The above Java class, MyInstantiater, has the logic needed to instantiate > your class MyListType as well as populate the custom defined process > variable. > > Why won't this work? > > Regards, > Geeta > > "uninova" <pd@...> wrote on 01/15/2009 04:44:01 PM: > > > Hello again, > > I already familiar with that feature, and already tried a classed > > build > by > > me. But I couldn't solve the situation. For sure I'm not doing the > > things right. > > > > The only resolution that come to my mind was (using the example > > (its different from the past one but I think the point is the same) > > Let's suppose I have a start activity. > > The transition from this activity loads the values(Static values) to > > the variable defined using the class build by me, lets say "my list > type"... > > A is an instance of "my_list_type"!!! how can I create an instance?!?! > This > > is not the right way.... > > a.add(2); > > a.add(3); > > a.add(7); > > > > > > The problem now, at least for me, is how do you instantiate the > class?!you > > need an instance right?!?! What I need to change? > > > > So let's suppose: > > MY_list_type is defined using the class my_personal_list.java bellow: > > ######################################### > > private List real_list; > > My_personal_list() > > { > > > > } > > Add_value(int value) > > { > > Real_list.add(value); > > } > > Retrieve_list() > > { > > Return real_list; > > } > > ##################################### > > > > > > > > Regards, > > Pedro > > > > > > > > > > > > > > > > > > > > -----Mensagem original----- > > De: gramani@... [mailto:gramani@...] > > Enviada: quinta-feira, 15 de Janeiro de 2009 14:54 > > Para: shark@... > > Assunto: [shark] Re: Shark List Issue > > > > Hello Pedro, > > > > I am not sure if maybe I misunderstand your question, but I hope you > > know that arbitrary (custome defined) Java classes can be used as > > process variables..? From the current version docs I see this: "you > > can define > any > > Java object to be a workflow variable (through the use of XPDL > > ExternalReference data type), and then use it in shark (of course, > > this class has to be on shark's classpath). " > > > > In earlier version's docs, there was more on this topic here: > > > > http://shark.objectweb.org/doc/1.1/HowTo/how_to.html#d0e360 > > > > Again, I apologise if I didn't get your question :) Geeta > > > > "uninova" <pd@...> wrote on 01/15/2009 02:33:00 PM: > > > > > Hello all, > > > > > > Its difficult to explain the situation but lets try.... > > > > > > I have a problem with lists and shark.... > > > The shark process starts to run when a request from an outside > > > program is made (my program). > > > > > > Situation: > > > My program first receives a list of arguments to a list variable > > > type; Sends it to shark let say "LIST_IN_VAR", also starting the > > > process; And after doing some work sends the same list to my program > > > which will > > use > > > it to do more things...; > > > Shark don't really uses the list, at least in this example. It > > > simply receives and resend it to my program, but the list needs to > > > enter in > > shark. > > > > > > Problem: > > > The problem is that I can't used Lists in shark... so what I do now > > > LIST_IN_VAR is now defined as a string. > > > When a request is made, my program converts the list to a string and > > sends > > > it to shark > > > Shark do is work....And in the end > > > My program receives the "where to send" and the list as a String > > > Converts the string back to LIST and sends and continue doing its > job.... > > > > > > How can I use the list type from shark? > > > It's possible to create a variable of type list and define a initial > > value?? > > > > > > Regards and thanks, > > > Pedro > > > > > > > > > > > > -- > > > This message has been scanned for viruses and dangerous content by > > > MailScanner, and is believed to be clean. > > > > > > > > > -- > > > 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 > > > > > > > > > > -- > > This message has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > -- > > 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 > > > > > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > -- > You receive this message as a subscriber of the shark@... mailing > To unsubscribe: mailto:shark-unsubscribe@... > For general help: mailto:sympa@...?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws -- 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: Shark List Issue again sorry.....Hello again
Sorry for long absence.... but I have been working on other project.... Geeta Before the start of this issue I had already build up several process's with simple types.... I'm not sure, but are you saying that I should use simple types as external references to see if I understand the process off instantiate external classes??? After some tries I continue to not understand how an activity will instantiate my custom made class.... Could you, or some one, help me with this long time problem??? Thanks, Pedro -----Mensagem original----- De: gramani@... [mailto:gramani@...] Enviada: sábado, 24 de Janeiro de 2009 16:52 Para: shark@... Assunto: [shark] Re: RE:Shark List Issue Hi Pedro, the reason you got thsi error ""type not supported"" is because List is not supported as a type for a process variable. Only basic types like String, Integer, Boolean etc are supported. So if you want to start out building a "simple process" then start with one of the basic types. Once you have that working then move on to more complex Java types. As I mentioned earlier if you want a process variable which is of type List the only way that i know how to do it is to build a Java class which will have the List functionalty and then use it as I described earlier: " > > you can define any > > Java object to be a workflow variable (through the use of XPDL > > ExternalReference data type), and then use it in shark (of course, > > this class has to be on shark's classpath). " So go step by step. Make sure you get a Basic type like Integer/String working, then move on to an arbitrary java class. Regards, Geeta "PedroUninova" <pd@...> wrote on 01/23/2009 10:32:21 PM: > Hello, > Can any body help me with this subject? > > Thanks in advance, > Pedro > > -----Mensagem original----- > De: PedroUninova [mailto:pd@...] > Enviada: terça-feira, 20 de Janeiro de 2009 14:49 > Para: shark@... > Assunto: [shark] RE: Re: RE: Re: Shark List Issue > > Hi Geeta, > > I was trying to follow what you said and some problems came... > - So I started to build a new process called "simple_process" (this > way I can learn, without destroying things I have already done). > - create a new workflow variable (list_var) of type LIST(basic type > - created a workflow participant (sys_participant) of type system; > - defined a Formal Parameter (list_input) of type LIST(basic type > - from my previous tests I can't introduce a list to this formal > parameter..... > An error of something like "type not supported" always come up. > > How can I use your way to do what I want?! Is this the right way?! > For sure it's something very simple but I'm not getting it! Sorry :( > > Regards, > Pedro > > -----Mensagem original----- > De: gramani@... [mailto:gramani@...] > Enviada: sábado, 17 de Janeiro de 2009 14:04 > Para: shark@... > Assunto: [shark] Re: RE: Re: Shark List Issue > > Hi Pedro: > > Here's how i would define my xpdl (again, I apologise if I do not > your situation correctly): > > 1. The xpdl has your custom defined process variable of class > MyListType, and MyListType is of course in your class path . > 1. The xpdl has a start activity, which leads to an activity in the > *System* lane (ie performer is System and the activity is mapped to a > class, say, MyInstantiater which is also in in your class path). The > path out of this system activity leads to the rest of the activities > for your app. > 2. The above Java class, MyInstantiater, has the logic needed to instantiate > your class MyListType as well as populate the custom defined process > variable. > > Why won't this work? > > Regards, > Geeta > > "uninova" <pd@...> wrote on 01/15/2009 04:44:01 PM: > > > Hello again, > > I already familiar with that feature, and already tried a classed > > build > by > > me. But I couldn't solve the situation. For sure I'm not doing the > > things right. > > > > The only resolution that come to my mind was (using the example > > (its different from the past one but I think the point is the same) > > Let's suppose I have a start activity. > > The transition from this activity loads the values(Static values) to > > the variable defined using the class build by me, lets say "my list > type"... > > A is an instance of "my_list_type"!!! how can I create an instance?!?! > This > > is not the right way.... > > a.add(2); > > a.add(3); > > a.add(7); > > > > > > The problem now, at least for me, is how do you instantiate the > class?!you > > need an instance right?!?! What I need to change? > > > > So let's suppose: > > MY_list_type is defined using the class my_personal_list.java bellow: > > ######################################### > > private List real_list; > > My_personal_list() > > { > > > > } > > Add_value(int value) > > { > > Real_list.add(value); > > } > > Retrieve_list() > > { > > Return real_list; > > } > > ##################################### > > > > > > > > Regards, > > Pedro > > > > > > > > > > > > > > > > > > > > -----Mensagem original----- > > De: gramani@... [mailto:gramani@...] > > Enviada: quinta-feira, 15 de Janeiro de 2009 14:54 > > Para: shark@... > > Assunto: [shark] Re: Shark List Issue > > > > Hello Pedro, > > > > I am not sure if maybe I misunderstand your question, but I hope you > > know that arbitrary (custome defined) Java classes can be used as > > process variables..? From the current version docs I see this: "you > > can define > any > > Java object to be a workflow variable (through the use of XPDL > > ExternalReference data type), and then use it in shark (of course, > > this class has to be on shark's classpath). " > > > > In earlier version's docs, there was more on this topic here: > > > > http://shark.objectweb.org/doc/1.1/HowTo/how_to.html#d0e360 > > > > Again, I apologise if I didn't get your question :) Geeta > > > > "uninova" <pd@...> wrote on 01/15/2009 02:33:00 PM: > > > > > Hello all, > > > > > > Its difficult to explain the situation but lets try.... > > > > > > I have a problem with lists and shark.... > > > The shark process starts to run when a request from an outside > > > program is made (my program). > > > > > > Situation: > > > My program first receives a list of arguments to a list variable > > > type; Sends it to shark let say "LIST_IN_VAR", also starting the > > > process; And after doing some work sends the same list to my > > > program which will > > use > > > it to do more things...; > > > Shark don't really uses the list, at least in this example. It > > > simply receives and resend it to my program, but the list needs to > > > enter in > > shark. > > > > > > Problem: > > > The problem is that I can't used Lists in shark... so what I do > > > now > > > LIST_IN_VAR is now defined as a string. > > > When a request is made, my program converts the list to a string > > > and > > sends > > > it to shark > > > Shark do is work....And in the end My program receives the "where > > > to send" and the list as a String Converts the string back to LIST > > > and sends and continue doing its > job.... > > > > > > How can I use the list type from shark? > > > It's possible to create a variable of type list and define a > > > initial > > value?? > > > > > > Regards and thanks, > > > Pedro > > > > > > > > > > > > -- > > > This message has been scanned for viruses and dangerous content by > > > MailScanner, and is believed to be clean. > > > > > > > > > -- > > > 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 > > > > > > > > > > -- > > This message has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > -- > > 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 > > > > > > > -- > This message has been scanned for viruses and dangerous content by > MailScanner, and is believed to be clean. > > > -- > You receive this message as a subscriber of the shark@... mailing > To unsubscribe: mailto:shark-unsubscribe@... For general help: > mailto:sympa@...?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws -- 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 |
| < Prev | 1 - 2 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |