07-17-2013 10:32 PM
WebClient client = WebClient.create(
"http://localhost:8080/activiti-rest/service/process-definition/myTest:1:401" ,
userName, passwd, null);
System.out.println(client.getBaseURI());
System.out.println(client.getCurrentURI());
07-18-2013 04:07 AM
/**
* Get a request attribute value, decoded.
*/
protected String getAttribute(String name) {
return decode((String) getRequest().getAttributes().get(name));
}
protected String decode(String string) {
if(string != null) {
try {
return URLDecoder.decode(string, "UTF-8");
} catch (UnsupportedEncodingException uee) {
throw new IllegalStateException("JVM does not support UTF-8 encoding.", uee);
}
}
return null;
}
/**
* Test getting a single process definition.
* GET repository/process-definitions/{processDefinitionResource}
*/
@Deployment(resources={"org/activiti/rest/api/repository/oneTaskProcess.bpmn20.xml"})
public void testGetProcessDefinition() throws Exception {
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().singleResult();
ClientResource client = getAuthenticatedClient(RestUrls.createRelativeResourceUrl(RestUrls.URL_PROCESS_DEFINITION, encode(processDefinition.getId())));
Representation response = client.get();
// Check "OK" status
assertEquals(Status.SUCCESS_OK, client.getResponse().getStatus());
07-18-2013 04:08 AM
07-18-2013 05:10 AM
07-18-2013 05:12 AM
07-18-2013 06:02 AM
07-18-2013 06:09 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.