This module provides REST web services to access to workflow's plugin data.
Configure the private keys for the signature in the file workflow-rest.xml :
<filters> <filter> <filter-name>WorkflowRestSecurity</filter-name> <url-pattern>/rest/workflow/*</url-pattern> <filter-class>fr.paris.lutece.util.signrequest.servlet.HeaderHashRequestFilter</filter-class> <init-param> <param-name>elementsSignature</param-name> <param-value></param-value> </init-param> <init-param> <param-name>validityTimePeriod</param-name> <param-value>0</param-value> </init-param> <init-param> <param-name>privateKey</param-name> <param-value>change me</param-value> </init-param> </filter> </filters>
There is a JSP that allow to run test on the module-workflow-rest. It is accessible through the following link :
jsp/admin/plugins/workflow/modules/rest/TestWorkflowRest.jsp
Note : To access to this JSP, one must be authenticated in the Back-Office. The filter tags must also be commented in the file workflow-rest.xml so the module won't use the security, otherwise, an HTTP 401 response will be returned.
XML syntax :
http://myhost/mywebapp/rest/workflow ou http://myhost/mywebapp/rest/workflow.xml
http://myhost/mywebapp/rest/workflow/{id_workflow} ou http://myhost/mywebapp/rest/workflow/{id_workflow}.xml
JSON syntax :
http://myhost/mywebapp/rest/workflow.json
http://myhost/mywebapp/rest/workflow/{id_workflow}.json
XML syntax :
http://myhost/mywebapp/rest/workflow/state ou http://myhost/mywebapp/rest/workflow/state.xml
http://myhost/mywebapp/rest/workflow/state/{id_state} ou http://myhost/mywebapp/rest/workflow/state/{id_state}.xml
JSON syntax :
http://myhost/mywebapp/rest/workflow/state.json
http://myhost/mywebapp/rest/workflow/state/{id_state}.json
XML syntax :
http://myhost/mywebapp/rest/workflow/action ou http://myhost/mywebapp/rest/workflow/action.xml
http://myhost/mywebapp/rest/workflow/action/{id_action} ou http://myhost/mywebapp/rest/workflow/action/{id_action}.xml
JSON syntax :
http://myhost/mywebapp/rest/workflow/action.json
http://myhost/mywebapp/rest/workflow/action/{id_action}.json
To perform an action, a form type POST is needed with the following parameters :
Parameter name | Parameter type | Description |
---|---|---|
id_action | integer | ID of the action (mandatory) |
id_resource | integer | ID resource (mandatory) |
resource_type | text | Resource type (mandatory) |
http://myhost/mywebapps/rest/workflow/action/do
http://myhost/mywebapps/rest/workflow/action/do.json
XML syntax :
http://myhost/mywebapp/rest/workflow/resource_workflow/{id_workflow}/{resource_type}/{id_resource} ou http://myhost/mywebapp/rest/workflow/resource_workflow/{id_workflow}/{resource_type}/{id_resource}.xml
JSON syntax :
http://myhost/mywebapp/rest/workflow/resource_workflow/{id_workflow}/{resource_type}/{id_resource}.json