Discussion:
[jboss-user] [jBPM] - web-designer. gwt-console. taskform name
Sergey Kornilov
2012-12-13 15:24:35 UTC
Permalink
Sergey Kornilov [https://community.jboss.org/people/kornilovs] created the discussion

"web-designer. gwt-console. taskform name"

To view the discussion, visit: https://community.jboss.org/message/783303#783303

--------------------------------------------------------------
Hi.
I tried to create two bpmn2 processes in different packages and used same name as Task name. HTML taskform has created with generation template.
Then I start second process in jbpm-gwt-console, I see HTML task form from first bpmn2 process from another package. Where is my error?

This is error of gwt-console-server or not?


Sorry for my poor english.

This question was here https://community.jboss.org/message/759226#759226
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/783303#783303]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Sergey Kornilov
2013-04-26 08:35:01 UTC
Permalink
Sergey Kornilov [https://community.jboss.org/people/kornilovs] created the discussion

"Re: web-designer. gwt-console. taskform name"

To view the discussion, visit: https://community.jboss.org/message/810483#810483

--------------------------------------------------------------
I think problem in function  getFormTemplateURLFromGuvnor from package  org.jbpm.integration.console.shared

public String getFormTemplateURLFromGuvnor(String templateName, String format) {
        List<String> allPackages = getPackageNames();
        try {
            for(String pkg : allPackages) {
                String templateURL = getGuvnorProtocol()
                + "://"
                + getGuvnorHost()
                + "/"
                + getGuvnorSubdomain()
                + "/rest/packages/"
                + pkg
                + "/assets/"
                + URLEncoder.encode(templateName, "UTF-8");
 
                URL checkURL = new URL(templateURL);
                HttpURLConnection checkConnection = (HttpURLConnection) checkURL.openConnection();
                checkConnection.setRequestMethod("GET");
                checkConnection.setRequestProperty("Accept", "application/atom+xml");
                checkConnection.setConnectTimeout(Integer.parseInt(getGuvnorConnectTimeout()));
                checkConnection.setReadTimeout(Integer.parseInt(getGuvnorReadTimeout()));
                applyAuth(checkConnection);
                checkConnection.connect();
                if(checkConnection.getResponseCode() == 200) {
 
                    String toReturnURL = getGuvnorProtocol()
                    + "://"
                    + getGuvnorHost()
                    + "/"
                    + getGuvnorSubdomain()
                    + "/org.drools.guvnor.Guvnor/package/"
                    + pkg
                    + "/" + getGuvnorSnapshotName() + "/"
                    + URLEncoder.encode(templateName, "UTF-8")
                    + "." + format;
 
                    return toReturnURL;
                }
            }
        } catch (Exception e) {
           logger.error("Exception returning template url : " + e.getMessage());
           return null;
        }
        logger.info("Could not find process template url for: " + templateName);
        return null;
    }


this function iterate all packeges from Guvnor and return the first available form-template with given "templateName"
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/810483#810483]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...