get User Task Form using REST api

420 views
Skip to first unread message

gurijala naresh

unread,
Apr 5, 2018, 4:29:26 AM4/5/18
to jBPM Usage
Hi Experts,

I'm using JBPM6. My process have one varialble which is a Object. 
I pass this object to the process and some rules will be fired. After that object will be sent to User task where user will update some fields and submit. 

I'm able to test this from workbench. I'm wondering how we perofrm same using REST api.

-> How to get user task form in another application (using Angular )
-> How to get process varialble details using kie-server REST api.

Please help me on this.

Thanks,
Naresh

jagan reddy

unread,
Apr 5, 2018, 12:34:48 PM4/5/18
to jBPM Usage
1) i don't know in angular
2) http://localhost:8080/kie-server/services/rest/server/containers/{container id}/processes/definitions/{process id}/variables

gurijala naresh

unread,
Apr 6, 2018, 2:17:58 AM4/6/18
to jBPM Usage
Hi Jagan,

Thanks for quick reply. 

I have one container 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response type="SUCCESS" msg="Info for container lm">
    <kie-container container-id="lm" status="STARTED">
        <release-id>
            <artifact-id>tbdemo</artifact-id>
            <group-id>lm</group-id>
            <version>1.1</version>
        </release-id>
        <resolved-release-id>
            <artifact-id>tbdemo</artifact-id>
            <group-id>lm</group-id>
            <version>1.1</version>
        </resolved-release-id>
        <scanner status="DISPOSED"/>
    </kie-container>
</response>


GET:

No data found for this request.
But i have started one process from Workbench already.

Am i missing something. ?

Can we start process using REST call with Object as input. ( in my case UserDetails object which containes name, age, address etc.)

If you have some examples please send me. That would be great help.

Thanks, Naresh

jagan reddy

unread,
Apr 6, 2018, 2:31:21 AM4/6/18
to jBPM Usage
check process in active or completed.


to start bpmn use this rest api :


method: post
username,password 
payload: 


{
  "applicant": {
    "com.qruize.demos.loandemo.Applicant": {
      "name": "jagan",
      "creditScore": 230
    }
  },
  "loan": {
    "com.qruize.demos.loandemo.Loan": {
      "amount": 2500,
      "duration": 24,
      "interestRate": 12,
      "approved": false
    }
  }
}



Maciej Swiderski

unread,
Apr 6, 2018, 2:32:02 AM4/6/18
to gurijala naresh, jBPM Usage
--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+...@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-usage/2b2fbba7-50b1-4e41-8443-51894158dcac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

gurijala naresh

unread,
Apr 6, 2018, 2:42:49 AM4/6/18
to jBPM Usage
Hi Jagan,

I'm using 

body :

{ "lm.tbdemo.UserProfile" : {
  "name": "naresh",
  "goal": "car",
  "id": 25,
  "isFirstQuestion" : true,
  "previousQuestion" : null,
  "answer" : null,
  "nextAction" : null,
  "nextQuestion" : null
}
}

Getting response as :

Unable to create response: Can't unmarshall input string: { "lm.tbdemo.UserProfile" : { "name": "naresh", "goal": "car", "id": 25, "isFirstQuestion" : true, "previousQuestion" : null, "answer" : null, "nextAction" : null, "nextQuestion" : null } }

Am i missing something ??

Thanks, naresh

gurijala naresh

unread,
Apr 6, 2018, 2:48:40 AM4/6/18
to jBPM Usage
Hi Maciej,

I followed the article but was not able understand how we are getting input/output forms to complete user task. 
In my process Rules task output(which is custom Object) is input to the UserTask. We need to change that object in user task.

process will be like this .



Thanks,
Naresh

jagan reddy

unread,
Apr 6, 2018, 2:54:10 AM4/6/18
to jBPM Usage
what are the inputs you are giving

gurijala naresh

unread,
Apr 6, 2018, 2:59:16 AM4/6/18
to jBPM Usage
Only UserProfile Object.
as JSON like this.

{ "lm.tbdemo.UserProfile" : {
  "name": "naresh",
  "goal": "car",
  "id": 25,
  "isFirstQuestion" : true,
  "previousQuestion" : null,
  "answer" : null,
  "nextAction" : null,
  "nextQuestion" : null
}
}

jagan reddy

unread,
Apr 6, 2018, 9:38:40 AM4/6/18
to jBPM Usage
what are the inputs you are giving in kie workbench 

Which server you are using to deploy kie workbench and kie server.
mention version of kie workbench and kie server
Reply all
Reply to author
Forward
0 new messages