-
1. Re: How to invoke applications in a task activity
sebastian.s Jan 28, 2010 2:29 PM (in response to jiemin)What are you trying to achieve? I am under the impression that you are either mixing things up ( using your own GUI instead of task forms and invoking external applications and systems) or that you want to combine a user activity and a system invokation in one activity. Regarding your own GUIs: You are free to use your own GUI (JSF, Swing, whatever) and you can do this by using the jBPM-API which enables you to perform any operation needed for task management etc. In case you are trying to achieve the last thing mentioned I don't see the reason for this. Maybe you can clarify on this.
-
2. Re: How to invoke applications in a task activity
jiemin Jan 28, 2010 10:11 PM (in response to sebastian.s)Thanks a lot for your answer.
I don't have my own GUI. I just want to invoke java classes or methods in a user activity.
Do you mean using JSF, Swing etc. for the web client or for the task form?
If I could use JSF for the task form, how could I combine it to the task activiy? And which jBPM-API should I use? How does a task definition look like?
Thank you very much
-
3. Re: How to invoke applications in a task activity
sebastian.s Jan 30, 2010 2:20 AM (in response to jiemin)It does not make sense to me to invoke java methods within a user task. Use the java task or the custom task for this. Where's the problem with placing a user task and afterwards a java task in the process? If I got you wrong you still need to elaborate on this. I did not mean using JSF for task forms in the BPM Console. I thought you have been trying to implement your own webclient.
Since you did not state differently I assume you are using jBPM 4. Note that there are differences between jBPM 3 and 4, especially in terms of the API. Please the Java-API doc on the homepage. Everything's in there and in the documentation as well. Afterwards you can ask a more specific question.
I still do not know what exactly you are trying to achieve and why.
-
4. Re: How to invoke applications in a task activity
jiemin Jan 30, 2010 1:59 PM (in response to sebastian.s)Hello Sebastian,
I use jBPM 4.2.
If I want a task form with some buttons and the user can click on any button, so that a java method ist invoked (e.g. download a document from a server and open it), how can I realize it in a process step? I don't want to open the document in a java activity or custom activiy, because the user should read the document right and say wether the document goog or not good, then the appropriate transition is taken. Of couse I can put a second user activity after a java activiy(download and open a document), but if the user, who gets the first task, finishes the second task assigned to him in the next few days, and it is possible the document is not longer on his computer. This is only a example. I don't know how I can implement a task form with some buttons. I know the FreeMarker Template ist not for it.
Thank you for your answer
Greetings, Jiemin
-
5. Re: How to invoke applications in a task activity
sebastian.s Jan 30, 2010 2:17 PM (in response to jiemin)Download the document in an automatic activity before the user task and store it in a process variable. I don't know what document type you are talking off but it will probably be impossible to show in a task form. Why don't you build your own graphical application if you got such requirements? -
6. Re: How to invoke applications in a task activity
jiemin Jan 31, 2010 11:14 AM (in response to sebastian.s)Should I build my own graphical application for the client or for the task form?
If I build my own Web Client or Desktop Client for jBPM, how is the problem with a task form that has some buttons resolved?
In XPDL (another process definition language) you can assign a task to a user and define a java method to this task, if the user works on the task, the java method is called, a form with text and some buttons is showed, and the events clicking on the buttons can be handled. How can I do this in jBPM? I just want to have a task form with some buttons and handle the user actions in a user activity.
Thank you very much.
-
7. Re: How to invoke applications in a task activity
jiemin Feb 1, 2010 5:24 AM (in response to jiemin)Hello all
Does anyone have a idea, how a task form with any buttons is built, so that clicking on a button a java methode (e.g. a action listener) will be invoked?
Thank you for your help.
Greetings
-
8. Re: How to invoke applications in a task activity
brittobics Feb 1, 2010 5:32 AM (in response to jiemin)hai
For Every Task You can create a JSF Form
Which has some buttons and textboses and so on.
-
9. Re: How to invoke applications in a task activity
kukeltje Feb 1, 2010 6:28 AM (in response to jiemin)Action listeners are JSF, event 'listeners' are jBPM.
the value of the event attribute on the on element can have any custom value. So just write a e.g. *generic* jsf actionhandler that in the code fires a jbpm event on the specific task. The event-listener will be triggered then.
Currently you have to cast the Excution to ExecutionImpl(non api class) to be able to fire an event. The 'observable element' in the param is the activity you want to fire an event on. Please file a jira issue to get this in the ExecutionService as an new method. -
11. Re: How to invoke applications in a task activity
jiemin Feb 2, 2010 1:48 AM (in response to brittobics)Hello John
Do you mean jBPM 4 or jBPM 3 ?
I thought also JSP can be used for a task form, but I didn't find any information about it in the developers guide.
How does the task definition look like?
Should it look like <task name="name " form="http:localhost/8080/package/a_form.jsp"> ?
Should the web app. deployed on the same server, in which jBPM runs?
Thank you.
-
12. Re: How to invoke applications in a task activity
jiemin Feb 2, 2010 5:20 AM (in response to kukeltje)Hello Ronald,
Can JSP be used for a taskform?
What does mean a actionhandler that fires a jBPM event?
When should the method you talk about in ExecutionService be invoked, if this methode would be provided? I don't really understand your concept.
Thanks a lot for your answer. .
-
13. Re: How to invoke applications in a task activity
kukeltje Feb 3, 2010 5:29 PM (in response to jiemin)Can JSP be used for a taskform?
Yes, but NOT in the (j)BPM console, at least not easily
What does mean a actionhandler that fires a jBPM event?
A piece of javacode (See the link e.g. of the jsf actionhandler, jsf bean, but this could als be a struts action or whatever) using the jBPM api (well, with one cast) to have some java code run in jBPM
When should the method you talk about in ExecutionService be invoked, if this methode would be provided?
Whenever you think it is needed... I cannot decide that for you.
I don't really understand your concept.
You want at the push of a button to have some java code in jBPM that is related to a task to be executed
button = html (jsp,jsf, ....)
actionhandler = javacode on serverside that belongs to jsf
eventlistener = javacode in jBPM that can belong to a task definition (triggered by fireing an event)
That is the concept...
-
14. Re: How to invoke applications in a task activity
jiemin Feb 5, 2010 7:00 AM (in response to kukeltje)Yes, but NOT in the (j)BPM console, at least not easily
How does the task definition look like? Perhabs so <task form="http:localhost/8080/package/a_form.jsp> ? (how does the task activity know that I use the JSP? )
Thank you for your help