[jboss-user] [jBPM] - user task or script task ?

joachyt do-not-reply at jboss.com
Tue Sep 6 19:32:50 EDT 2011


joachyt [http://community.jboss.org/people/joachyt] created the discussion

"user task or script task ?"

To view the discussion, visit: http://community.jboss.org/message/625146#625146

--------------------------------------------------------------
hi ,
I am new to workflow. Appreciate any pointers on this design question. 

1. is it normal or best practice to design workflows such that they can be run with UI input supplementing the data and also the workflow can be run as a batch job with data supplied to the workflow by non UI means ? 
   If so, should I have script tasks which will undertake UI handling when run in the UI context and pull the data by some other means [xml, db etc] when run in batch mode ? 

  In general when you design a workflow, is it the case that you almost always know at design time whether you are going to have certain action hnalded by user or some other script ?

2. In my problem, I have some backend java objects that do the actual work. I need to call a specific method on them as part of my workflow actions. When I use "script task" and java as the script option, the designer takes the java code snippet. can I do something like this : 
     Service service = ServiceLocator.getService("some identifier");
     // access some state data from the workflow
     service.invoke("data retrieved from workflow");
    Is this the correct usage ?
    Is there a standard interface that jbpm would recognise that my service objects can implement , thereby , my service objects are first class workflow handlers. 

appreciate any help.
thanks
Joe
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/625146#625146]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110906/e4457b15/attachment.html 


More information about the jboss-user mailing list