TaskForm Fields with REST

373 views
Skip to first unread message

Neeraj Pandey

unread,
Nov 25, 2015, 12:25:18 AM11/25/15
to jBPM Usage
Hi All,

When we query  something "http://localhost:8080/jbpm-console/rest/task/13/showTaskForm" like this we get a task form URL.
The form is what we make in jbpm. I want to customize this from (with css) in my web page not in KIE-WB. Is there any way that we can query Fields and their data type from REST so that I can render the same form with css customization in my web page.

Thanks in advance.

Neeraj Pandey

unread,
Nov 26, 2015, 9:10:32 AM11/26/15
to jBPM Usage
Any help please?

Pere Fernandez

unread,
Nov 26, 2015, 9:17:47 AM11/26/15
to Neeraj Pandey, jBPM Usage
Hi Neeraj,

sorry for the delay answering. At this point there is no way to get the "Form Settings" via REST to let remote apps render the form using their styling. If I'm not wrong there's a development coming that will do exactly that. I'll ask to see how is it going


--
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/422a52b8-9c76-4464-8aef-42c121d1249b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Neeraj Pandey

unread,
Nov 26, 2015, 9:22:39 AM11/26/15
to jBPM Usage, gpk.pand...@gmail.com
Thanks Pere for letting me know this.
Is there any workaround for this situation.
So far I could get the task form url and used that url into my html page with an iframe. is it possible to submit that filled form via REST?

Neeraj Pandey

unread,
Dec 3, 2015, 4:42:54 AM12/3/15
to jBPM Usage, gpk.pand...@gmail.com

Hi Pere,

Please help me to get a work around for this form submission from external application.


On Thursday, November 26, 2015 at 7:47:47 PM UTC+5:30, Pere Fernandez wrote:

Pere Fernandez

unread,
Dec 3, 2015, 11:20:34 AM12/3/15
to Neeraj Pandey, jBPM Usage
Hi Neeraj it seems that this week is going to be merged that feature on master the master, I'll keep you informed.

El dj., 3 des. 2015 a les 10:42, Neeraj Pandey (<gpk.pand...@gmail.com>) va escriure:

Neeraj Pandey

unread,
Dec 4, 2015, 1:15:24 AM12/4/15
to jBPM Usage, gpk.pand...@gmail.com
Sounds really great!! Thanks for the update

Neeraj Pandey

unread,
Jan 7, 2016, 9:00:03 AM1/7/16
to jBPM Usage, gpk.pand...@gmail.com
Hi Pere,

Need your help on this.

For time being I am going with the approach given in the document https://docs.jboss.org/jbpm/v6.1/userguide/chap-formmodeler.html
Following are steps that I have taken so far:
I have a process deployed in jbpm –

<process-definition>
<id>TEST.FormTestRnd</id>
<name>FormTestRnd</name>
<version>1.0</version>
<package-name>org.jbpm</package-name>
<deployment-id>TEST:TEST:1.2</deployment-id>
<forms>...</forms>
<variables>...</variables>
</process-definition>

I have downloaded the jbpm-forms-rest-integration.js from https://github.com/droolsjbpm/kie-wb-distributions/tree/master/kie-wb/kie-wb-webapp/src/main/webapp/js and kept in a folder with my html page which I am building according instructions given in above link.

But when I run this html document and click on show process form I get error alert as defined in code but no error description.

I doubt on authentication part. How can we pass authentication with this API.

here is my html code :
<!DOCTYPE html>
<html>
<head>
<title>Jbpm Form</title>
<script src ="jbpm-forms-rest-integration.js"></script>
<script type="text/javascript">

var formsAPI = new jBPMFormsAPI();
function showProcessForm() {
var onsuccessCallback = function(response) {
document.getElementById("showformButton").style.display = "none";
document.getElementById("startprocessButton").style.display = "block";
}

var onerrorCallback = function(errorMessage) {
alert("Unable to load the form, something wrong happened: " + errorMessage);
formsAPI.clearContainer("myform");
}

formsAPI.showStartProcessForm("admin:ad...@10.14.229.33:8080/jbpm-console/", "RnD:iooraTest:1.2", "iooraTest.FormTaskRnd", "myform", onsuccessCallback, onerrorCallback);
}

</script>

</head>
<body>
<input type="button" id="showformButton"

value="Show Process Form" onclick="showProcessForm()">

<p/>

<div id="myform" style="border: solid black 1px; width: 500px; height: 200px;">

</div>

<p/>

<input type="button" id="startprocessButton"

style="display: none;" value="Start Process" onclick="startProcess()">

</body>
</html>

points:
I am not testing this procedure on jbpm machine.
There are only two files in the project  jbpm-forms-rest-integration.js and my html page.

the URL which this java script is creating at 
     url: hostUrl + "rest/runtime/" + deploymentId + "/process/" + processId + "/startform",
is giving form URL if I manually try this url on browser.

Tuấn Vũ Anh

unread,
Mar 17, 2016, 1:54:51 PM3/17/16
to jBPM Usage
I have same problem: https://groups.google.com/forum/#!topic/jbpm-usage/TlP8UzIIC8c

Vào 12:25:18 UTC+7 Thứ Tư, ngày 25 tháng 11 năm 2015, Neeraj Pandey đã viết:

Tuấn Vũ Anh

unread,
Mar 18, 2016, 3:45:26 AM3/18/16
to jBPM Usage
Please help me :(
Thanks advance.


Vào 12:25:18 UTC+7 Thứ Tư, ngày 25 tháng 11 năm 2015, Neeraj Pandey đã viết:
Hi All,

Tuấn Vũ Anh

unread,
Mar 19, 2016, 12:01:22 AM3/19/16
to jBPM Usage
=))))))).
It's great, work very fine. Thanks in advance. I love jbpm...


Vào 12:25:18 UTC+7 Thứ Tư, ngày 25 tháng 11 năm 2015, Neeraj Pandey đã viết:
Hi All,

Anand Parthiban

unread,
Mar 21, 2016, 6:26:45 AM3/21/16
to jBPM Usage
Hi Tuan,

Can you post, how the same got it worked for you.

Tuấn Vũ Anh

unread,
Mar 22, 2016, 4:12:52 AM3/22/16
to jBPM Usage
2 way:
A1: you can using maven build project: https://github.com/pefernan/embedding-jbpm-forms-example to your application then deployed same jboss server jbpm and run your application.
A2: You copy and paste file html: https://github.com/pefernan/embedding-jbpm-forms-example/blob/master/src/main/webapp/showTaskForm.html to jbpm-console.war (same path kie-wb.html) so start jboss. you test : localhost:8080/jbpm-console/showTaskForm.html . It worked.

Vào 17:26:45 UTC+7 Thứ Hai, ngày 21 tháng 3 năm 2016, Anand Parthiban đã viết:

masoud jabbarvand

unread,
Apr 4, 2016, 10:48:47 AM4/4/16
to jBPM Usage
hi Tuan.
i try 2 ways and got the problem!

Something wrong happened: <html><head><title>Apache Tomcat/7.0.61 - Error report</title><style><!--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;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 401 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>This request requires HTTP authentication.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.61</h3></body></html>

do you know, what is the problem?

در سه‌شنبه 22 مارس 2016، ساعت 12:42:52 (UTC+4:30)، Tuấn Vũ Anh نوشته:

Neeraj Pandey

unread,
Apr 21, 2016, 4:42:51 AM4/21/16
to jBPM Usage, gpk.pand...@gmail.com
Hi Pere,

As the new version of jbpm has been released, do we have this feature available now?
Reply all
Reply to author
Forward
0 new messages