Hello! We use the Bproc in our project. We have a lot of users who communicate with a server through REST so they use their mobile phone to get a job. Now we have a necessity to use Bproc’s processes in a mobile. How can we communicate with Bproc’s processes via REST API?
Hi,
the easiest solution is to create a middleware service that performs required bproc operations, configure the service for working with REST API and invoke service methods via HTTP requests from your mobile application.
Here is a sample on GitHub that demonstrates this approach. A brief description is in the README.
1 Like
Hello!
I am trying to apply this solution in our project. It seems that all is working fine, but I have a question about UserProvider. In our code:
@Component(TestUserProvider.NAME)
public class TestUserProvider implements UserProvider {
public static final String NAME = "enerstroymain_TestUserProvider";
@Inject
private DataManager dataManager;
@Override
public User get(String executionId) {
return dataManager.load(User.class)
.query("select e from sec$User e where e.login = :login")
.parameter("login", "kruglov.sec")
.one();
}
}
I hardcoded login of assignee. But in the process assignee should be variable and must be taken from process variables. Should use “Process variable” as Assagnee source instead of “UserProvider”? Will it work?
All assignee sources should work. Just select the one that fit your needs.