-
1. Re: How to assign a task to the user who created the workflow?
salaboy21 Oct 18, 2011 10:10 AM (in response to jgiordano)Hi jgiordano,
Can you give us a little bit of more context? which version jBPM are you using what do you want to achieve?
Usually a business process is started by an event not an user, if a user start the process you can create a process variable and use that variable to do the first task assignment.
Cheers
-
2. Re: How to assign a task to the user who created the workflow?
jgiordano Oct 18, 2011 10:27 AM (in response to salaboy21)In the larger context, I am using a document management system called OpenKM, which uses jBPM to implement workflows. The OpenKM user selects a document and then starts the workflow. The workflow arrives at a task node that requires human input. I would like that task to automatically be assigned to the user who started the workflow in OpenKM, so that user will be prompted by OpenKM to enter the required input. The version of OpenKM I have installed uses jBPM 3.3.1.
I am able to capture the user ID of the OpenKM user who starts the workflow, but I do not understand how to use that information programatically to assign the task to that user.
-
3. Re: How to assign a task to the user who created the workflow?
salaboy21 Oct 18, 2011 10:53 AM (in response to jgiordano)Inside the process you can use expressions to do the assignment. Something like: ${variable}. If you can capture the user id and insert taht as a process variable when the task is going to do the assignment will pick up that variable, resolve it and do the assignment.
Cheers
-
4. Re: How to assign a task to the user who created the workflow?
jgiordano Oct 18, 2011 11:01 AM (in response to salaboy21)Thank you for that information. I am rather new at jBPM, so could you clarify a little for me? I have an action with some Java code that captures the user ID in a node just before the task node. How would I use that to specify the assignment of the task? Again, I'm a jBPM newbie, so please be as specific as possible. I really appreciate your help.
-
5. Re: How to assign a task to the user who created the workflow?
salaboy21 Oct 18, 2011 11:07 AM (in response to jgiordano)You should define a variables at process level. inside your action node you need to set up that variable value and then in the task definition (XML file) in the assignment field you need to use an expression ${variable}. Where "variable" is the name of the variable that contains the user name
Cheers
-
6. Re: How to assign a task to the user who created the workflow?
jgiordano Oct 18, 2011 1:37 PM (in response to salaboy21)Great, thanks!