0
votes

I am using jBPM 6.1.0 and trying to fire a rest service from my jBPM using REST Service Task.

I need to pass the current logged in user id to the reset service. For that, I would like to know how to get the current logged in user id.

2

2 Answers

2
votes

There isn't a documented method to get an User or a collection of them.

However if you know the User to make the REST api call, you could pass the same string as a parameter (process variable) when you start a new process instance and then use that variable as a parameter in your REST service task.

The notation to pass variables to the REST Service Task URL is:

http://server.company.com/rest/service?parameter=#{process_variable}
0
votes

Right now the only way to invoke REST calls for a certain user is using his credentials in each call, embedding it in the URL like:

http://user:[email protected]/business-central/rest

You can't impersonate another user to make a call. The best you can do is use the 'Administrator' account in order to delegate, forward and release tasks.