Configuring a Data Provider (Combo Box) in Java with a parameter

31 views
Skip to first unread message

EDISSON GEOVANNY CAMPOVERDE LLANOS

unread,
Aug 24, 2017, 1:27:44 PM8/24/17
to jBPM Usage
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.

Donato Marrazzo

unread,
Aug 28, 2017, 4:40:39 AM8/28/17
to jBPM Usage

I think that the best approach is passing the ActorId as parameter of HT then use the value in dataprovider.

EDISSON GEOVANNY CAMPOVERDE LLANOS

unread,
Aug 28, 2017, 10:01:15 AM8/28/17
to jBPM Usage
Thanks for the response.

I know that I have to do that but, how can I do it ?

How an I use the actor id in my data proverter programmed in JAVA? How can I recieve the ActorId as parameter to use in my data provider? How can i send the actor id from the HT to my data provider?

Thanks in advance for your help

Donato Marrazzo

unread,
Aug 28, 2017, 11:56:03 AM8/28/17
to jBPM Usage
Hi,
looking at it better, maybe it's not possible!
Sorry for the misleading suggestion!
Have you dumped the content of  FormRenderContext? 

Reply all
Reply to author
Forward
0 new messages