I have JBPM process where I have add Service Task Rest. In the assignments inputs I want to set url through config file and not directly in the source field.
I am researching 3 days but still I cant find it.
Is there any option to set the url value like this:
http://{ip-address}/{port}/update
As you can see in the example above ip-address and port should be read from a config or property file.
The next part is just to check is everything okay.
Can I achieve the result like this:
Config config = new Config();
/** Output Variables in a HashMap ***/
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("Result", msg); // ("name of variable", value)
resultMap.put("url", "http://" + config.getProperty("ip") + config.getProperty("port") + "/update");
manager.completeWorkItem(workItem.getId(), resultMap);
NEW EDIT
Maybe I wrote it a little bit confusing but like this the whole url need to be in the config and what I want is only ip and port to be read from config and to to write in the source like this manually: http:// (wrote by me manually) + ip : port (read from config) / update (wrote by me manually). So as I wrote above, I want only ip and port values from config. That is why I wrote them as {ipVar}:{portVar} above.
New edit: Thank you for the detailed answers. Maybe I am writing it confusing so I will explain this picture:
you see my point was to only get ip and port from config and anything else what user want to write because there can be another endpoints...
for example: http://{ip}:{port}/create/user/bashir or https://{ip}:8080/asd/update
I want to get ip and port as variables from config and to use it if I need in some assignment, for this case URL.




