cancel
Showing results for 
Search instead for 
Did you mean: 

How to customize REST certain rest api calls

penusila611621
Champ in-the-making
Champ in-the-making

Dear team,

Would anybody had an idea on how to customize certain rest features in Activiti.  For examples: runtime/tasks?owner="xxx"&candidateGroup="ccc" is fetching only tasks assigned to user and not returning the tasks which are claiable by the role ccc.

I would like to customize these REST api to add and condition in the source code of REST.
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
We're open source 🙂 Just clone the source, do the change and rebuild the war.

srón
Champ in-the-making
Champ in-the-making
One thing I was amazed by is the following phenomenon. I opened the activiti-explorer GUI and I lokked up the demo model that can be seen there:

ACT_RE_MODEL, and it has the id 50.

When I wanted to grab that one by making use of the Rest-API with the Postman rest client with the following command:


  http://kermit:kermit@myhost:myport/activiti-rest/repository/models/50


Now this is the answer I get:

<code>
<!DOCTYPE html>
<html>
    <head>
        <title>Apache Tomcat/8.0.14 - Error report</title>
        <style type="text/css">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}</style>
    </head>
    <body>
        <h1>HTTP Status 404 - /activiti-rest/repository/models</h1>
        <div class="line"></div>
        <p>
            <b>type</b> Status report
        </p>
        <p>
            <b>message</b>
            <u>/activiti-rest/repository/models</u>
        </p>
        <p>
            <b>description</b>
            <u>The requested resource is not available.</u>
        </p>
        <hr class="line">
            <h3>Apache Tomcat/8.0.14</h3>
        </body>
    </html>
</code>

I do not know what the reason for this error might be, but I suppose that this, too, calls for a rebuild of the war, yet I was wondering why the user guide already contains the description of a rest-request "GET repository/models/{modelId}" with which it is said that models can be called.

penusila611621
Champ in-the-making
Champ in-the-making
Thanks jbarrez. We are customizing the rest api's as required.