Hello Friends,
I have created a data provider and included the jar into my jbpm-console.war folder. Now, What I want to do is recieve the actor id parameter to use as parameter to get only certain values in my provider.
For example, what I want to do is if I'm logged as krisv I want to see only the values 1 and 2 of my data provider and if I'm logged as mary I want to see only the values 3 and 4 and I'm logged as admin I want to se all values.
I want to use this sentence:
String logged_user = (String)((org.jbpm.workflow.instance.node.WorkItemNodeInstance)kcontext.getNodeInstance()).getWorkItem().getResult("ActorId");
But, in Java I'm not hable to define the variable kcontext to get the user id. It only works in a script task into jbpm console.
How Can I do to solve this problem?
Kind regards,
Geovanny Campoverde.
PD: I'm loading the data into my data provider using a rest service. What I want to do is pass the user id parameter to my rest service to obtain only the options that are related with an especific user.