Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Activiti/Activiti
Browse files Browse the repository at this point in the history
  • Loading branch information
tijsrademakers committed Jun 19, 2013
2 parents 3d85c53 + e345876 commit f3c7804
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,9 @@ public HistoricVariableInstanceResponse createHistoricVariableInstanceResponse(S
HistoricVariableInstanceResponse result = new HistoricVariableInstanceResponse();
result.setId(variableInstance.getId());
result.setProcessInstanceId(variableInstance.getProcessInstanceId());
result.setProcessInstanceUrl(securedResource.createFullResourceUrl(RestUrls.URL_HISTORIC_PROCESS_INSTANCE, variableInstance.getProcessInstanceId()));
if(variableInstance.getProcessInstanceId() != null) {
result.setProcessInstanceUrl(securedResource.createFullResourceUrl(RestUrls.URL_HISTORIC_PROCESS_INSTANCE, variableInstance.getProcessInstanceId()));
}
result.setTaskId(variableInstance.getTaskId());
result.setVariable(createRestVariable(securedResource, variableInstance.getVariableName(), variableInstance.getValue(),
null, variableInstance.getId(), VARIABLE_HISTORY_VARINSTANCE, false));
Expand Down
11 changes: 9 additions & 2 deletions userguide/src/en/chapters/ch14-REST.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
<title>Installation and Authentication</title>

<para>Activiti includes a REST API to the Activiti Engine that can be installed by deploying the activiti-rest.war file to a servlet container like Apache Tomcat. However, it can also be used in another web-application by including the servlet and it's mapping in your application and add all activiti-rest dependencies to the classpath.</para>


<para>By default the Activiti Engine will connect to an in-memory H2 database. You can change the database settings in the db.properties file in the WEB-INF/classes folder. The REST API uses JSON format (http://www.json.org) and is built upon the Restlet (http://www.restlet.org).</para>
<para>All REST-resources require a valid Activiti-user to be authenticated by default. Basic HTTP access authentication is used, so you should always include a <literal>Authorization: Basic ...==</literal> HTTP-header when performing requests or include the username and password in the request-url (eg. <literal>http://username:password@localhost...</literal>).
</para>
Expand Down Expand Up @@ -39,6 +37,14 @@
</servlet>]]></programlisting>
</section>

<section id="restUsageInTomcat">
<title>Usage in Tomcat</title>
<para>Due to <ulink url="http://tomcat.apache.org/tomcat-7.0-doc/security-howto.html"> default security properties on Tomcat</ulink>, <emphasis role="bold">escaped forward slashes (<literal>%2F</literal> and <literal>%5C</literal>) are not allowed by default (400-result is returned).</emphasis>
This may have an impact on the deployment resources and their data-URL, as the URL can potentially contain escaped forward slashes.

<emphasis role="bold">When issues are experienced with unexpected 400-results, set the following system-property: <literal>-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true.</literal></emphasis></para>
</section>

<section>
<title>Methods and return-codes</title>
<table>
Expand Down Expand Up @@ -466,6 +472,7 @@
</section>
<section>
<title>Deployment</title>
<para><emphasis role="bold">When using tomcat, please read <link linkend="restUsageInTomcat">Usage in Tomcat</link>.</emphasis></para>
<section>
<title>List of Deployments</title>
<para>
Expand Down

0 comments on commit f3c7804

Please sign in to comment.