How to get the process form URL by Engine API


Hi everyone

I have a sample process which has a instantiation form with an external URL, so I want to retrieve this URL from Engine API but I couldn't find any solution to retrieve the URL, but I have know that in Rest API with can gain the URL by "/bonita/API/form/mapping" and passing the processDefinitionId and type but I need a way for Engine API.

Thanks for your replies.

1 answer

This one is the BEST answer!

Sorry, after about a morning of thinking and research I could find the way which I was Looking for whole morning

ProcessAPI processAPI = TenantAPIAccessor.getProcessAPI(apiSession);
ProcessDefinition processDefinition = processAPI.getProcessDefinition(deploymentInfo.getProcessId());
SearchOptionsBuilder optionsBuilder=new SearchOptionsBuilder(0,100);
optionsBuilder.filter(FormMappingSearchDescriptor.TYPE, FormMappingType.PROCESS_START);
SearchResult formMappingSearchResult=processAPI.searchFormMappings(optionsBuilder.done());
for (FormMapping formMapping : formMappingSearchResult.getResult()) {