23 | | 5. Stop Tomcat |
24 | | 6. Make sure that the Java process has stopped using `ps -f` and killing the process if necessary. |
25 | | 7. Start Tomcat |
26 | | |
27 | | == Procedure 2 |
28 | | |
29 | | The settings are set using the REST API. See [[https://openspecimen.atlassian.net/wiki/display/CAT/UK+configuration;jsessionid=DAE0BD2C084248321CE32F05F0966221|OpenSpecimen REST API Documentation]]. |
30 | | |
31 | | - The `cp_id` is the id of the protocol and can be obtained from the URL when viewing the protocol or its participants. For example `https://www15.lamp.le.ac.uk/openspecimen/#/cp-view/12/participants` |
32 | | - Use Postman or other HTTP utility to make the following request: |
33 | | |
34 | | URL:: http[s]:<host>:<port>/openspecimen/rest/ng/collection-protocols/{cp_id}/workflows |
35 | | Method:: PUT |
36 | | Content-Type:: application/json |
37 | | parameter:: cp_id using the value from above. |
38 | | Request Body:: |
39 | | |
40 | | {{{ |
41 | | [ |
42 | | { |
43 | | "name":"registerParticipant", |
44 | | "view":"plugin-ui-resources/le/collect-specimens.html", |
45 | | "ctrl":"leRegAndCollectSpecimensCtrl", |
46 | | "data":{ |
47 | | "boxOpts":{ |
48 | | "dimension":{ |
49 | | "rows":8, |
50 | | "columns":12 |
51 | | }, |
52 | | "compact":false |
53 | | } |
54 | | } |
55 | | } |
56 | | ] |
57 | | }}} |
58 | | |
59 | | Response Body:: |
60 | | {{{ |
61 | | |
62 | | { |
63 | | "cpId": <cp_id>, |
64 | | "shortTitle": <cp_short_title>, |
65 | | "workflows": { |
66 | | "registerParticipant": { |
67 | | "name": "registerParticipant", |
68 | | "view": "plugin-ui-resources/le/collect-specimens.html", |
69 | | "ctrl": "leRegAndCollectSpecimensCtrl", |
70 | | "data": { |
71 | | "boxOpts": { |
72 | | "dimension": { |
73 | | "rows": 8, |
74 | | "columns": 12 |
75 | | }, |
76 | | "compact": false |
77 | | } |
78 | | } |
79 | | } |
80 | | } |
81 | | } |
82 | | }}} |
83 | | - The setting can be deleted by updating all the values to empty using the REST API. For example |
84 | | |
85 | | {{{ |
86 | | [ |
87 | | { |
88 | | "name": "", |
89 | | "view": "", |
90 | | "ctrl": "", |
91 | | "data": { } |
92 | | } |
93 | | ] |
94 | | }}} |
95 | | - I used Postman to get it to work. I had to supply my username and password in the Basic Auth section. |
96 | | - Also need to set up auto label formats - see [[https://openspecimen.atlassian.net/wiki/x/doB1]] |